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