[pacman-dev] [PATCH] Return 17 if a package/group has been built.
fbt
fbt at fleshless.org
Tue Jun 23 14:07:30 UTC 2015
Actually, exit 2 is currently used by makepkg to indicate that a build failed.
I've not noticed when that happened, it didn't do that when I originally
started patching my local copy of makepkg.
So it should be 3 then:
Signed-off-by: Jack L. Frost <fbt at fleshless.org>
---
doc/makepkg.8.txt | 11 +++++++++++
scripts/makepkg.sh.in | 6 +++---
2 files changed, 14 insertions(+), 3 deletions(-)
diff --git a/doc/makepkg.8.txt b/doc/makepkg.8.txt
index 41df30e..2f9415c 100644
--- a/doc/makepkg.8.txt
+++ b/doc/makepkg.8.txt
@@ -267,6 +267,17 @@ Environment Variables
in linkman:makepkg.conf[5]
+Exit codes
+----------
+**0**
+ Success.
+
+**1**
+ Some error has occured.
+
+**2**
+ A failure occured while building the package.
+
+**3**
+ A package or (part of) group has already been built.
+
Configuration
-------------
See linkman:makepkg.conf[5] for more details on configuring makepkg using the
diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in
index c74e84a..7025161 100644
--- a/scripts/makepkg.sh.in
+++ b/scripts/makepkg.sh.in
@@ -1613,7 +1613,7 @@ check_build_status() {
exit 0
else
error "$(gettext "A package has already been built. (use %s to overwrite)")" "-f"
- exit 1
+ exit 3
fi
fi
else
@@ -1636,12 +1636,12 @@ check_build_status() {
exit 0
else
error "$(gettext "The package group has already been built. (use %s to overwrite)")" "-f"
- exit 1
+ exit 3
fi
fi
if (( somepkgbuilt && ! PKGVERFUNC )); then
error "$(gettext "Part of the package group has already been built. (use %s to overwrite)")" "-f"
- exit 1
+ exit 3
fi
fi
unset allpkgbuilt somepkgbuilt
--
2.4.1
More information about the pacman-dev
mailing list