Merged from trunk 5758:5768
authorFabian Groffen <grobian@gentoo.org>
Sat, 27 Jan 2007 22:54:55 +0000 (22:54 -0000)
committerFabian Groffen <grobian@gentoo.org>
Sat, 27 Jan 2007 22:54:55 +0000 (22:54 -0000)
Add new ** for package.keywords token to bypass keyword visibility layer
(genone)

Update package.keywords section in portage(5) with info about new **
token (genone)

For bug #142279, detect and warn about null bytes in CONTENTS.

Fix broken line number counting for CONTENTS.

demote KEYWORDS.missing to a warning to make KEYWORDS='' valid (genone)

svn path=/main/branches/prefix/; revision=5797

NEWS
bin/repoman
man/portage.5
pym/portage.py

diff --git a/NEWS b/NEWS
index 562636bab6ddab528e8b7cf9f5fe638e61c64e1f..222b0c5623da37015408a9ecc7eaac08b959623b 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -1,7 +1,13 @@
 News (mainly features/major bug fixes)
 
+portage-2.1.3
+-------------
+
+* Allow per-module setting of PORTAGE_ELOG_CLASSES
+* Add ** as new token for package.keywords to bypass the keyword visibility layer
+
 portage-2.1.2
-------------
+-------------
 
 * Ebuilds support default USE flags via +flag in IUSE.
 * New-style virtuals are now usable for packages that depend on themselves for
@@ -32,7 +38,7 @@ portage-2.1.2
 * FEATURES="test" automatically implies USE="test".
 
 portage-2.1.1
-------------
+-------------
 
 * Profiles support use.force, package.use.force, and package.use.mask files.
 
index dcb6fe45a37badab069f2b41d107c9eda5a84a11..8d44247d6e12e07aa0bc8e87788623faa4620bb2 100755 (executable)
@@ -200,6 +200,7 @@ qawarnings=[
 "DEPEND.badmaskedindev","RDEPEND.badmaskedindev","PDEPEND.badmaskedindev",
 "IUSE.invalid",
 "KEYWORDS.stupid",
+"KEYWORDS.missing",
 "ebuild.minorsyn",
 "ebuild.badheader",
 "file.size",
index 66547521e302907ca07a8bf1f154c2a0e3a645dd..4b19dc90936923e0dc46fa870cd07c140eefdcdc 100644 (file)
@@ -384,13 +384,9 @@ Per\-package KEYWORDS.  Useful for mixing unstable packages in with a normally
 stable system or vice versa.  This will allow ACCEPT_KEYWORDS to be augmented
 for a single package.
 
-.nf
-\fINote:\fR There are two special KEYWORDS to help out here:
-\fB*\fR  Match any stable KEYWORD
-\fB~*\fR Match any unstable KEYWORD
-
 .I Format:
-\- comments begin with #
+.nf
+\- comment lines begin with # (no inline comments)
 \- one DEPEND atom per line followed by additional KEYWORDS
 \- lines without any KEYWORDS imply unstable host arch
 
@@ -403,6 +399,17 @@ media\-video/mplayer \-~x86
 net-analyzer/netcat
 .fi
 
+.I Note:
+.fi
+In addition to the normal values from ACCEPT_KEYWORDS package.keywords supports
+three special tokens:
+
+.nf
+\fB*\fR  package is visible if it is stable on any architecture
+\fB~*\fR package is visible if it is in testing on any architecture
+\fB**\fR package is always visible (KEYWORDS are ignored completely)
+.fi
+
 .I Additional Note:
 If you encounter the \fB-*\fR KEYWORD, this indicates that the package is known 
 to be broken on all systems which are not otherwise listed in KEYWORDS.  For 
@@ -410,10 +417,11 @@ example, a binary only package which is built for x86 will look like:
 
 games-fps/quake3-demo-1.11.ebuild:KEYWORDS="-* x86"
 
-If you wish to accept this package anyways, then add \fB-*\fR to your 
+If you wish to accept this package anyways, then use one of the other keywords in your 
 package.keywords like this:
 
-games-fps/quake3-demo -*
+games-fps/quake3-demo x86
+
 .TP
 .BR package.mask
 A list of package atoms to mask.  Useful if specific versions of packages do
@@ -422,7 +430,7 @@ versions earlier than 1.0.4496.  No problem!
 
 .I Format:
 .nf
-\- comments begin with #
+\- comment lines begin with # (no inline comments)
 \- one DEPEND atom per line
 .fi
 
index ac2b0df7bab971f289f97ff9d2b4e3444f185e06..1c0f0b441f7345db318d4ff7b2f302787a740829 100644 (file)
@@ -6219,6 +6219,8 @@ class portdbapi(dbapi):
                                if matches:
                                        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("-"):
                                                        try:
                                                                inc_pgroups.remove(x[1:])
@@ -6243,7 +6245,7 @@ class portdbapi(dbapi):
                                        hastesting = True
                                elif gp[0] != "-":
                                        hasstable = True
-                       if not match and ((hastesting and "~*" in pgroups) or (hasstable and "*" in pgroups)):
+                       if not match and ((hastesting and "~*" in pgroups) or (hasstable and "*" in pgroups) or "**" in pgroups):
                                match=1
                        if match and eapi_is_supported(eapi):
                                newlist.append(mycpv)
@@ -6805,8 +6807,17 @@ class dblink:
                myc=open(self.dbdir+"/CONTENTS","r")
                mylines=myc.readlines()
                myc.close()
-               pos=1
+               null_byte = "\0"
+               contents_file = os.path.join(self.dbdir, "CONTENTS")
+               pos = 0
                for line in mylines:
+                       pos += 1
+                       if null_byte in line:
+                               # Null bytes are a common indication of corruption.
+                               writemsg("!!! Null byte found in contents " + \
+                                       "file, line %d: '%s'\n" % (pos, contents_file),
+                                       noiselevel=-1)
+                               continue
                        mydat = line.split()
                        # we do this so we can remove from non-root filesystems
                        # (use the ROOT var to allow maintenance on other partitions)
@@ -6845,7 +6856,6 @@ class dblink:
                                        return None
                        except (KeyError,IndexError):
                                print "portage: CONTENTS line",pos,"corrupt!"
-                       pos += 1
                self.contentscache=pkgfiles
                return pkgfiles