[gentoo-portage-dev] [PATCH 2/3 v2] Have repoman check that a package directory contains at least one ebuild (bug #245305).

2014-01-17 Thread Tom Wijsman
---
 bin/repoman   | 8 
 man/repoman.1 | 3 +++
 2 files changed, 11 insertions(+)

diff --git a/bin/repoman b/bin/repoman
index d1542e9..44f3d3d 100755
--- a/bin/repoman
+++ b/bin/repoman
@@ -326,6 +326,7 @@ qahelp = {
SRC_URI.mirror: A uri listed in profiles/thirdpartymirrors is found 
in SRC_URI,
ebuild.syntax: Error generating cache entry for ebuild; typically 
caused by ebuild syntax error or digest verification failure,
ebuild.output: A simple sourcing of the ebuild produces output; this 
breaks ebuild policy.,
+   ebuild.missing: A package directory must at least contain one ebuild 
or be treecleaned.,
ebuild.nesteddie: Placing 'die' inside ( ) prints an error, but 
doesn't stop the ebuild.,
variable.invalidchar: A variable contains an invalid character that 
is not part of the ASCII character set,
variable.readonly: Assigning a readonly variable,
@@ -1442,6 +1443,13 @@ for x in effective_scanlist:
can_force = False
continue
 
+   if not ebuildlist:
+   stats[ebuild.missing] += 1
+   fails[ebuild.missing].append(%s must at least contain one  
% x + \
+   ebuild or be treecleaned.)
+   can_force = False
+   continue
+
# Sort ebuilds in ascending order for the KEYWORDS.dropped check.
ebuildlist = sorted(pkgs.values())
ebuildlist = [pkg.pf for pkg in ebuildlist]
diff --git a/man/repoman.1 b/man/repoman.1
index a78f94e..6315ea9 100644
--- a/man/repoman.1
+++ b/man/repoman.1
@@ -301,6 +301,9 @@ Ebuilds that exist but have not been added to cvs
 .B ebuild.output
 A simple sourcing of the ebuild produces output; this breaks ebuild policy.
 .TP
+.B ebuild.missing
+A package directory must at least contain one ebuild or be treecleaned.
+.TP
 .B ebuild.patches
 PATCHES variable should be a bash array to ensure white space safety
 .TP
-- 
1.8.5.2




Re: [gentoo-portage-dev] [PATCH 2/3 v2] Have repoman check that a package directory contains at least one ebuild (bug #245305).

2014-01-17 Thread Jesus Rivero (Neurogeek)
On Fri, Jan 17, 2014 at 4:36 PM, Tom Wijsman tom...@gentoo.org wrote:

 ---
  bin/repoman   | 8 
  man/repoman.1 | 3 +++
  2 files changed, 11 insertions(+)

 diff --git a/bin/repoman b/bin/repoman
 index d1542e9..44f3d3d 100755
 --- a/bin/repoman
 +++ b/bin/repoman
 @@ -326,6 +326,7 @@ qahelp = {
 SRC_URI.mirror: A uri listed in profiles/thirdpartymirrors is
 found in SRC_URI,
 ebuild.syntax: Error generating cache entry for ebuild;
 typically caused by ebuild syntax error or digest verification failure,
 ebuild.output: A simple sourcing of the ebuild produces output;
 this breaks ebuild policy.,
 +   ebuild.missing: A package directory must at least contain one
 ebuild or be treecleaned.,
 ebuild.nesteddie: Placing 'die' inside ( ) prints an error, but
 doesn't stop the ebuild.,
 variable.invalidchar: A variable contains an invalid character
 that is not part of the ASCII character set,
 variable.readonly: Assigning a readonly variable,
 @@ -1442,6 +1443,13 @@ for x in effective_scanlist:
 can_force = False
 continue

 +   if not ebuildlist:
 +   stats[ebuild.missing] += 1
 +   fails[ebuild.missing].append(%s must at least contain
 one  % x + \
 +   ebuild or be treecleaned.)
 +   can_force = False
 +   continue
 +
 # Sort ebuilds in ascending order for the KEYWORDS.dropped check.
 ebuildlist = sorted(pkgs.values())
 ebuildlist = [pkg.pf for pkg in ebuildlist]
 diff --git a/man/repoman.1 b/man/repoman.1
 index a78f94e..6315ea9 100644
 --- a/man/repoman.1
 +++ b/man/repoman.1
 @@ -301,6 +301,9 @@ Ebuilds that exist but have not been added to cvs
  .B ebuild.output
  A simple sourcing of the ebuild produces output; this breaks ebuild
 policy.
  .TP
 +.B ebuild.missing
 +A package directory must at least contain one ebuild or be treecleaned.
 +.TP
  .B ebuild.patches
  PATCHES variable should be a bash array to ensure white space safety
  .TP
 --
 1.8.5.2



Looks fine.

-- 
Jesus Rivero (Neurogeek)
Gentoo Developer