Gentoo Archives: gentoo-portage-dev

From: "Jesus Rivero (Neurogeek)" <neurogeek@g.o>
To: gentoo-portage-dev@l.g.o
Subject: Re: [gentoo-portage-dev] [PATCH 2/3] Have repoman check that a package directory contains at least one ebuild (bug #245305).
Date: Thu, 16 Jan 2014 01:07:21
Message-Id: CAD3zpDkz7_WdG8RUj+10XAFs-c-k82xGk3UUdGk8X136BN0caQ@mail.gmail.com
In Reply to: [gentoo-portage-dev] [PATCH 2/3] Have repoman check that a package directory contains at least one ebuild (bug #245305). by Tom Wijsman
1 On Jan 15, 2014 7:09 PM, "Tom Wijsman" <tomwij@g.o> wrote:
2 >
3 > ---
4 > bin/repoman | 8 ++++++++
5 > man/repoman.1 | 3 +++
6 > 2 files changed, 11 insertions(+)
7 >
8 > diff --git a/bin/repoman b/bin/repoman
9 > index 9b703dc..3263ceb 100755
10 > --- a/bin/repoman
11 > +++ b/bin/repoman
12 > @@ -330,6 +330,7 @@ qahelp = {
13 > "SRC_URI.mirror": "A uri listed in profiles/thirdpartymirrors is
14 found in SRC_URI",
15 > "ebuild.syntax": "Error generating cache entry for ebuild;
16 typically caused by ebuild syntax error or digest verification failure",
17 > "ebuild.output": "A simple sourcing of the ebuild produces
18 output; this breaks ebuild policy.",
19 > + "ebuild.missing": "A package directory must at least contain one
20 ebuild or be treecleaned.",
21 > "ebuild.nesteddie": "Placing 'die' inside ( ) prints an error,
22 but doesn't stop the ebuild.",
23 > "variable.invalidchar": "A variable contains an invalid character
24 that is not part of the ASCII character set",
25 > "variable.readonly": "Assigning a readonly variable",
26 > @@ -1466,6 +1467,13 @@ for x in effective_scanlist:
27 > can_force = False
28 > continue
29 >
30 > + if len(ebuildlist) == 0:
31 I'd rather see:
32 if not ebuildlist:
33 > + stats["ebuild.missing"] += 1
34 > + fails["ebuild.missing"].append("%s must at least contain
35 one " % x + \
36 > + "ebuild or be treecleaned.")
37 > + can_force = False
38 > + continue
39 > +
40 > # Sort ebuilds in ascending order for the KEYWORDS.dropped check.
41 > ebuildlist = sorted(pkgs.values())
42 > ebuildlist = [pkg.pf for pkg in ebuildlist]
43 > diff --git a/man/repoman.1 b/man/repoman.1
44 > index e739d56..2bf3765 100644
45 > --- a/man/repoman.1
46 > +++ b/man/repoman.1
47 > @@ -301,6 +301,9 @@ Ebuilds that exist but have not been added to cvs
48 > .B ebuild.output
49 > A simple sourcing of the ebuild produces output; this breaks ebuild
50 policy.
51 > .TP
52 > +.B ebuild.missing
53 > +A package directory must at least contain one ebuild or be treecleaned.
54 > +.TP
55 > .B ebuild.patches
56 > PATCHES variable should be a bash array to ensure white space safety
57 > .TP
58 > --
59 > 1.8.5.2
60 >
61 >
62
63 Everything else looks good to me.
64
65 Cheers,

Replies