1 |
From: Sebastian Luther <SebastianLuther@×××.de> |
2 |
|
3 |
--- |
4 |
bin/repoman | 14 +++++++++++++- |
5 |
1 file changed, 13 insertions(+), 1 deletion(-) |
6 |
|
7 |
diff --git a/bin/repoman b/bin/repoman |
8 |
index d1542e9..cb1d620 100755 |
9 |
--- a/bin/repoman |
10 |
+++ b/bin/repoman |
11 |
@@ -78,7 +78,7 @@ from portage.output import ConsoleStyleFile, StyleWriter |
12 |
from portage.util import writemsg_level |
13 |
from portage.util._argparse import ArgumentParser |
14 |
from portage.package.ebuild.digestgen import digestgen |
15 |
-from portage.eapi import eapi_has_iuse_defaults, eapi_has_required_use |
16 |
+from portage.eapi import eapi_has_iuse_defaults, eapi_has_required_use, eapi_has_slot_operator |
17 |
|
18 |
if sys.hexversion >= 0x3000000: |
19 |
basestring = str |
20 |
@@ -354,6 +354,7 @@ qahelp = { |
21 |
"portage.internal": "The ebuild uses an internal Portage function or variable", |
22 |
"repo.eapi.banned": "The ebuild uses an EAPI which is banned by the repository's metadata/layout.conf settings", |
23 |
"repo.eapi.deprecated": "The ebuild uses an EAPI which is deprecated by the repository's metadata/layout.conf settings", |
24 |
+ "slot.operator.missing": "The ebuild depends on a package with several slots and/or sub slots without specifying a slot operator", |
25 |
"virtual.oldstyle": "The ebuild PROVIDEs an old-style virtual (see GLEP 37)", |
26 |
"virtual.suspect": "Ebuild contains a package that usually should be pulled via virtual/, not directly.", |
27 |
"usage.obsolete": "The ebuild makes use of an obsolete construct", |
28 |
@@ -399,6 +400,7 @@ qawarnings = set(( |
29 |
"metadata.warning", |
30 |
"portage.internal", |
31 |
"repo.eapi.deprecated", |
32 |
+"slot.operator.missing", |
33 |
"usage.obsolete", |
34 |
"upstream.workaround", |
35 |
"LIVEVCS.stable", |
36 |
@@ -2070,6 +2072,16 @@ for x in effective_scanlist: |
37 |
" with a non-zero revision:" + \ |
38 |
" '%s'") % (mytype, atom)) |
39 |
|
40 |
+ if runtime and not atom.blocker and not atom.slot_operator and \ |
41 |
+ eapi_has_slot_operator(eapi) and \ |
42 |
+ not (atom.slot and atom.sub_slot): |
43 |
+ child_slots = set((child.slot, child.sub_slot) \ |
44 |
+ for child in portdb.xmatch("match-all", atom)) |
45 |
+ if len(child_slots) > 1: |
46 |
+ stats['slot.operator.missing'] += 1 |
47 |
+ fails['slot.operator.missing'].append(relative_path + \ |
48 |
+ ": '%s' in %s missing slot/sub-slot or slot operator" % (atom, mytype)) |
49 |
+ |
50 |
type_list.extend([mytype] * (len(badsyntax) - len(type_list))) |
51 |
|
52 |
for m, b in zip(type_list, badsyntax): |
53 |
-- |
54 |
1.8.3.2 |