Gentoo Archives: gentoo-commits

From: "Zac Medico (zmedico)" <zmedico@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] portage r14132 - in main/trunk: bin man
Date: Sun, 23 Aug 2009 16:38:27
Message-Id: E1MfG5J-0001d4-6q@stork.gentoo.org
1 Author: zmedico
2 Date: 2009-08-23 16:38:24 +0000 (Sun, 23 Aug 2009)
3 New Revision: 14132
4
5 Modified:
6 main/trunk/bin/repoman
7 main/trunk/man/repoman.1
8 Log:
9 Add a LIVEVCS.unmasked category for ebuilds that have non-empty KEYWORDS and
10 are not masked in the global package.mask. Thanks to Diego E. Petten?\195?\178 for
11 the suggestion.
12
13
14 Modified: main/trunk/bin/repoman
15 ===================================================================
16 --- main/trunk/bin/repoman 2009-08-23 07:40:57 UTC (rev 14131)
17 +++ main/trunk/bin/repoman 2009-08-23 16:38:24 UTC (rev 14132)
18 @@ -302,6 +302,7 @@
19 "variable.invalidchar":"A variable contains an invalid character that is not part of the ASCII character set",
20 "variable.readonly":"Assigning a readonly variable",
21 "LIVEVCS.stable":"This ebuild is a live checkout from a VCS but has stable keywords.",
22 + "LIVEVCS.unmasked":"This ebuild is a live checkout from a VCS but has keywords and is not masked in the global package.mask.",
23 "IUSE.invalid":"This ebuild has a variable in IUSE that is not in the use.desc or use.local.desc file",
24 "IUSE.undefined":"This ebuild does not define IUSE (style guideline says to define IUSE even when empty)",
25 "LICENSE.invalid":"This ebuild is listing a license that doesnt exist in portages license/ dir.",
26 @@ -362,7 +363,8 @@
27 "virtual.unavailable",
28 "usage.obsolete",
29 "upstream.workaround",
30 -"LIVEVCS.stable"
31 +"LIVEVCS.stable",
32 +"LIVEVCS.unmasked",
33 ))
34
35 non_ascii_re = re.compile(r'[^\x00-\x7f]')
36 @@ -570,6 +572,7 @@
37 kwlist = set()
38 liclist = set()
39 uselist = set()
40 +global_pmasklines = []
41
42 for path in portdb.porttrees:
43 try:
44 @@ -600,6 +603,9 @@
45 if x:
46 uselist.add(use_prefix + x[0])
47
48 + global_pmasklines.append(portage.util.grabfile_package(
49 + os.path.join(path, 'profiles', 'package.mask'), recursive=1))
50 +
51 desc_path = os.path.join(path, 'profiles', 'profiles.desc')
52 try:
53 desc_file = codecs.open(_unicode_encode(desc_path,
54 @@ -635,6 +641,21 @@
55 repoman_settings['PORTAGE_ARCHLIST'] = ' '.join(sorted(kwlist))
56 repoman_settings.backup_changes('PORTAGE_ARCHLIST')
57
58 +global_pmasklines = portage.util.stack_lists(global_pmasklines, incremental=1)
59 +global_pmaskdict = {}
60 +for x in global_pmasklines:
61 + global_pmaskdict.setdefault(portage.dep_getkey(x), []).append(x)
62 +del global_pmasklines
63 +
64 +def has_global_mask(pkg):
65 + mask_atoms = global_pmaskdict.get(pkg.cp)
66 + if mask_atoms:
67 + pkg_list = [pkg]
68 + for x in mask_atoms:
69 + if portage.dep.match_from_list(x, pkg_list):
70 + return x
71 + return None
72 +
73 # Ensure that profile sub_path attributes are unique. Process in reverse order
74 # so that profiles with duplicate sub_path from overlays will override
75 # profiles with the same sub_path from parent repos.
76 @@ -1347,6 +1368,10 @@
77 bad_stable_keywords)
78 del bad_stable_keywords
79
80 + if keywords and not has_global_mask(pkg):
81 + stats["LIVEVCS.unmasked"] += 1
82 + fails["LIVEVCS.unmasked"].append(relative_path)
83 +
84 if options.ignore_arches:
85 arches = [[repoman_settings["ARCH"], repoman_settings["ARCH"],
86 repoman_settings["ACCEPT_KEYWORDS"].split()]]
87
88 Modified: main/trunk/man/repoman.1
89 ===================================================================
90 --- main/trunk/man/repoman.1 2009-08-23 07:40:57 UTC (rev 14131)
91 +++ main/trunk/man/repoman.1 2009-08-23 16:38:24 UTC (rev 14132)
92 @@ -149,6 +149,10 @@
93 .B LIVEVCS.stable
94 Ebuild is a live ebuild (cvs, git, darcs, svn, etc) checkout with stable keywords.
95 .TP
96 +.B LIVEVCS.unmasked
97 +Ebuild is a live ebuild (cvs, git, darcs, svn, etc) checkout but has keywords
98 +and is not masked in the global package.mask.
99 +.TP
100 .B PDEPEND.bad
101 User-visible ebuilds with bad PDEPEND settings (matched against *visible* ebuilds)
102 .TP