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] Have repoman check that a package directory contains at least one ebuild (bug #245305).
Date: Thu, 16 Jan 2014 00:08:49
Message-Id: 1389830840-25848-3-git-send-email-tomwij@gentoo.org
In Reply to: [gentoo-portage-dev] Repoman patches for bugs #205909, #245305 and #482084. 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 9b703dc..3263ceb 100755
8 --- a/bin/repoman
9 +++ b/bin/repoman
10 @@ -330,6 +330,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 @@ -1466,6 +1467,13 @@ for x in effective_scanlist:
19 can_force = False
20 continue
21
22 + if len(ebuildlist) == 0:
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 e739d56..2bf3765 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