Bug 623429
| Summary: | --type option in packagegroup delete_package | ||
|---|---|---|---|
| Product: | [Retired] Pulp | Reporter: | Preethi Thomas <pthomas> |
| Component: | z_other | Assignee: | John Matthews <jmatthew> |
| Status: | CLOSED CURRENTRELEASE | QA Contact: | Preethi Thomas <pthomas> |
| Severity: | medium | Docs Contact: | |
| Priority: | low | ||
| Version: | unspecified | CC: | pkilambi, whayutin |
| Target Milestone: | --- | Keywords: | Triaged |
| 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 14:02:57 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 | ||
status report from server needs to be fixed to report valid error messages. Will be in pulp testing build 0.75 Most of this functionality was addressed with a prior commit, but an issue with conditional package deletes was seen while testing this, below is the fix for the conditional case. http://git.fedorahosted.org/git/?p=pulp.git;a=commit;h=702cea7ff1f69b0f157dc1008294b146b6d78372 If "--type" is not specified it uses the value "default" $ sudo pulp-admin -u admin -p admin packagegroup info --repoid vt --id jwm +------------------------------------------+ Package Group Information +------------------------------------------+ Name jwm Id jwm Mandatory packages [u'mand_pkg1', u'mand_pkg', u'mand_pkg2', u'mand_pkg3'] Default packages [u'dflt_pkg1', u'dflt_pkg2'] Optional packages [] Conditional packages {u'cond_pkg1': u'reqpkg'} $ sudo pulp-admin -u admin -p admin packagegroup delete_package --repoid vt --id jwm -n mand_pkg1 Unable to delete [mand_pkg1] from group [jwm] in repository [vt] $ sudo pulp-admin -u admin -p admin packagegroup delete_package --repoid vt --id jwm -n mand_pkg1 --type mandatory Package [mand_pkg1] deleted from group [jwm] in repository [vt] Fixed in 0.75. [root@preethi ~]# pulp-admin packagegroup delete_package --repoid=f13_test_relative --id=preethi --name=mand_pkg1
Unable to delete [mand_pkg1] from group [preethi] in repository [f13_test_relative]
[root@preethi ~]#
[root@preethi ~]# pulp-admin packagegroup delete_package --repoid=f13_test_relative --id=preethi --name=mand_pkg4 --type=mandatory
Package [mand_pkg4] deleted from group [preethi] in repository [f13_test_relative]
[root@preethi ~]# pulp-admin packagegroup delete_package --repoid=f13_test_relative --id=preethi --name=opt_pkg2
Unable to delete [opt_pkg2] from group [preethi] in repository [f13_test_relative]
[root@preethi ~]# pulp-admin packagegroup delete_package --repoid=f13_test_relative --id=preethi --name=opt_pkg2 --type=optional
Package [opt_pkg2] deleted from group [preethi] in repository [f13_test_relative]
[root@preethi ~]# pulp-admin packagegroup info --repoid=f13_test_relative --id=preethi
+------------------------------------------+
Package Group Information
+------------------------------------------+
Name preethi
Id preethi
Mandatory packages [u'mand_pkg1', u'mand_pkg2', u'mand_pkg3']
Default packages [u'preethi', u'dflt_pkg1', u'dflt_pkg2']
Optional packages [u'opt_pkg1']
Conditional packages {u'cond_pkg1': u'reqpkg'}
[root@preethi ~]# pulp-admin packagegroup delete_package --repoid=f13_test_relative --id=preethi --name=preethi
Package [preethi] deleted from group [preethi] in repository [f13_test_relative]
[root@preethi ~]# pulp-admin packagegroup info --repoid=f13_test_relative --id=preethi
+------------------------------------------+
Package Group Information
+------------------------------------------+
Name preethi
Id preethi
Mandatory packages [u'mand_pkg1', u'mand_pkg2', u'mand_pkg3']
Default packages [u'dflt_pkg1', u'dflt_pkg2']
Optional packages [u'opt_pkg1']
Conditional packages {u'cond_pkg1': u'reqpkg'}
[root@preethi ~]# pulp-admin packagegroup delete_package --repoid=f13_test_relative --id=preethi --name=cond_pkg1 --type=conditional
Package [cond_pkg1] deleted from group [preethi] in repository [f13_test_relative]
[root@preethi ~]# pulp-admin packagegroup info --repoid=f13_test_relative --id=preethi
+------------------------------------------+
Package Group Information
+------------------------------------------+
Name preethi
Id preethi
Mandatory packages [u'mand_pkg1', u'mand_pkg2', u'mand_pkg3']
Default packages [u'dflt_pkg1', u'dflt_pkg2']
Optional packages [u'opt_pkg1']
Conditional packages {}
Closing with Community Release 15 pulp-0.0.223-4. |
Description of problem: --type is stated as an option for pulp packagegroup delete_package. But if you run it without it for a package in the mandatory or optional group, the message says successfully deleted but they are not actually removed. So if the --type is required to delete a mandatory or optional type, running the command without it should error out with appropriate error message. [root@preethi pulp]# pulp -u admin -p admin packagegroup delete_package --repoid=f13 --id=pthomas --pkgname=zip-3.0-1.fc13.x86_64.rpm Package [zip-3.0-1.fc13.x86_64.rpm] deleted from group [pthomas] in repository [f13] [root@preethi pulp]# pulp -u admin -p admin packagegroup info --id=pthomas --repoid=f13 +-------------------------------------------+ Package Group Information +-------------------------------------------+ Name pthomas Id pthomas Mandatory packages [u'zsh-4.3.10-5.fc13.x86_64.rpm', u'zip-3.0-1.fc13.x86_64.rpm'] Default packages [u'zlib-1.2.3-23.fc12.i686.rpm', u'zbar-0.10-2.fc13.x86_64.rpm'] Optional packages [u'zlib-devel-1.2.3-23.fc12.i686.rpm'] Conditional packages {} [root@preethi pulp]# pulp -u admin -p admin packagegroup delete_package --repoid=f13 --id=pthomas --pkgname=zip-3.0-1.fc13.x86_64.rpm --type=mandatory Package [zip-3.0-1.fc13.x86_64.rpm] deleted from group [pthomas] in repository [f13] [root@preethi pulp]# pulp -u admin -p admin packagegroup info --id=pthomas --repoid=f13 +-------------------------------------------+ Package Group Information +-------------------------------------------+ Name pthomas Id pthomas Mandatory packages [u'zsh-4.3.10-5.fc13.x86_64.rpm'] Default packages [u'zlib-1.2.3-23.fc12.i686.rpm', u'zbar-0.10-2.fc13.x86_64.rpm'] Optional packages [u'zlib-devel-1.2.3-23.fc12.i686.rpm'] Conditional packages {} [root@preethi pulp]# pulp -u admin -p admin packagegroup delete_package --repoid=f13 --id=pthomas --pkgname=zbar-0.10-2.fc13.x86_64.rpm Package [zbar-0.10-2.fc13.x86_64.rpm] deleted from group [pthomas] in repository [f13] [root@preethi pulp]# pulp -u admin -p admin packagegroup info --id=pthomas --repoid=f13 +-------------------------------------------+ Package Group Information +-------------------------------------------+ Name pthomas Id pthomas Mandatory packages [u'zsh-4.3.10-5.fc13.x86_64.rpm'] Default packages [u'zlib-1.2.3-23.fc12.i686.rpm'] Optional packages [u'zlib-devel-1.2.3-23.fc12.i686.rpm'] Conditional packages {} [root@preethi pulp]# pulp -u admin -p admin packagegroup delete_package --repoid=f13 --id=pthomas --pkgname=zlib-devel-1.2.3-23.fc12.i686.rpm Package [zlib-devel-1.2.3-23.fc12.i686.rpm] deleted from group [pthomas] in repository [f13] [root@preethi pulp]# pulp -u admin -p admin packagegroup info --id=pthomas --repoid=f13 +-------------------------------------------+ Package Group Information +-------------------------------------------+ Name pthomas Id pthomas Mandatory packages [u'zsh-4.3.10-5.fc13.x86_64.rpm'] Default packages [u'zlib-1.2.3-23.fc12.i686.rpm'] Optional packages [u'zlib-devel-1.2.3-23.fc12.i686.rpm'] Conditional packages {}