[gentoo-portage-dev]

2014-01-02 Thread SebastianLuther
Changes:

* restrict check to runtime dependencies
* don't skip the check for atoms with slots, but only for slot+sub-slot
* fix typo found by Ryan




[gentoo-portage-dev] [PATCH] repoman: Add check for missing slot operators (bug 493742)

2014-01-02 Thread SebastianLuther
From: Sebastian Luther 

---
 bin/repoman | 14 +-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/bin/repoman b/bin/repoman
index d1542e9..cb1d620 100755
--- a/bin/repoman
+++ b/bin/repoman
@@ -78,7 +78,7 @@ from portage.output import ConsoleStyleFile, StyleWriter
 from portage.util import writemsg_level
 from portage.util._argparse import ArgumentParser
 from portage.package.ebuild.digestgen import digestgen
-from portage.eapi import eapi_has_iuse_defaults, eapi_has_required_use
+from portage.eapi import eapi_has_iuse_defaults, eapi_has_required_use, 
eapi_has_slot_operator
 
 if sys.hexversion >= 0x300:
basestring = str
@@ -354,6 +354,7 @@ qahelp = {
"portage.internal": "The ebuild uses an internal Portage function or 
variable",
"repo.eapi.banned": "The ebuild uses an EAPI which is banned by the 
repository's metadata/layout.conf settings",
"repo.eapi.deprecated": "The ebuild uses an EAPI which is deprecated by 
the repository's metadata/layout.conf settings",
+   "slot.operator.missing": "The ebuild depends on a package with several 
slots and/or sub slots without specifying a slot operator",
"virtual.oldstyle": "The ebuild PROVIDEs an old-style virtual (see GLEP 
37)",
"virtual.suspect": "Ebuild contains a package that usually should be 
pulled via virtual/, not directly.",
"usage.obsolete": "The ebuild makes use of an obsolete construct",
@@ -399,6 +400,7 @@ qawarnings = set((
 "metadata.warning",
 "portage.internal",
 "repo.eapi.deprecated",
+"slot.operator.missing",
 "usage.obsolete",
 "upstream.workaround",
 "LIVEVCS.stable",
@@ -2070,6 +2072,16 @@ for x in effective_scanlist:
 " with a non-zero 
revision:" + \
 " '%s'") % (mytype, 
atom))
 
+   if runtime and not atom.blocker and not 
atom.slot_operator and \
+   eapi_has_slot_operator(eapi) 
and \
+   not (atom.slot and 
atom.sub_slot):
+   child_slots = set((child.slot, 
child.sub_slot) \
+   for child in 
portdb.xmatch("match-all", atom))
+   if len(child_slots) > 1:
+   
stats['slot.operator.missing'] += 1
+   
fails['slot.operator.missing'].append(relative_path + \
+   ": '%s' in %s 
missing slot/sub-slot or slot operator" % (atom, mytype))
+
type_list.extend([mytype] * (len(badsyntax) - 
len(type_list)))
 
for m, b in zip(type_list, badsyntax):
-- 
1.8.3.2




[gentoo-portage-dev] Re: [PATCH 2/2] repoman: Add check for missing slot operators (bug 493742)

2014-01-02 Thread Ryan Hill
On Wed,  1 Jan 2014 23:14:11 +0100
sebastianlut...@gmx.de wrote:

+   "slot.operator.missing": "The ebuild depends on package with several...
   ^ a

-- 
Ryan Hillpsn: dirtyepic_sk
   gcc-porting/toolchain/wxwidgets @ gentoo.org

47C3 6D62 4864 0E49 8E9E  7F92 ED38 BD49 957A 8463


signature.asc
Description: PGP signature