Bug 192851 - Allowing removal of '%packages' text in some circumstances
Allowing removal of '%packages' text in some circumstances
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: pykickstart (Show other bugs)
5
All Linux
medium Severity medium
: ---
: ---
Assigned To: Chris Lumens
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2006-05-23 12:23 EDT by James Martin
Modified: 2007-11-30 17:11 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2006-05-23 16:26:53 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description James Martin 2006-05-23 12:23:12 EDT
If self.ksdata.groupList,self.ksdata.packageList, and self.ksdata.excludedList
aren't populated, the kickstart file that is generated still yields:

"%packages"

I would expect it not to yield anything because perhaps you want the package
install to be manual (which is the case in some of my testing).. Therefore, I
propose something like this:

#data.py
    def doPackages(self):
        if self.ksdata.upgrade:
            return

        if len(self.ksdata.groupList) == 0 and len(self.ksdata.packageList) == 0
or len(self.ksdata.excludedList) == 0:
            retval = "#No Packages selected"
        else:
            retval = "\n%packages\n"
Comment 1 James Martin 2006-05-23 12:24:55 EDT
typo, code should be:

    def doPackages(self):
        if self.ksdata.upgrade:
            return

        if len(self.ksdata.groupList) == 0 and len(self.ksdata.packageList) == 0
and len(self.ksdata.excludedList) == 0:
            retval = "#No Packages selected"
        else:
            retval = "\n%packages\n"

Comment 2 James Martin 2006-05-23 12:27:54 EDT
Doh. that's in writer.py, not in data.py, sorry for the confusion.
Comment 3 Chris Lumens 2006-05-23 16:26:53 EDT
Good idea.  Committed to pykickstart, and I'll commit the anaconda portions once
we get some other things out of the way first.

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