Bug 152365

Summary: Deleting packages that aren't in a channel causes a 500 error
Product: [Retired] Red Hat Network Reporter: Mike McCune <mmccune>
Component: RHN/Web SiteAssignee: Mike McCune <mmccune>
Status: CLOSED CURRENTRELEASE QA Contact: Fanny Augustin <fmoquete>
Severity: medium Docs Contact:
Priority: medium    
Version: rhn370CC: bretm, rhn-bugs
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2005-05-04 04:15:40 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: 150896    

Description Mike McCune 2005-03-28 22:02:32 UTC
Deleting packages that aren't in a channel causes a 500 error:

/network/software/packages/manage/delete_confirm.pxt

1) Create channel
2) Add a package to it
3) Delete the channel
4) You get a new dialog indicating there are orphaned packages and a select list
with them in it
5) Select the package.  Click Delete Packages.

500 Error

I thought I got all the package queries that I switched from nvre to nvrea but I
missed this one.  Instead, I'm going to make sure the queries that I switched
over include both, the nvre and nvrea, (as Bret suggested before) that way any
possible list pages that I missed will have both available.

The workaround is to delete the packages from the channel before you delete the
channel itself, but the problem is that once this takes place, your packages
show up in the "Packages in no channels" list under Package Management but you
can't delete them.

Comment 1 Mike McCune 2005-03-29 00:03:34 UTC
The fix is coded, just need to know where to stick it (if we are going to
include this in 370 or not.

Comment 2 Mike McCune 2005-03-29 23:43:47 UTC
TEST PLAN:

1) Create channel
2) Add a package to it
3) Delete the channel
4) You get a new dialog indicating there are orphaned packages and a select list
with them in it
5) Select the package.  Click Delete Packages.
6) Should get a confirm dialog without error
7) Delete the package.  Should work ok.



Comment 3 Mike McCune 2005-04-20 20:42:22 UTC
flipping to ON_QA

Comment 4 Fanny Augustin 2005-04-22 14:58:57 UTC
Looks good on QA.

- For sat testing: just add packages using the webUI
- For hosted testing: Use a proxy, and use rhn_package_manager from the proxy to
upload packages to the channel