Fix -* handling in gvisible to match incremental semantics
authorMarius Mauch <genone@gentoo.org>
Mon, 30 Apr 2007 03:16:06 +0000 (03:16 -0000)
committerMarius Mauch <genone@gentoo.org>
Mon, 30 Apr 2007 03:16:06 +0000 (03:16 -0000)
svn path=/main/trunk/; revision=6459

NEWS
RELEASE-NOTES
pym/portage/__init__.py
pym/portage/dbapi/porttree.py

diff --git a/NEWS b/NEWS
index c73f3acb5a62fe32e2dec03f745f456dd4441f62..1fcb296c28a66e1a11c9071b1f27eb27303fd74b 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -10,6 +10,10 @@ portage-2.1.3
 * Namespace sanitizing: move all portage related code into portage.* namespace,
   rename portage_foo modules to portage.foo (but keep symlinks for compability)
 * Add license visibility filtering (GLEP 23)
+* Add new elog module "echo" to simply display messages when emerge exits
+* Enable "echo" and "save_summary" elog modules by default
+* Fix -* handling in package.keywords to work as intended (reset the accepted 
+  keywords list), also see RELEASE-NOTES.
 
 portage-2.1.2
 -------------
index 88335040339cec2e9cc8c6e0aba9e1327450c6a2..eba5316e933c3fd46b6f055a54623a75bf7d5298 100644 (file)
@@ -7,6 +7,16 @@ portage-2.1.3
 * The python namespace for portage has been sanitized, all portage related code
   is now contained within the portage namespace. External script should be updated
   accordingly, though links exist for backward compability.
+* The "save_summary" and "echo" elog modules are now enabled by default. Setting
+  PORTAGE_ELOG_SYSTEM in make.conf will override this, so if you don't want elog
+  set PORTAGE_ELOG_SYSTEM="" in make.conf
+* -* support in package.keywords was changed as it was inconsistent with 
+  ACCEPT_KEYWORDS behavior (also see http://dev.gentoo.org/~genone/docs/KEYWORDS.stupid).
+  Previously having -* in package.keywords matched packages with KEYWORDS="-*", 
+  now it resets the ACCEPT_KEYWORDS list for the given atom like it does when
+  used in ACCEPT_KEYWORDS.
+  For packages that don't specify any other KEYWORDS you can use the new ** token
+  as documented in portage(5) to disable KEYWORDS filtering completely.
 
 portage-2.1.2
 ==================================
index 04294ce1241cc1b734436a695c65999bd564bfcb..5e6e27521ecef4e0410ba0a9fdb7a91bb915aca7 100644 (file)
@@ -4693,12 +4693,14 @@ def getmaskingstatus(mycpv, settings=None, portdb=None):
                if matches:
                        inc_pgroups = []
                        for x in pgroups:
-                               if x != "-*" and x.startswith("-"):
+                               if x == "-*":
+                                       inc_pgroups = []
+                               elif x[0] == "-":
                                        try:
                                                inc_pgroups.remove(x[1:])
                                        except ValueError:
                                                pass
-                               if x not in inc_pgroups:
+                               elif x not in inc_pgroups:
                                        inc_pgroups.append(x)
                        pgroups = inc_pgroups
                        del inc_pgroups
@@ -4715,10 +4717,10 @@ def getmaskingstatus(mycpv, settings=None, portdb=None):
                        if gp=="*":
                                kmask=None
                                break
-                       elif gp=="-"+myarch:
+                       elif gp=="-"+myarch and myarch in pgroups:
                                kmask="-"+myarch
                                break
-                       elif gp=="~"+myarch:
+                       elif gp=="~"+myarch and myarch in pgroups:
                                kmask="~"+myarch
                                break
 
index ad6ccc45a3888016179bd0a821442a60842569b3..16e962a85de14bf74eed14dabd853ce4f2059290 100644 (file)
@@ -668,24 +668,26 @@ class portdbapi(dbapi):
                                for atom in matches:
                                        pgroups.extend(pkgdict[cp][atom])
                                if matches:
+                                       # normalize pgroups with incrementals logic so it 
+                                       # matches ACCEPT_KEYWORDS behavior
                                        inc_pgroups = []
                                        for x in pgroups:
-                                               # The -* special case should be removed once the tree 
-                                               # is clean of KEYWORDS=-* crap
-                                               if x != "-*" and x.startswith("-"):
+                                               if x == "-*":
+                                                       inc_pgroups = []
+                                               elif x[0] == "-":
                                                        try:
                                                                inc_pgroups.remove(x[1:])
                                                        except ValueError:
                                                                pass
-                                               if x not in inc_pgroups:
+                                               elif x not in inc_pgroups:
                                                        inc_pgroups.append(x)
                                        pgroups = inc_pgroups
                                        del inc_pgroups
                        hasstable = False
                        hastesting = False
                        for gp in mygroups:
-                               if gp=="*":
-                                       writemsg("--- WARNING: Package '%s' uses '*' keyword.\n" % mycpv,
+                               if gp == "*" or (gp == "-*" and len(mygroups) == 1):
+                                       writemsg("--- WARNING: Package '%s' uses '%s' keyword.\n" % (mycpv, gp),
                                                noiselevel=-1)
                                        match=1
                                        break