diff options
author | Chris Lumens <clumens@redhat.com> | 2007-04-10 20:17:02 +0000 |
---|---|---|
committer | Chris Lumens <clumens@redhat.com> | 2007-04-10 20:17:02 +0000 |
commit | 1879860012a5550ab79e4404713bc02db5a481b4 (patch) | |
tree | 1420651e0f1a4a4b42d096828d6961f7b135234d /yuminstall.py | |
parent | 8ae7a0fb0fbdff600d6b4bfa5f375f1be4e3806d (diff) | |
download | anaconda-1879860012a5550ab79e4404713bc02db5a481b4.tar.gz anaconda-1879860012a5550ab79e4404713bc02db5a481b4.tar.xz anaconda-1879860012a5550ab79e4404713bc02db5a481b4.zip |
Don't write out remove lines for packages that don't exist on the installation
arch.
Diffstat (limited to 'yuminstall.py')
-rw-r--r-- | yuminstall.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/yuminstall.py b/yuminstall.py index ff20d2226..ae548dec6 100644 --- a/yuminstall.py +++ b/yuminstall.py @@ -1285,6 +1285,11 @@ class YumBackend(AnacondaBackend): installed = [] removed = [] + # Faster to grab all the package names up front rather than call + # searchNevra in the loop below. + allPkgNames = map(lambda pkg: pkg.name, self.ayum.pkgSack.returnPackages()) + allPkgNames.sort() + self.ayum.tsInfo.makelists() txmbrNames = map (lambda x: x.name, self.ayum.tsInfo.getMembers()) @@ -1300,8 +1305,7 @@ class YumBackend(AnacondaBackend): defaults = grp.default_packages.keys() + grp.mandatory_packages.keys() optionals = grp.optional_packages.keys() - for pkg in filter(lambda x: x in defaults and not x in txmbrNames, - grp.packages): + for pkg in filter(lambda x: x in defaults and (not x in txmbrNames and x in allPkgNames), grp.packages): removed.append(pkg) for pkg in filter(lambda x: x in txmbrNames, optionals): |