Handle %packages --default to pick up the default groups.
This commit is contained in:
parent
15efef64fa
commit
b929b89835
@ -315,6 +315,16 @@ class Pungi(pypungi.PungiBase):
|
|||||||
|
|
||||||
return packages
|
return packages
|
||||||
|
|
||||||
|
def _addDefaultGroups(self):
|
||||||
|
"""Cycle through the groups and return at list of the ones that ara
|
||||||
|
default."""
|
||||||
|
|
||||||
|
# This is mostly stolen from anaconda.
|
||||||
|
groups = map(lambda x: x.groupid,
|
||||||
|
filter(lambda x: x.default, self.ayum.comps.groups))
|
||||||
|
self.logger.debug('Add default groups %s' % groups)
|
||||||
|
return groups
|
||||||
|
|
||||||
def getPackageObjects(self):
|
def getPackageObjects(self):
|
||||||
"""Cycle through the list of packages, get package object
|
"""Cycle through the list of packages, get package object
|
||||||
matches, and resolve deps.
|
matches, and resolve deps.
|
||||||
@ -332,6 +342,11 @@ class Pungi(pypungi.PungiBase):
|
|||||||
# Always add the core group
|
# Always add the core group
|
||||||
self.ksparser.handler.packages.add(['@core'])
|
self.ksparser.handler.packages.add(['@core'])
|
||||||
|
|
||||||
|
# Check to see if we want all the defaults
|
||||||
|
if self.ksparser.handler.packages.default:
|
||||||
|
for group in self._addDefaultGroups():
|
||||||
|
self.ksparser.handler.packages.add(['@%s' % group])
|
||||||
|
|
||||||
# Check to see if we need the base group
|
# Check to see if we need the base group
|
||||||
if self.ksparser.handler.packages.addBase:
|
if self.ksparser.handler.packages.addBase:
|
||||||
self.ksparser.handler.packages.add(['@base'])
|
self.ksparser.handler.packages.add(['@base'])
|
||||||
|
Loading…
Reference in New Issue
Block a user