diff options
author | Matt Wilson <msw@redhat.com> | 2001-08-28 20:32:25 +0000 |
---|---|---|
committer | Matt Wilson <msw@redhat.com> | 2001-08-28 20:32:25 +0000 |
commit | 65c19b84759a777cc5f9666c4b197967f6312bf8 (patch) | |
tree | ad13262f29d21e199fabd3e861dd6e9690454fd8 /comps.py | |
parent | e0cb4e0a74e7f725afdb51908ffdd53d0276daba (diff) | |
download | anaconda-65c19b84759a777cc5f9666c4b197967f6312bf8.tar.gz anaconda-65c19b84759a777cc5f9666c4b197967f6312bf8.tar.xz anaconda-65c19b84759a777cc5f9666c4b197967f6312bf8.zip |
add freeze/thaw to comps. rework pkgorder to get all subcomps of a comp at the same time it gets the comp, to give priority to tier 1 languages only, and exclude kernel-debug from the most important list
Diffstat (limited to 'comps.py')
-rw-r--r-- | comps.py | 37 |
1 files changed, 24 insertions, 13 deletions
@@ -581,8 +581,17 @@ class ComponentSet: comp.setDefaultSelection() def updateSelections(self): - for pkg in self.packages.values(): - pkg.updateSelectionCache() + if not self.frozen: + for pkg in self.packages.values(): + pkg.updateSelectionCache() + + def freeze(self): + self.frozen = self.frozen + 1 + + def thaw(self): + self.frozen = self.frozen - 1 + if not self.frozen: + self.updateSelections() def __repr__(self): s = "" @@ -754,23 +763,25 @@ class ComponentSet: return kernelVersions def __init__(self, file, hdlist, arch = None, matchAllLang = 0): + self.frozen = 0 self.allLangs = matchAllLang self.archList = [] self.verifiedState = None if not arch: import iutil arch = iutil.getArch() - - self.archList.append(arch) - -# always set since with can have i386 arch with i686 arch2, for example -# arch2 = None -# if arch == "sparc" and os.uname ()[4] == "sparc64": -# arch2 = "sparc64" -# - arch2 = os.uname ()[4] - if not arch2 in self.archList: - self.archList.append (arch2) + self.archList.append(arch) + # always set since with can have i386 arch with i686 arch2, + # for example: + # arch2 = None + # if arch == "sparc" and os.uname ()[4] == "sparc64": + # arch2 = "sparc64" + # + arch2 = os.uname ()[4] + if not arch2 in self.archList: + self.archList.append (arch2) + else: + self.archList.append(arch) self.packages = hdlist self.readCompsFile(file, self.packages) |