Description of problem: I've attempted to upload the package perl-DBIx-Class-0.08108-1.fc12.noarch.rpm to Red Hat Satellite via rhnpush. After a couple of seconds, the following error message appears: Internal server error 500 Internal Server Error Error pushing /root/mirror.switch.ch/mirror/fedora/linux/releases/12/Everything/x86_64/os/Packages/perl-DBIx-Class-0.08108-1.fc12.noarch.rpm : Error 500Error Message: ORA-00001: unique constraint (RHNSAT.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 5 seconds and trying again... Internal server error 500 Internal Server Error Error pushing /root/mirror.switch.ch/mirror/fedora/linux/releases/12/Everything/x86_64/os/Packages/perl-DBIx-Class-0.08108-1.fc12.noarch.rpm : Error 500Error Message: ORA-00001: unique constraint (RHNSAT.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 5 seconds and trying again... Internal server error 500 Internal Server Error Error pushing /root/mirror.switch.ch/mirror/fedora/linux/releases/12/Everything/x86_64/os/Packages/perl-DBIx-Class-0.08108-1.fc12.noarch.rpm : Error 500Error Message: ORA-00001: unique constraint (RHNSAT.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 1 seconds and trying again... Giving up after 3 attempts Version-Release number of selected component (if applicable): How reproducible: rhnpush -d Packages/ -c fedora12-stag --server=satellite.example.com --force Steps to Reproduce: 1. rhnpush -d Packages/ -c fedora12-stag --server=satellite.example.com --force 2. 3. Actual results: Can't upload package. Expected results: Upload package. Additional info: There is the suspicion the error occures because of multiple requires for the same "package dependencies": rpm -q --requires -p perl-DBIx-Class-0.08108-1.fc12.noarch.rpm perl(:MODULE_COMPAT_5.10.0) rpmlib(VersionedDependencies) <= 3.0.3-1 perl(Class::Accessor::Grouped) >= 0.08003 perl(Class::C3::Componentised) >= 1.0005 perl(SQL::Abstract) >= 1.56 perl(Carp::Clan) >= 6 perl(Class::Inspector) >= 1.24 perl(DBD::SQLite) >= 1.25 perl(DBI) >= 1.605 perl(Data:age) >= 2 perl(JSON::Any) >= 1.18 perl(List::Util) perl(MRO::Compat) >= 0.09 perl(Module::Find) >= 0.06 perl(Path::Class) >= 0.16 perl(SQL::Abstract::Limit) >= 0.13 perl(Scalar::Util) perl(Scope::Guard) >= 0.03 perl(Storable) perl(Sub::Name) >= 0.04 rpmlib(FileDigests) <= 4.6.0-1 rpmlib(PayloadFilesHavePrefix) <= 4.0-1 rpmlib(CompressedFileNames) <= 3.0.4-1 rpmlib(VersionedDependencies) <= 3.0.3-1 perl(base) perl(Carp) perl(Carp::Clan) perl(Class::Inspector) perl(Class::Trigger) perl(Clone) perl(Data:umper) perl(Data:age) perl(DBI) perl(DBIx::Class::CDBICompat::Relationship) perl(DBIx::Class::ClassResolver:assThrough) perl(DBIx::Class::Exception) perl(DBIx::Class::ResultSet) perl(DBIx::Class::ResultSetColumn) perl(DBIx::Class::ResultSourceHandle) perl(DBIx::Class::ResultSource::Table) perl(DBIx::Class::Schema) perl(DBIx::Class::StartupCheck) perl(DBIx::Class::Storage:BI) perl(DBIx::Class::Storage:BI::Cursor) perl(DBIx::Class::Storage:BI::Replicated::Balancer) perl(DBIx::Class::Storage:BI::Replicated:ool) perl(DBIx::Class::Storage:BI::Replicated::Replicant) perl(DBIx::Class::Storage:BI::Replicated::Types) perl(DBIx::Class::Storage::Statistics) perl(DBIx::Class::Storage::TxnScopeGuard) perl(DBIx::ContextualFetch) perl(Exporter) perl(File::Copy) perl(File:ath) perl(File::Spec) perl(Getopt::Long) perl(Hash::Merge) perl(IO::File) perl(JSON::Any) perl(List::Util) perl(Module::Find) perl(Moose) perl(Moose::Role) perl(MooseX::AttributeHelpers) perl(MooseX::Types::Moose) perl(mro) perl(MRO::Compat) perl(namespace::clean) perl(overload) perl(Path::Class) perl(Pod::Usage) perl(POSIX) perl(Scalar::Util) perl(Scope::Guard) perl(SQL::Translator::Schema::Constants) perl(SQL::Translator::Utils) perl(Storable) perl(strict) perl(Sub::Name) perl(vars) perl(warnings) rpmlib(VersionedDependencies) <= 3.0.3-1 /usr/bin/perl rpmlib(PayloadIsXz) <= 5.2-1
The actual problem is that there are duplicate requires in the RPM. These are not allowed by Satellite/Spacewalk and should be prevented: $ rpm -q --requires -p perl-DBIx-Class-0.08108-1.fc12.noarch.rpm | sort > perl-DBIx-Class-0.08108-1.fc12.noarch.rpm.full $ rpm -q --requires -p perl-DBIx-Class-0.08108-1.fc12.noarch.rpm | sort -u > perl-DBIx-Class-0.08108-1.fc12.noarch.rpm.filtered $ diff -u perl-DBIx-Class-0.08108-1.fc12.noarch.rpm.full perl-DBIx-Class-0.08108-1.fc12.noarch.rpm.filtered --- perl-DBIx-Class-0.08108-1.fc12.noarch.rpm.full 2010-02-23 14:37:47.138900460 +0000 +++ perl-DBIx-Class-0.08108-1.fc12.noarch.rpm.filtered 2010-02-23 14:37:56.291901898 +0000 @@ -42,7 +42,6 @@ perl(JSON::Any) perl(JSON::Any) >= 1.18 perl(List::Util) -perl(List::Util) perl(:MODULE_COMPAT_5.10.0) perl(Module::Find) perl(Module::Find) >= 0.06 @@ -60,7 +59,6 @@ perl(Pod::Usage) perl(POSIX) perl(Scalar::Util) -perl(Scalar::Util) perl(Scope::Guard) perl(Scope::Guard) >= 0.03 perl(SQL::Abstract) >= 1.56 @@ -68,7 +66,6 @@ perl(SQL::Translator::Schema::Constants) perl(SQL::Translator::Utils) perl(Storable) -perl(Storable) perl(strict) perl(Sub::Name) perl(Sub::Name) >= 0.04
I'm inclined to say that this isn't a problem with this package, rather a problem with the "spacewalk" tool -- which doesn't sound like a Fedora tool, either. Spacewalk should be corrected to handle this -- that is, silently reject "duplicate" requires/provides RPM metadata or somehow otherwise accommodate this valid RPM state.
Hi Chris, spacewalk (http://www.redhat.com/spacewalk/) is the community edition from the Red Hat Satellite server - a must have product for enterprise IT infrastructure. I've talked to the redhat technical support team and they gave me the hint to report a bug for that.The spacewalk/satellite server validates the rpm packages correctly and reports everything not usual.
Moving back to Fedora product. For Spacewalk, we already have the issue tracked as bug 567659. For Fedora, it'd be nice to have the duplicated Requires cleaned, just to keep world nice and sane. Of course, if you do not wish to clean them for whatever reason, just NOTABUG this bugzilla. Thank you, Jan
Hey Patrick, Jan -- That's good to hear. Duplicate rpm dependency metadata is a prefectly legal situation for packages to be in, that we often find ourselves in packages with only auto-generated metadata. e.g., looking at the running kernel package on my machine, I see mutiple duplicate deps: [cweyl@zeus perl-MooseX-Types-JSON]$ rpmquery --requires kernel-2.6.31.12-174.2.22.fc12.x86_64 rpmlib(VersionedDependencies) <= 3.0.3-1 fileutils module-init-tools initscripts >= 8.11.1-1 kernel-firmware >= 2.6.31.12-174.2.22.fc12 grubby >= 7.0.4-1 dracut >= 001-7 /sbin/new-kernel-pkg /sbin/new-kernel-pkg /bin/sh /bin/sh /bin/sh rpmlib(FileDigests) <= 4.6.0-1 rpmlib(PayloadFilesHavePrefix) <= 4.0-1 rpmlib(CompressedFileNames) <= 3.0.4-1 rpmlib(PayloadIsXz) <= 5.2-1 Soooo... Nothing against Spacewalk, but having duplicate requires/provides from any source in rpm metadata is perfectly legal, and perfectly expected. The situation you're describing in this ticket is not a perl-DBIx-Class bug at any level, but rather a problem being caused by an artificial limit of Spacewalk. That being said, I'd much prefer to have dependency metadata as trim as reasonably possible... But rpm does not give us the tools to easily do this, particularly when trying to work with both automatic (which can be incomplete) and manual (which tend to be more precise for Perl) data. If you can get the rpm team to give us easy access to the auto and manual dep streams from inside an rpm spec (either lua or rpm macro) so we can do this easily, I will forever be your friend :) This is NOTABUG of perl-DBIx-Class.
The dependencies are not really duplicated, because they differ in undisplayed ways, e.g. /sbin/new-kernel-pkg is required in post and preun: $ depnames-files.py kernel-2.6.31.12-174.2.22.fc12.x86_64.rpm| sort | uniq -c 1 interp R /bin/sh 1 post R /bin/sh 1 post R /sbin/new-kernel-pkg 1 pre R dracut >= 001-7 1 pre R fileutils 1 pre R grubby >= 7.0.4-1 1 pre R initscripts >= 8.11.1-1 1 pre R kernel-firmware >= 2.6.31.12-174.2.22.fc12 1 pre R module-init-tools 1 preun R /bin/sh 1 preun R /sbin/new-kernel-pkg 1 rpmlib R rpmlib(CompressedFileNames) <= 3.0.4-1 1 rpmlib R rpmlib(FileDigests) <= 4.6.0-1 1 rpmlib R rpmlib(PayloadFilesHavePrefix) <= 4.0-1 1 rpmlib R rpmlib(PayloadIsXz) <= 5.2-1 1 rpmlib R rpmlib(VersionedDependencies) <= 3.0.3-1 The script used to show this is based on this one: http://laiskiainen.org/rpm/scripts/depnames.py There is some explanation about the script here: https://www.redhat.com/archives/fedora-devel-list/2008-December/msg02021.html
Hmm, but does Spacewalk differentiate that? This is still NOTABUG of perl-DBIx-Class.
(In reply to comment #7) > Hmm, but does Spacewalk differentiate that? I am pretty sure, because otherwise every package with two kind of scriptlets would fail there.