Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 1358735 - Problem with deleting of source packages from disk
Summary: Problem with deleting of source packages from disk
Keywords:
Status: CLOSED DUPLICATE
Alias: None
Product: Red Hat Satellite 5
Classification: Red Hat
Component: Server
Version: 570
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Tomáš Kašpárek
QA Contact: Red Hat Satellite QA List
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-07-21 11:52 UTC by Martin Korbel
Modified: 2016-07-21 13:51 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-07-21 13:51:39 UTC


Attachments (Terms of Use)

Description Martin Korbel 2016-07-21 11:52:02 UTC
Description of problem:
The satellite does not delete SRC package from disk with normal package.

Version-Release number of selected component (if applicable):
spacewalk-java-2.3.8-147

How reproducible:
100%

Steps to Reproduce:
1. we have got Satellite 5.7 and testing package with SRC package.
2. Push package and SRC package
> rhnpush --verbose -c custom_chann_rhn_push -u admin -p xxx --server=http://<fqdn>/APP --nosig ./test-rpmbuild-test-regular-kpwV7J-0.1-1/RPMS/x86_64/test-regular-kpwV7J-0.1-1.x86_64.rpm

Connecting to http://<fqdn>/APP
Package ./test-rpmbuild-test-regular-kpwV7J-0.1-1/RPMS/x86_64/test-regular-kpwV7J-0.1-1.x86_64.rpm Not Found on RHN Server -- Uploading
Uploading package ./test-rpmbuild-test-regular-kpwV7J-0.1-1/RPMS/x86_64/test-regular-kpwV7J-0.1-1.x86_64.rpm
Using POST request

> rhnpush --source --header --verbose -c custom_chann_rhn_push -u admin -p nimda --server=http://<fqdn>/APP --nosig ./test-rpmbuild-test-regular-kpwV7J-0.1-1/SRPMS/test-regular-kpwV7J-0.1-1.src.rpm 

> find /var/satellite/redhat/ -name test-regular*
/var/satellite/redhat/1/5b2/test-regular-kpwV7J/0.1-1/x86_64/5b24a4b16a561e836e590214e3d97f8e5b43aefbd2bfbaad5aad963dc9a61e82/test-regular-kpwV7J-0.1-1.x86_64.rpm
/var/satellite/redhat/1/cf2/test-regular-kpwV7J/0.1-1/SRPMS/cf2eced0360d67bf9e3eae9659fe876bc3bb57f0dc3817ac688e9964d5641bdc/test-regular-kpwV7J-0.1-1.src.rpm

3. check the detail of package in WebUI and delete it (I tested this step via WebUI and API).

4. check  table
>  echo "SELECT * FROM rhnpackagefiledeletequeue;" | spacewalk-sql --select-mode -

                                                                              path                                  
                                               |            created            
----------------------------------------------------------------------------------------------------------------------
-----------------------------------------------+-------------------------------
 redhat/1/5b2/test-regular-kpwV7J/0.1-1/x86_64/5b24a4b16a561e836e590214e3d97f8e5b43aefbd2bfbaad5aad963dc9a61e82/test-r
egular-kpwV7J-0.1-1.x86_64.rpm                 | 2016-07-21 06:02:27.382561-04


5. After 10 minutes or manual running of taskomatic task "package-cleanup-bunch"
>  echo "SELECT * FROM rhnpackagefiledeletequeue;" | spacewalk-sql --select-mode -
path                                  
                                               |            created            
----------------------------------------------------------------------------------------------------------------------
-----------------------------------------------+-------------------------------


> find /var/satellite/redhat/ -name test-regular*
/var/satellite/redhat/1/cf2/test-regular-kpwV7J/0.1-1/SRPMS/cf2eced0360d67bf9e3eae9659fe876bc3bb57f0dc3817ac688e9964d5641bdc/test-regular-kpwV7J-0.1-1.src.rpm



Actual results:
Satellite does not delete SRC package

Expected results:
Satellite should delete both RPM + SRC.RPM

Additional info:

Comment 1 Jan Dobes 2016-07-21 13:51:39 UTC
It should be definitely fixed in bz1192879 (it's in MODIFIED state). It adds support for deleting source RPMs separately. I remember this was not working correctly before I added this support - source package was deleted from database but not from filesystem (no insert into rhnpackagefiledeletequeue was done), also is wrong to delete source package always when you remove relevant binary package because there can be built multiple binary packages from single source package.

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


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