Bug 362301

Summary: rhn-delete-package should be able to delete SRPMS without matching RPMS
Product: [Retired] Red Hat Network Reporter: James Bowes <jbowes>
Component: RHN/BackendAssignee: Bryan Kearney <bkearney>
Status: CLOSED CURRENTRELEASE QA Contact: Amy Owens <aowens>
Severity: low Docs Contact:
Priority: low    
Version: RHN DevelCC: bkearney, dgregor, rhn-bugs
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: 5.0.4.2 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2008-01-29 21:28:53 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 425231, 427574    

Description James Bowes 2007-11-01 18:24:46 UTC
The existing implementation of rhn-delete-package takes as an argument a binary
rpm name, and an optional flag saying if you should delete the source rpm for
that rpm. This means that you can't delete a SRPM if you deleted the RPM first.

Comment 1 James Bowes 2007-11-02 13:54:54 UTC
*** Bug 362681 has been marked as a duplicate of this bug. ***

Comment 2 James Bowes 2007-12-18 16:27:34 UTC
Test plan:
Use the webui to find a package that has an associated source rpm.
use rhn-delete-package-internal to delete the rpm:
rhn-delete-package --orgid="" --package=foo-1.2.3.noarch
now delete the source rpm (no longer has a matching rpm):
rhn-delete-package --orgid="" --package=foo-1.2.3.src.rpm --sources --commit

verify that the entry is removed from the database using a sql client:

select org_id from rhnPackageSource ps, rhnSourceRpm sr
where ps.source_rpm_id = sr.id
and sr.name='foo-1.2.3.src.rpm

The result should be a non NULL value (the recycled org id)