Bug 509543 - PreReq and Requires cause Oracle constraint violation, possible regression of #475894
PreReq and Requires cause Oracle constraint violation, possible regression of...
Status: CLOSED NEXTRELEASE
Product: Spacewalk
Classification: Community
Component: Server (Show other bugs)
0.6
All Linux
medium Severity high
: ---
: ---
Assigned To: Jesus M. Rodriguez
Red Hat Satellite QA List
:
Depends On:
Blocks: space06
  Show dependency treegraph
 
Reported: 2009-07-03 07:51 EDT by Mark Chappell
Modified: 2012-03-06 04:01 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2009-07-06 10:34:28 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Mark Chappell 2009-07-03 07:51:40 EDT
Attempting to upload a package with a package in the PreReq and Requires results in a uniqueness constraint violation.  

$ rhnpush --server http://rhn.bath.ac.uk/APP --channel centos-53-x86_64 -d ./ 
Internal server error 500 Internal Server Error
Error pushing /var/tmp/centos-updates/RPMS/squirrelmail-1.4.8-5.el5.centos.3.noarch.rpm: Error 500Error Message:
    957
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...

===

Looks like the "Duplicate" in Requires 

$ rpm -qp /var/tmp/centos-updates/RPMS/squirrelmail-1.4.8-5.el5.centos.3.noarch.rpm --requires
/bin/sh  
/usr/bin/env  
/usr/sbin/sendmail  
aspell  
config(squirrelmail) = 1.4.8-5.el5.centos.3
httpd  
httpd  
perl  
perl  
perl(Cwd)  
php >= 4.0.4
php-mbstring  
rpmlib(CompressedFileNames) <= 3.0.4-1 
rpmlib(PayloadFilesHavePrefix) <= 4.0-1
tmpwatch >= 2.8

Is actually appears to be caused by the spec including perl and httpd as both Requires and PreReq

$ grep -Ri req squirrelmail.spec
BuildRequires: gettext
Requires: httpd, php >= 4.0.4, php-mbstring, perl, tmpwatch >= 2.8, aspell
Requires: /usr/sbin/sendmail
Prereq: httpd, perl

==

Pradeep's original patch c738e65bf7d17bcc0267ff438b4e21a98a947102 would have avoided this particular error.  However the current HEAD seems to have reduced ['requires', 'provides', 'obsoletes'] to simply 'provides' (hence tagging as a regression)
Comment 1 Mark Chappell 2009-07-03 08:44:53 EDT
> $ rhnpush --server http://rhn.bath.ac.uk/APP --channel centos-53-x86_64 -d ./ 
> Internal server error 500 Internal Server Error
> Error pushing
> /var/tmp/centos-updates/RPMS/squirrelmail-1.4.8-5.el5.centos.3.noarch.rpm:
> Error 500Error Message:
>     957
> 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)


Ergh, worse, it's a horribly inacurate error message.

    def __doInsert(self, hash, tables):
        for tname in tables:
            dict = hash[tname]
            try:
                self.__doInsertTable(tname, dict)
            except rhnSQL.SQLError, e:
                raise rhnFault(54, str(e[1]), explain=0)

There are other reasons why you may get refused...   Of course the question is why did I hit it.
Comment 2 Mark Chappell 2009-07-03 08:46:09 EDT
TCPdump shows the following

@insert into rhnPackage (org_id, name_id, evr_id, package_arch_id@, md5sum, md5sum, md5sum, md5sum, md5sum, md5sum, build_time, pa@yload_format, id, copyright, payload_size, package_size, vendor,@ description, build_host, package_group, last_modified, cookie, @path, source_rpm_id, header_end, header_start, summary, rpm_vers@ion) values (:org_id, :name_id, :evr_id, :package_arch_id, :md5s@um, :md5sum, :md5sum, :md5sum, :md5sum, :md5sum, :build_time, :p@ayload_format, :id, :copyright, :payload_size, :package_size, :v@endor, :description, :build_host, :package_group, :last_modified@, :cookie, :path, :source_rpm_id, :header_end, :header_start, :s.ummary, :rpm_version).............................i..............i..............i..............i..............i...................................................................L......i..............i..............i..............i..............i..............i..............i...............i.......P......i..............i.......L......i.......|......i...............i..............i..............i..............i.......t......i..............i....1.237.1155.119 3a62d112ac80601fa4a0455d938294b7.2009-05-08 00:18:31.cpio.7542.LGPL.268004.81020.CentOS.@The audit-libs-python package contains the bindings so that liba+udit
and libauparse can be used by python.
..builder10.centos.org.2.2009-07-03 13:36:04.builder10.centos.org 1241741818.@redhat/1/3a6/audit-libs-python/1.7.7-6.el5_3.3/x86_64/3a62d112ac@80601fa4a0455d938294b7/audit-libs-python-1.7.7-6.el5_3.3.x86_64..rpm..2738.16160.440.Python bindings for libaudit
.4.4.2.3..................................W.....................+.b...........................!ORA-00957: duplicate column name


Oddly md5sum seems to be turning up multiple times.
Comment 3 Mark Chappell 2009-07-06 10:34:28 EDT
Appears to have been fixed by Pradeep, git HEAD works.

bash-3.2$ git show 652bab0a00bdb3c2e51612636817c774985dd966
commit 652bab0a00bdb3c2e51612636817c774985dd966
Author: Pradeep Kilambi <pkilambi@redhat.com>
Date:   Thu Jul 2 10:06:29 2009 -0400

    509245 - only add md5sum as primary key if it does'nt already exist. This causes d

Note You need to log in before you can comment on or make changes to this bug.