[arch-dev-public] [PATCH] [devtools] make 'mkarchroot -u' return 0 on success
Gaetan Bisson
bisson at archlinux.org
Thu Jan 6 16:27:10 EST 2011
Version 0.9.16 of devtools made "mkarchroot -u" able to handle pacman
upgrades using:
pacman -Syu --noconfirm; pacman -Qqu >/dev/null && pacman -Su --noconfirm
This implies the return code of "mkarchroot -u" is always 1 in the most
typical case where there is no package left to upgrade after the first
round.
To fix this, I suggest to simply remove the check for packages left:
pacman -Su will do it just as well. Or we could add a "|| return 0" at
the end.
--
Gaetan
diff -aur old/mkarchroot new/mkarchroot
--- devtools/mkarchroot 2011-01-06 22:12:24.900001390 +0100
+++ devtools/mkarchroot 2011-01-06 22:13:33.026668143 +0100
@@ -34,7 +34,7 @@
while getopts 'r:ufnhC:M:c:' arg; do
case "${arg}" in
r) RUN="$OPTARG" ;;
- u) RUN='/bin/sh -c "pacman -Syu --noconfirm; pacman -Qqu >/dev/null && pacman -Su --noconfirm"' ;;
+ u) RUN='/bin/sh -c "pacman -Syu --noconfirm; pacman -Su --noconfirm"' ;;
f) FORCE='y' ;;
C) pac_conf="$OPTARG" ;;
M) makepkg_conf="$OPTARG" ;;
More information about the arch-dev-public
mailing list