Gentoo Archives: gentoo-portage-dev

From: Tom Wijsman <tomwij@g.o>
To: gentoo-portage-dev@l.g.o
Subject: [gentoo-portage-dev] [PATCH 2/3 v2] Have repoman check that a package directory contains at least one ebuild (bug #245305).
Date: Fri, 17 Jan 2014 21:37:55
Message-Id: 1389994614-7459-1-git-send-email-tomwij@gentoo.org
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 ---
2 bin/repoman | 8 ++++++++
3 man/repoman.1 | 3 +++
4 2 files changed, 11 insertions(+)
5
6 diff --git a/bin/repoman b/bin/repoman
7 index d1542e9..44f3d3d 100755
8 --- a/bin/repoman
9 +++ b/bin/repoman
10 @@ -326,6 +326,7 @@ qahelp = {
11 "SRC_URI.mirror": "A uri listed in profiles/thirdpartymirrors is found in SRC_URI",
12 "ebuild.syntax": "Error generating cache entry for ebuild; typically caused by ebuild syntax error or digest verification failure",
13 "ebuild.output": "A simple sourcing of the ebuild produces output; this breaks ebuild policy.",
14 + "ebuild.missing": "A package directory must at least contain one ebuild or be treecleaned.",
15 "ebuild.nesteddie": "Placing 'die' inside ( ) prints an error, but doesn't stop the ebuild.",
16 "variable.invalidchar": "A variable contains an invalid character that is not part of the ASCII character set",
17 "variable.readonly": "Assigning a readonly variable",
18 @@ -1442,6 +1443,13 @@ for x in effective_scanlist:
19 can_force = False
20 continue
21
22 + if not ebuildlist:
23 + stats["ebuild.missing"] += 1
24 + fails["ebuild.missing"].append("%s must at least contain one " % x + \
25 + "ebuild or be treecleaned.")
26 + can_force = False
27 + continue
28 +
29 # Sort ebuilds in ascending order for the KEYWORDS.dropped check.
30 ebuildlist = sorted(pkgs.values())
31 ebuildlist = [pkg.pf for pkg in ebuildlist]
32 diff --git a/man/repoman.1 b/man/repoman.1
33 index a78f94e..6315ea9 100644
34 --- a/man/repoman.1
35 +++ b/man/repoman.1
36 @@ -301,6 +301,9 @@ Ebuilds that exist but have not been added to cvs
37 .B ebuild.output
38 A simple sourcing of the ebuild produces output; this breaks ebuild policy.
39 .TP
40 +.B ebuild.missing
41 +A package directory must at least contain one ebuild or be treecleaned.
42 +.TP
43 .B ebuild.patches
44 PATCHES variable should be a bash array to ensure white space safety
45 .TP
46 --
47 1.8.5.2

Replies