[arch-projects] [devtools] [PATCH] makechrootpkg: whitelist return code 14 from makepkg

2018-05-29 Thread Eli Schwartz via arch-projects
makepkg 5.1 implements error codes, and 14 means that installing the
packages after they were built has failed. We don't care about this
error and would like makechrootpkg to succeed regardless, e.g. for split
packages that are mutually exclusive.

Signed-off-by: Eli Schwartz 
---
 makechrootpkg.in | 7 +++
 1 file changed, 7 insertions(+)

diff --git a/makechrootpkg.in b/makechrootpkg.in
index 37e97e7..d81be84 100644
--- a/makechrootpkg.in
+++ b/makechrootpkg.in
@@ -226,6 +226,13 @@ _chrootbuild() {
# ${1} is OK, but $foo or $1 isn't.
# https://bugzilla.sudo.ws/show_bug.cgi?id=765
sudo --preserve-env=SOURCE_DATE_EPOCH -iu builduser bash -c 'cd 
/startdir; makepkg "$@"' -bash "$@"
+   ret=$?
+   case $ret in
+   0|14)
+   return 0;;
+   *)
+   return $ret;;
+   esac
 }
 
 _chrootnamcap() {
-- 
2.17.0


[arch-projects] [namcap][PATCH] A handful of corrections to the namcap usage output

2018-05-29 Thread Sean Enck via arch-projects
noticed the following items in the usage output of namcap:
1. Displaying the site-packages path of namcap and not just 'namcap'
2. Missing long options in usage output
3. Not displaying anything about -h/--help (even if that's a given)

Signed-off-by: Sean Enck 
---
 namcap.py | 11 ++-
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/namcap.py b/namcap.py
index b62a2fa..8940e88 100755
--- a/namcap.py
+++ b/namcap.py
@@ -41,16 +41,17 @@ def get_modules():
 def usage():
"""Display usage information"""
print("")
-   print("Usage: " + sys.argv[0] + " [OPTIONS] packages")
+   print("Usage: namcap [OPTIONS] packages")
print("")
print("Options are:")
print("-L, --list   : list available rules")
-   print("-i   : prints information 
(debug) responses from rules")
-   print("-m   : makes the output 
parseable (machine-readable)")
+   print("-i, --info   : prints information 
(debug) responses from rules")
+   print("-m, --machine-readable   : makes the output 
parseable (machine-readable)")
print("-e rulelist, --exclude=rulelist  : don't apply RULELIST 
rules to the package")
print("-r rulelist, --rules=rulelist: only apply RULELIST rules 
to the package")
-   print("-t tags  : use a custom tag file")
-   print("-v version   : print version and exit")
+   print("-t filename, --tags=filename : use a custom tag file")
+   print("-v, --version: print version and exit")
+   print("-h, --help   : print help and exit")
 
sys.exit(2)
 
-- 
2.17.0