yifengyou / rpms / yum

Forked from rpms/yum 4 years ago
Clone

Blame SOURCES/BZ-1168385-group-conditionals-deselect.patch

5e9bef
commit 0df9058960d3fa24aa7695a4a14524127cc0e9be
5e9bef
Author: Valentina Mukhamedzhanova <vmukhame@redhat.com>
5e9bef
Date:   Tue Apr 21 08:44:52 2015 +0200
5e9bef
5e9bef
    Fix tsInfo.conditionals in deselect() when the package is not yet in the transaction BZ#1168385
5e9bef
5e9bef
diff --git a/AUTHORS b/AUTHORS
5e9bef
index 71845e1..350e136 100644
5e9bef
--- a/AUTHORS
5e9bef
+++ b/AUTHORS
5e9bef
@@ -24,6 +24,7 @@ YUM AUTHORS
5e9bef
     James Antill
5e9bef
     Panu Matilainen
5e9bef
     Tambet Ingo
5e9bef
+    Valentina Mukhamedzhanova
5e9bef
 
5e9bef
 
5e9bef
 Original Yup people:
5e9bef
diff --git a/yum/transactioninfo.py b/yum/transactioninfo.py
5e9bef
index 9ce5025..ec2c7cb 100644
5e9bef
--- a/yum/transactioninfo.py
5e9bef
+++ b/yum/transactioninfo.py
5e9bef
@@ -237,6 +237,7 @@ class TransactionData:
5e9bef
         if not txmbrs:
5e9bef
             if self._inSack is not None:
5e9bef
                 pkgs = self._inSack.returnPackages(patterns=[pattern])
5e9bef
+            if pkgs: pass
5e9bef
             elif self.pkgSack is None:
5e9bef
                 pkgs = []
5e9bef
             else:
5e9bef
commit c8b564968286ffccbd46beeb40c95d5e1c74a2aa
5e9bef
Author: Valentina Mukhamedzhanova <vmukhame@redhat.com>
5e9bef
Date:   Mon Jul 13 13:45:45 2015 +0200
5e9bef
5e9bef
    Fix UnboundLocalError in deselect()
5e9bef
5e9bef
diff --git a/yum/transactioninfo.py b/yum/transactioninfo.py
5e9bef
index ec2c7cb..8d47caa 100644
5e9bef
--- a/yum/transactioninfo.py
5e9bef
+++ b/yum/transactioninfo.py
5e9bef
@@ -235,13 +235,13 @@ class TransactionData:
5e9bef
                 txmbrs = self.matchNaevr(na[0], na[1])
5e9bef
 
5e9bef
         if not txmbrs:
5e9bef
+            pkgs = []
5e9bef
             if self._inSack is not None:
5e9bef
                 pkgs = self._inSack.returnPackages(patterns=[pattern])
5e9bef
-            if pkgs: pass
5e9bef
-            elif self.pkgSack is None:
5e9bef
-                pkgs = []
5e9bef
-            else:
5e9bef
+
5e9bef
+            if not pkgs and self.pkgSack is not None:
5e9bef
                 pkgs = self.pkgSack.returnPackages(patterns=[pattern])
5e9bef
+
5e9bef
             if not pkgs:
5e9bef
                 pkgs = self.rpmdb.returnPackages(patterns=[pattern])
5e9bef