Bug 192851 - Allowing removal of '%packages' text in some circumstances
Summary: Allowing removal of '%packages' text in some circumstances
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: pykickstart   
(Show other bugs)
Version: 5
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Chris Lumens
QA Contact:
URL:
Whiteboard:
Keywords:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2006-05-23 16:23 UTC by James Martin
Modified: 2007-11-30 22:11 UTC (History)
0 users

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


Attachments (Terms of Use)

Description James Martin 2006-05-23 16:23:12 UTC
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 16:24:55 UTC
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 16:27:54 UTC
Doh. that's in writer.py, not in data.py, sorry for the confusion.

Comment 3 Chris Lumens 2006-05-23 20:26:53 UTC
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.