Bug 750488 - [RFE] packages.removePackage() do not removes srpm package associated to rpm
[RFE] packages.removePackage() do not removes srpm package associated to rpm
Product: Spacewalk
Classification: Community
Component: API (Show other bugs)
Unspecified Unspecified
unspecified Severity low
: ---
: ---
Assigned To: Tomas Lestach
Red Hat Satellite QA List
: FutureFeature
Depends On:
Blocks: spacewalk-rfe
  Show dependency treegraph
Reported: 2011-11-01 06:13 EDT by Jan Hutař
Modified: 2016-05-09 08:23 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2016-05-09 08:23:12 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Jan Hutař 2011-11-01 06:13:53 EDT
Description of problem:
API call packages.removePackage(key, packageid) removes rpm given by packageid, but do not remove associated src.rpm.

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

How reproducible:

Steps to Reproduce:
1. # find /var/satellite/ -name somepackage-x86_64-16318-0.2-2\*
2. # python
Python 2.7 (r27:82500, Sep 16 2010, 18:02:00) 
[GCC 4.5.1 20100907 (Red Hat 4.5.1-3)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import xmlrpclib
>>> client = xmlrpclib.Server('https://ibm-x3650-02.ovirt.rhts.eng.bos.redhat.com/rpc/api')
>>> key = client.auth.login('admin', 'nimda')
>>> client.channel.software.removePackages(key, 'test-x86_64-0', [1599])
>>> client.packages.removePackage(key, 1599)
>>> client.auth.logout(key)
3. # find /var/satellite/ -name somepackage-x86_64-16318-0.2-2\*

Actual results:
src.rpm not deleted

Expected results:
src.rpm deleted together with rpm
Comment 1 Tomas Lestach 2011-11-01 08:36:17 EDT
Where did you find the information a src.rpm shall be deleted together with a rpm package?

From API documentation:
Method: removePackage

Remove a package from the satellite.
Comment 2 Jan Hutař 2011-11-01 09:37:28 EDT
Hmm, if not, we do not have way how to delete src.rpm, or do we?

It looks like src.rpms are deleted from DB, but not from disk storage (/var/satellite).
Comment 3 Jan Pazdziora 2011-12-09 09:48:20 EST
The problem is that there can be multiple arch/noarch packages for single srpm. So it's not like we always want to delete, more like delete when we delete the last one. Marking as RFE.
Comment 4 Jan Dobes 2016-05-09 08:23:12 EDT
Possibility to delete source RPMs was implemented in bz1192879. There are new API calls for deleting SRPMs, not removing within this API call method because it would require checking if the package is last one who uses this SRPM and even then - it's questionable if the SRPM should be deleted together with RPM. As we provided different way how to delete SRPMs, closing this as NOTABUG.

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