Gentoo Archives: gentoo-portage-dev

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