Description of problem: [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 add_package --repoid=f13 --id=pthomas --pkgname=zd1211-firmware-1.4-4.fc13.noarch.rpm --type=conditional "Traceback (most recent call last):\n File \"/usr/lib/python2.6/site-packages/pulp/webservices/controllers/base.py\", line 50, in report_error\n return method(self, *args, **kwargs)\n File \"/usr/lib/python2.6/site-packages/pulp/webservices/role_check.py\", line 102, in check_roles\n ret=f(instance, *fargs, **kw)\n File \"/usr/lib/python2.6/site-packages/pulp/webservices/controllers/repositories.py\", line 302, in add_package_to_group\n return self.ok(api.add_package_to_group(id, groupid, pkg_name, gtype))\n File \"/usr/lib/python2.6/site-packages/pulp/auditing.py\", line 191, in _audit\n result = method(*args, **kwargs)\n File \"/usr/lib/python2.6/site-packages/pulp/api/repo.py\", line 403, in add_package_to_group\n raise NotImplementedError(\"No support for creating conditional groups\")\nNotImplementedError: No support for creating conditional groups\n" [root@preethi pulp]# [root@preethi pulp]# [root@preethi pulp]# pulp -u admin -p admin packagegroup add_package --help Usage: pulp -u <username> -p <password> packagegroup add_package [OPTIONS] Options: -h, --help show this help message and exit --repoid=REPOID Repository Label --id=GROUPID Group id --pkgname=PKGNAME Package name --type=GROUPTYPE Type of list to add package to, example 'mandatory', 'optional', 'default' -u USERNAME, --username=USERNAME <REQUIRED> username for access to Pulp. Default user admin is included with base install. -p PASSWORD, --password=PASSWORD <REQUIRED> password for access to Pulp.
Future Feature
Aligned to Sprint 16
Conditional package groups allow a package to be conditionally installed, meaning it will only be installed if a condition is met. The condition is if the 'requires' package is present. Below is a XML snippet of a package group with a conditional type <group> <id>afrikaans-support</id> <name>Afrikaans Support</name> <description/> <default>false</default> <uservisible>false</uservisible> <langonly>af</langonly> <packagelist> <packagereq requires='aspell' type='conditional'>aspell-af</packagereq> </packagelist> </group> If someone runs: "yum groupinstall afrikaans-support" the package 'aspell-af' will only be installed if the requires package, 'aspell' is installed. Below commit contains the git commit: http://git.fedorahosted.org/git/?p=pulp.git;a=commit;h=27c0c414549be80aba0c2c0401e0384aabc7585b CLI Arguments: pulp-admin -u USER -p PASS packagegroup add_package --repoid repo1 --id afrikaans-support --type conditional --requires 'aspell' -n 'aspell-af'
Fixed in the 0.73 release.
This will be in 0.74
Included in build 0.74.
verified [root@preethi ~]# pulp-admin packagegroup add_package --repoid=f13 --id=preethi -n zip --type=conditional --requires zsh Following packages added to group [preethi] in repository [f13] for required package [zsh]: ['zip'] [root@preethi ~]# pulp-admin packagegroup info --repoid=f13 --id=preethi +------------------------------------------+ Package Group Information +------------------------------------------+ Name preethi Id preethi Mandatory packages [] Default packages [u'zsh'] Optional packages [] Conditional packages {u'zip': u'zsh'}
Closed after review.