Bug 623272 - unsupported type "Conditional" existing in packagegroup
Summary: unsupported type "Conditional" existing in packagegroup
Alias: None
Product: Pulp
Classification: Retired
Component: z_other   
(Show other bugs)
Version: unspecified
Hardware: All
OS: Linux
Target Milestone: ---
: ---
Assignee: John Matthews
QA Contact: Preethi Thomas
Keywords: FutureFeature, QA-Closed, Triaged
Depends On:
TreeView+ depends on / blocked
Reported: 2010-08-11 18:29 UTC by Preethi Thomas
Modified: 2011-07-15 19:29 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2010-10-20 16:11:38 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

Description Preethi Thomas 2010-08-11 18:29:04 UTC
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]

  -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.

Comment 1 Pradeep Kilambi 2010-08-17 14:44:51 UTC
Future Feature

Comment 2 Todd Sanders 2010-09-24 15:10:55 UTC
Aligned to Sprint 16

Comment 3 John Matthews 2010-10-14 13:23:28 UTC
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 
    <name>Afrikaans Support</name>
      <packagereq requires='aspell' type='conditional'>aspell-af</packagereq>

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:


CLI Arguments:

pulp-admin -u USER -p PASS packagegroup add_package --repoid repo1 --id afrikaans-support --type conditional --requires 'aspell' -n 'aspell-af'

Comment 4 Jay Dobies 2010-10-15 12:24:15 UTC
Fixed in the 0.73 release.

Comment 5 John Matthews 2010-10-15 12:48:03 UTC
This will be in 0.74

Comment 6 Jay Dobies 2010-10-15 18:52:43 UTC
Included in build 0.74.

Comment 7 Preethi Thomas 2010-10-18 20:35:40 UTC

[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]: 

[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'}

Comment 8 Preethi Thomas 2010-10-20 16:11:38 UTC
Closed after review.

Note You need to log in before you can comment on or make changes to this bug.