prefer visible upgrades to masked upgrades
authorgenone <genone@gentoo.org>
Wed, 30 May 2007 17:55:28 +0000 (17:55 -0000)
committergenone <genone@gentoo.org>
Wed, 30 May 2007 17:55:28 +0000 (17:55 -0000)
svn path=/; revision=404

trunk/ChangeLog
trunk/src/glsa-check/glsa.py

index 442a1a8964a3e49ef6f622aabd0a8cb6e94d6fb6..fd53aed697a2ab9249f71a663dbfa51db6c9e0f2 100644 (file)
@@ -2,6 +2,7 @@
        * glsa-check: check SLOT when selecting and displaying upgrades
        * glsa-check: new --emergelike option to use the best version 
        within the same SLOT instead of the one with the smallest delta.
+       * glsa-check: prefer visible upgrades to masked upgrades
 
 2007-05-21: Paul Varner <fuzzyray@gentoo.org>
        * echangelog: Add patch from genstef to fix issues from Bug 176337
index 87a39e4cf5446bd6612c594e89c256f27b48e444..32cde7e6df740bcf1f5454186818b4ef2deb67bc 100644 (file)
@@ -386,7 +386,10 @@ def getMinUpgrade(vulnerableList, unaffectedList, minimize=True):
                        c_pv = portage.catpkgsplit(c)
                        i_pv = portage.catpkgsplit(portage.best(v_installed))
                        if portage.pkgcmp(c_pv[1:], i_pv[1:]) > 0 \
-                                       and (rValue == None or (minimize ^ (portage.pkgcmp(c_pv[1:], portage.catpkgsplit(rValue)[1:]) > 0))) \
+                                       and (rValue == None \
+                                               or not match("="+rValue, "porttree") \
+                                               or (minimize ^ (portage.pkgcmp(c_pv[1:], portage.catpkgsplit(rValue)[1:]) > 0)) \
+                                                       and match("="+c, "porttree")) \
                                        and portage.db["/"]["porttree"].dbapi.aux_get(c, ["SLOT"]) == portage.db["/"]["vartree"].dbapi.aux_get(portage.best(v_installed), ["SLOT"]):
                                rValue = c_pv[0]+"/"+c_pv[1]+"-"+c_pv[2]
                                if c_pv[3] != "r0":             # we don't like -r0 for display