[yum-commits] Branch 'yum-3_2_X' - yum/__init__.py
skvidal at osuosl.org
skvidal at osuosl.org
Fri Mar 13 19:08:41 UTC 2009
yum/__init__.py | 12 ++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)
New commits:
commit 3b054c7779a5e7756187b6daa7babe08c5333606
Author: Seth Vidal <skvidal at fedoraproject.org>
Date: Fri Mar 13 15:05:08 2009 -0400
- make sure we add the conditionals properly when we first selectgroup()
- when we deselectGroup() make sure we clean up the conditionally-added pkgs
diff --git a/yum/__init__.py b/yum/__init__.py
index 06b140d..cb0795c 100644
--- a/yum/__init__.py
+++ b/yum/__init__.py
@@ -2101,11 +2101,17 @@ class YumBase(depsolve.Depsolve):
except Errors.InstallError:
# we don't care if the package doesn't exist
continue
+ else:
+ if cond not in self.tsInfo.conditionals:
+ self.tsInfo.conditionals[cond]=[]
+
txmbrs_used.extend(txmbrs)
for txmbr in txmbrs:
txmbr.groups.append(thisgroup.groupid)
+ self.tsInfo.conditionals[cond].append(txmbr.po)
continue
- # Otherwise we hook into tsInfo.add
+ # Otherwise we hook into tsInfo.add to make
+ # sure we'll catch it if its added later in this transaction
pkgs = self.pkgSack.searchNevra(name=condreq)
if pkgs:
if rpmUtils.arch.isMultiLibArch():
@@ -2153,8 +2159,10 @@ class YumBase(depsolve.Depsolve):
# if there aren't any other groups mentioned then remove the pkg
if len(txmbr.groups) == 0:
self.tsInfo.remove(txmbr.po.pkgtup)
+
+ for pkg in self.tsInfo.conditionals.get(txmbr.name, []):
+ self.tsInfo.remove(pkg.pkgtup)
-
def getPackageObject(self, pkgtup):
"""retrieves a packageObject from a pkgtuple - if we need
More information about the Yum-commits
mailing list