Description of problem: Uploading package /mnt/mirrors/fedora/releases/10/Fedora/i386/os/Packages/kernel-PAE-2.6.27.5-117.fc10.i686.rpm Using POST request Internal server error 500 Internal Server Error Error pushing /mnt/mirrors/fedora/releases/10/Fedora/i386/os/Packages/kernel-PAE-2.6.27.5-117.fc10.i686.rpm: Error 500Error Message: ORA-00001: unique constraint (SPACEWALK.RHN_PKG_REQ_PID_CID_S_UQ) violated Error Class Code: 54 Error Class Info: Package Upload Failed due to uniqueness constraint violation. Make sure the package does not have any duplicate dependencies or does not already exists on the server (500) Waiting 3 seconds and trying again... Uploading package /mnt/mirrors/fedora/ When uploading kernel-PAE i get the above error there is a kernel.i686 rpm in the spacewalk server already. this is definitely not a duplicate rpm.
Easy enough to reproduce. Not certain yet what's going on, assigning to Prad as I'm guessing he's our best bet, but will continue to investigate and see if I can figure out what the problem is. The constraint is: create unique index rhn_pkg_req_pid_cid_s_uq on rhnPackageRequires(package_id, capability_id, sense) tablespace [[4m_tbs]] ;
On my spacewalk install the conflicting values are on sense 16777226 (not sure what this is) but capability_id 2642, which matches up to: SQL> select * from rhnPackageCapability where id = 2642; ID ---------- NAME -------------------------------------------------------------------------------- VERSION ---------------------------------------------------------------- CREATED MODIFIED ------------------ ------------------ 2642 rpmlib(VersionedDependencies) 3.0.3-1 21-JUL-09 21-JUL-09 [root@sw1 ~]# rpm -qp --requires f11/kernel-PAE-2.6.29.4-167.fc11.i686.rpm rpmlib(VersionedDependencies) <= 3.0.3-1 fileutils module-init-tools initscripts >= 8.11.1-1 mkinitrd >= 6.0.61-1 kernel-firmware >= 2.6.29.4-167.fc11 /sbin/new-kernel-pkg rpmlib(VersionedDependencies) <= 3.0.3-1 /bin/sh /bin/sh /bin/sh rpmlib(FileDigests) <= 4.6.0-1 rpmlib(PayloadFilesHavePrefix) <= 4.0-1 rpmlib(CompressedFileNames) <= 3.0.4-1 [root@sw1 ~]# So it appears this packages duplicate dependency on rpmlib is causing the problem. I did the same query on the latest version of this kernel package out of updates and found it has even more duplicates: (root@redhat ~) $ rpm -q --requires kernel-PAE rpmlib(VersionedDependencies) <= 3.0.3-1 fileutils module-init-tools initscripts >= 8.11.1-1 mkinitrd >= 6.0.61-1 kernel-firmware >= 2.6.29.4-167.fc11 /sbin/new-kernel-pkg rpmlib(VersionedDependencies) <= 3.0.3-1 /bin/sh /bin/sh /bin/sh rpmlib(FileDigests) <= 4.6.0-1 rpmlib(PayloadFilesHavePrefix) <= 4.0-1 rpmlib(CompressedFileNames) <= 3.0.4-1 rpmlib(VersionedDependencies) <= 3.0.3-1 fileutils module-init-tools initscripts >= 8.11.1-1 mkinitrd >= 6.0.61-1 kernel-firmware >= 2.6.29.5-191.fc11 /sbin/new-kernel-pkg rpmlib(VersionedDependencies) <= 3.0.3-1 /bin/sh /bin/sh /bin/sh rpmlib(FileDigests) <= 4.6.0-1 rpmlib(PayloadFilesHavePrefix) <= 4.0-1 rpmlib(CompressedFileNames) <= 3.0.4-1 (root@redhat ~) $ Thoughts on how to handle? Is this something we should report against the kernel package? (even though this won't really help anyone trying to rhnpush the released F11 packages...)
One option would be to filter out duplicates in backend/server/importLib/backend.py processCapabilities, if the single copy of the requires goes in it seems like this should be sufficient.
This code has been on a wild ride lately, this looks to have been fixed and then broken again all within the 0.6 devel cycle. Hopefully fixed once and for all in spacewalk.git: 88e29677361c7051475f4e53a796b5182119bc54 Probably also fixes similar issues that could occur with provides/requires/obsoletes/conflicts.
Spacewalk 0.6 released
*** Bug 567659 has been marked as a duplicate of this bug. ***