Red Hat Bugzilla – Bug 750488
[RFE] packages.removePackage() do not removes srpm package associated to rpm
Last modified: 2016-05-09 08:23:12 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):
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', )
>>> client.packages.removePackage(key, 1599)
3. # find /var/satellite/ -name somepackage-x86_64-16318-0.2-2\*
src.rpm not deleted
src.rpm deleted together with rpm
Where did you find the information a src.rpm shall be deleted together with a rpm package?
From API documentation:
Remove a package from the satellite.
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).
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.
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.