Bug 644066

Summary: delete_package failing for conditional packages in packagegroup
Product: [Retired] Pulp Reporter: Preethi Thomas <pthomas>
Component: z_otherAssignee: John Matthews <jmatthew>
Status: CLOSED CURRENTRELEASE QA Contact: Preethi Thomas <pthomas>
Severity: medium Docs Contact:
Priority: medium    
Version: unspecifiedKeywords: Triaged
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: 2011-08-16 13:59:28 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: 641987    

Description Preethi Thomas 2010-10-18 20:38:17 UTC
Description of problem:


[root@preethi ~]# pulp-admin packagegroup delete_package  --repoid=f13 --id=preethi -n zip --type=conditional --requires zsh
Unable to delete [zip] from group [preethi] in repository [f13]



2010-10-18 16:44:52,721 [ERROR][Dummy-13] report_error() @ base.py:55 - Traceback (most recent call last):
  File "/usr/lib/python2.6/site-packages/pulp/server/webservices/controllers/base.py", line 51, in report_error
    return method(self, *args, **kwargs)
  File "/usr/lib/python2.6/site-packages/pulp/server/webservices/role_check.py", line 102, in check_roles
    result = f(instance, *fargs, **kw)
  File "/usr/lib/python2.6/site-packages/pulp/server/webservices/controllers/repositories.py", line 357, in delete_package_from_group
    return self.ok(api.delete_package_from_group(id, groupid, pkg_name, gtype, requires))
  File "/usr/lib/python2.6/site-packages/pulp/server/auditing.py", line 193, in _audit
    result = method(*args, **kwargs)
  File "/usr/lib/python2.6/site-packages/pulp/server/api/repo.py", line 673, in delete_package_from_group
    raise PulpException("No conditional package names are stored under %s" % (requires))
PulpException: u'No conditional package names are stored under zsh'

Comment 1 John Matthews 2010-10-20 15:02:50 UTC
Please re-test with latest pulp build.

This was fixed around 10/16/10
http://git.fedorahosted.org/git/?p=pulp.git;a=commit;h=702cea7ff1f69b0f157dc1008294b146b6d78372

Comment 2 John Matthews 2010-10-20 15:06:41 UTC
I'm not positive if this made it into last community release, so putting back to MODIFIED so it can be moved to ON_QA after new build.

Comment 3 Jay Dobies 2010-10-20 16:57:03 UTC
Fixed in 0.75.

Comment 4 Preethi Thomas 2010-10-26 13:52:53 UTC
verified
[root@preethi ~]# pulp-admin packagegroup add_package --repoid=f13 -n zsh --id=testing -t conditional --requires zip
Following packages added to group [testing] in repository [f13] for required package [zip]: 
 ['zsh']


[root@preethi ~]# pulp-admin packagegroup info --repoid=f13  --id=testing +------------------------------------------+
          Package Group Information
+------------------------------------------+

Name                	testing                  
Id                  	testing                  
Mandatory packages  	[]                       
Default packages    	[]                       
Optional packages   	[]                       
Conditional packages	{u'zsh': u'zip'}         


[root@preethi ~]# pulp-admin packagegroup delete_package --repoid=f13 -n zsh --id=testing 
Unable to delete [zsh] from group [testing] in repository [f13]

[root@preethi ~]# pulp-admin packagegroup delete_package --repoid=f13 -n zsh --id=testing -t conditional 
Package [zsh] deleted from group [testing] in repository [f13]


[root@preethi ~]# pulp-admin packagegroup info --repoid=f13  --id=testing +------------------------------------------+
          Package Group Information
+------------------------------------------+

Name                	testing                  
Id                  	testing                  
Mandatory packages  	[]                       
Default packages    	[]                       
Optional packages   	[]                       
Conditional packages	{}

Comment 5 Preethi Thomas 2011-08-16 13:59:28 UTC
Closing with Community Release 15

pulp-0.0.223-4.