@@ -39,6 +39,20 @@ Environment
Overrides the default '/tmp' temporary directory.
+Errors
+------
+On exit, checkpkg will return one of the following error codes.
+
+0::
+ Normal exit condition.
+
+1::
+ Unknown cause of failure.
+
+2::
+ No updates are available.
+
+
See Also
--------
linkman:pacman[8], linkman:pacman.conf[5]
@@ -109,7 +109,7 @@ if (( ${#updates[@]} )); then
sudo pacman -Sw --noconfirm "${updates[@]%% *}" --dbpath "$CHECKUPDATES_DB" --logfile /dev/null
fi
else
- exit 1
+ exit 2
fi
# vim: set noet:
It's useful to distinguish the failure to find updates. This carries over the ability for pacman -Qu to return errors when no upgrades are available. At the same time, this should (unlike pacman -Qu) use its own unique return code, since checkupdates may error for a couple of reasons including download issues. Fixes FS#64219 Signed-off-by: Eli Schwartz <eschwartz@archlinux.org> --- doc/checkupdates.8.txt | 14 ++++++++++++++ src/checkupdates.sh.in | 2 +- 2 files changed, 15 insertions(+), 1 deletion(-)