Red Hat Bugzilla – Full Text Bug Listing
|Summary:||RFE: Better groups exclusion support|
|Product:||[Fedora] Fedora||Reporter:||Alexander Todorov <atodorov>|
|Component:||pykickstart||Assignee:||Chris Lumens <clumens>|
|Status:||CLOSED CURRENTRELEASE||QA Contact:||Fedora Extras Quality Assurance <extras-qa>|
|Fixed In Version:||pykickstart-1.68-1||Doc Type:||Bug Fix|
|Doc Text:||Story Points:||---|
|:||555311 (view as bug list)||Environment:|
|Last Closed:||2010-07-01 16:57:54 EDT||Type:||---|
|oVirt Team:||---||RHEL 7.3 requirements from Atomic Host:|
|Bug Depends On:|
|Bug Blocks:||555311, 558516|
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: %packages @everything -@conflicts Version-Release number of selected component (if applicable): rawhide Additional info: Package exclusion works the same way we'd like groups exclusion to work. For example: %packages @everything -java* 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 @@ pass - else: - newExcludedSet.add(stripped[1:]) + newExcludedSet.add(stripped[1:]) else:
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''' ks=InstallKs() if ks.version <= FC6: ks.packages.add(['@everything']) else: ks.packages.add(['*']) ks.packages.add(['-@conflicts']) return ks The result should contain (along with other default values): %packages * -@conflicts
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
Chris, 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 %packages * -@conflicts