Bug 654886 - rhnpush does not update a package even using the --force when the package has the same name but different checksums
rhnpush does not update a package even using the --force when the package has...
Status: CLOSED DUPLICATE of bug 624092
Product: Red Hat Satellite 5
Classification: Red Hat
Component: Server (Show other bugs)
540
All All
urgent Severity high
: ---
: ---
Assigned To: Miroslav Suchý
Red Hat Satellite QA List
: Regression
Depends On:
Blocks: sat54-errata
  Show dependency treegraph
 
Reported: 2010-11-18 17:55 EST by Marcelo Moreira de Mello
Modified: 2011-01-12 07:49 EST (History)
7 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2010-12-15 11:12:00 EST
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 Marcelo Moreira de Mello 2010-11-18 17:55:27 EST
Description of problem:

The rhnpush does not update a package even using the --force when the package has the same name  but different checksums

Version-Release number of selected component (if applicable):
Satellite 5.4


How reproducible:
100%

Steps to Reproduce:
1) Environment and bulting a RPM package

     $ rpm -q rhnpush
        rhnpush-5.5.4-2.el5sat
     $ rhn-schema-version 
        5.4.0.8-1.el5sat
     $ cat /etc/redhat-release 
        Red Hat Enterprise Linux Server release 5.5 (Tikanga)

We created a custom channel and built a test RPM package 

           $ wget http://download.fedora.redhat.com/pub/epel/5/SRPMS/sdparm-1.04-1.el5.src.rpm
           $ rpm -ivh sdparm-1.04-1.el5.src.rpm 
           $ rpmbuild  -ba /usr/src/redhat/SPECS/sdparm.spec 
           $ md5sum /usr/src/redhat/RPMS/i386/sdparm-1.04-1.i386.rpm
              d15a816c3df1c44398bd06e1628d58ca  /usr/src/redhat/RPMS/i386/sdparm-1.04-1.i386.rpm 

                                      ^^^^^^ this is the md5sum for the first RPM package

           $ rhnpush  -c personnal -vvv -u user -p password --server satellite-server.FQDN  /usr/src/redhat/RPMS/i386/sdparm-1.04-1.i386.rpm --nosig 
           Connecting to http://satellite-server.FQDN/APP
           url is http://satellite-server.FQDN/PACKAGE-PUSH
           Result codes: 200 OK
           Computing checksum and package info. This may take some time ...
           Package /usr/src/redhat/RPMS/i386/sdparm-1.04-1.i386.rpm Not Found on RHN Server -- Uploading
           Uploading package /usr/src/redhat/RPMS/i386/sdparm-1.04-1.i386.rpm
            Using POST request

2) Trying for the second time: 

           $ rhnpush  -c personnal -vvv -u user -p password --server satellite-server.FQDN  /usr/src/redhat/RPMS/i386/sdparm-1.04-1.i386.rpm --nosig 
             Connecting to http://satellite-server.FQDN/APP
             url is http://satellite-server.FQDN/PACKAGE-PUSH
             Result codes: 200 OK
             Computing checksum and package info. This may take some time ...
             Package /usr/src/redhat/RPMS/i386/sdparm-1.04-1.i386.rpm already exists on the RHN Server-- Skipping Upload...

3) Trying now for the third time using --force 

           $ rhnpush  -c personnal -vvv -u user -p password --server satellite-server.FQDN  /usr/src/redhat/RPMS/i386/sdparm-1.04-1.i386.rpm --nosig --force
             Connecting to http://satellite-server.FQDN/APP
             url is http://satellite-server.FQDN/PACKAGE-PUSH
             Result codes: 200 OK
             Computing checksum and package info. This may take some time ...
             Uploading package /usr/src/redhat/RPMS/i386/sdparm-1.04-1.i386.rpm
             Using POST request

########## changing ckecksum 

4) Creating a new package and adding a comment on spec

            $ vim sdparm.spec (added a comment)
            $ rpmbuild  -ba /usr/src/redhat/SPECS/sdparm.spec
            $ md5sum /usr/src/redhat/RPMS/i386/sdparm-1.04-1.i386.rpm
              bb87a5929150d6f6c129cd6104114737  /usr/src/redhat/RPMS/i386/sdparm-1.04-1.i386.rpm

                      ^^^^^^  note different checksum, but same name, version and release

5) Trying to update the package using rhnpush

	    $ rhnpush  -c personnal -vvv -u user -p password --server satellite-server.FQDN  /usr/src/redhat/RPMS/i386/sdparm-1.04-1.i386.rpm --nosig 
              Connecting to http://satellite-server.FQDN/APP
              url is http://satellite-server.FQDN/PACKAGE-PUSH
              Result codes: 200 OK
              Computing checksum and package info. This may take some time ...
              Error: Package /usr/src/redhat/RPMS/i386/sdparm-1.04-1.i386.rpm already exists on the server with a different checksum. Skipping upload to prevent overwriting existing package. (You may use rhnpush with the --force option to force this upload if the force_upload option is enabled on your server.)

6) Trying to update using the --force option (as suggested on the command line above) 

            $ rhnpush  -c personnal -vvv -u user -p password --server satellite-server.FQDN  /usr/src/redhat/RPMS/i386/sdparm-1.04-1.i386.rpm --nosig --force
              Connecting to http://satellite-server.FQDN/APP
              url is http://satellite-server.FQDN/PACKAGE-PUSH
              Result codes: 200 OK
              Computing checksum and package info. This may take some time ...
              Package checksum /usr/src/redhat/RPMS/i386/sdparm-1.04-1.i386.rpm mismatch  -- Forcing Upload
              Uploading package /usr/src/redhat/RPMS/i386/sdparm-1.04-1.i386.rpm
              Using POST request

OK.. At this time the package is suppose to be uploaded. 

7) Testing the new package upload 

	     $  wget https://satellite-server.FQDN/download/package/2316a3acd921a4ce69c63a78b3ff3a6d4c8c05f6/1290170387302/2/16024/sdparm-1.04-1.i386.rpm --no-check-certificate
	     $ md5sum sdparm-1.04-1.i386.rpm 
             d15a816c3df1c44398bd06e1628d58ca  sdparm-1.04-1.i386.rpm

			^^^^^^  the md5 are kept from the first package updated

So, this test shows that even using the --force option on rhnpush, the package is not updated. 

  
Actual results:
Package is not updated

Expected results:
Package be updated 

Additional info:
Comment 2 Michael Mráka 2010-11-24 06:08:42 EST
In step 6) the package has been uploaded but it ends up in 'Manage Software Packages' i.e. outside of any channel.
Comment 3 Jan Pazdziora 2010-12-06 14:05:10 EST
Isn't this a complete dupe of bug 624092?
Comment 4 Clifford Perry 2010-12-06 14:32:45 EST
Jan - I am not sure myself. I would like ideally the same developer to look at both to make that determination. Same bug, different ways of looking at it (maybe more information for testing for QA). 

If it is a dupe and can be still fixed, I'm OK with that :)

Cliff
Comment 5 Miroslav Suchý 2010-12-09 07:48:53 EST
Taking from Michael.
Comment 6 Miroslav Suchý 2010-12-15 11:12:00 EST

*** This bug has been marked as a duplicate of bug 624092 ***

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