Bug 554717 - RFE: Better groups exclusion support
RFE: Better groups exclusion support
Product: Fedora
Classification: Fedora
Component: pykickstart (Show other bugs)
All Linux
low Severity medium
: ---
: ---
Assigned To: Chris Lumens
Fedora Extras Quality Assurance
Depends On:
Blocks: 555311 558516
  Show dependency treegraph
Reported: 2010-01-12 08:31 EST by Alexander Todorov
Modified: 2010-07-01 16:57 EDT (History)
1 user (show)

See Also:
Fixed In Version: pykickstart-1.68-1
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 555311 (view as bug list)
Last Closed: 2010-07-01 16:57:54 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Alexander Todorov 2010-01-12 08:31:23 EST
Description of problem:
pykickstart does not support exclusion of groups that were not previously added in the %packages section. 

Red Hat QE needs this so that we can execute test cases such as:

Version-Release number of selected component (if applicable):

Additional info:
Package exclusion works the same way we'd like groups exclusion to work. For example:

Patch proposed by by James Laska and tested:
--- /usr/lib/python2.5/site-packages/pykickstart/parser.py	2010-01-07
04:16:41.000000000 -0500
+++ /tmp/parser.py	2010-01-07 04:16:29.000000000 -0500
@@ -365,4 +365,3 @@
-                else:
-                    newExcludedSet.add(stripped[1:])
+                newExcludedSet.add(stripped[1:])
Comment 1 Chris Lumens 2010-01-13 14:25:23 EST
Has this actually been tested in an install?  I don't see how just adding the excluded group to newExcludedSet is going to help.  That'll mean the group name gets into self.excludedList, which then gets passed on to YumBackend.deselectPackage.  I don't think that's doing anything magic to iterate over the packages in a group, or knows to deselect the group as opposed to a package.

It almost seems like we need an extra list here of groups to exclude, then call the appropriate thing in anaconda.  Of course, I could just not be following the patch correctly.
Comment 2 Alexander Todorov 2010-01-14 05:05:22 EST
(In reply to comment #1)
> Has this actually been tested in an install?  

No. What I meant is that we've tested that pykickstart with this patch will generate a proper ks.cfg file. 

I've started a test job with manually created ks.cfg file to see how anaconda will interpret it. It's likely that anaconda will require another fix or modification of this patch.
Comment 5 Chris Lumens 2010-01-14 09:57:15 EST
Can you attach a test script and example of what a "proper ks.cfg file" looks like?  I want to test an alternate patch here and make sure we get the same results.
Comment 6 Alexander Todorov 2010-01-14 11:02:18 EST
A test script is the following SNAKE template:

from pykickstart.version import FC6
from installdefaults import InstallKs

# minimal install, procedural style
def ks(**context):
    '''Package set / Everything'''

    if ks.version <= FC6:


    return ks

The result should contain (along with other default values):

Comment 9 Chris Lumens 2010-01-14 13:44:01 EST
Okay, fixing this to work in anaconda too makes things a whole lot more complicated, but I think I've managed to make sense of it all.  This should now work like you want both in pykickstart's __str__ methods and in anaconda.
Comment 10 Alexander Todorov 2010-01-15 03:34:43 EST
can you post your patch or an updates.img for RHEL5.5 so I can give it a try?
Comment 11 Alexander Todorov 2010-01-19 13:20:56 EST
This works OK for QE. snake.test server now generates a ks.cfg with

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