summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAllan McRae <allan@archlinux.org>2012-01-20 23:25:57 +1000
committerDan McGee <dan@archlinux.org>2012-01-23 09:23:21 -0600
commitedd4276bbf3d21a7353e3d67ce6639246ef8032d (patch)
treea2b42d5b0c489d3ec5145907373b91ae51143962
parentdf47136bcfd3fdec150fc8613f3fe243432d875f (diff)
downloadpacman-edd4276bbf3d21a7353e3d67ce6639246ef8032d.tar.xz
makepkg: restrict usage of flags passed to pacman
With pacman-4.0, using --noconfirm or --noprogressbar with -Q or -T results in pacman reporting an "invalid option" error. Restrict the passing of these options to pacman. Fixes FS#28012. Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
-rw-r--r--scripts/makepkg.sh.in6
1 files changed, 5 insertions, 1 deletions
diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in
index 81e77e47..89045ac9 100644
--- a/scripts/makepkg.sh.in
+++ b/scripts/makepkg.sh.in
@@ -412,7 +412,11 @@ download_file() {
run_pacman() {
local cmd
- printf -v cmd "%q " "$PACMAN" $PACMAN_OPTS "$@"
+ if [[ ! $1 = -@(T|Qq) ]]; then
+ printf -v cmd "%q " "$PACMAN" $PACMAN_OPTS "$@"
+ else
+ printf -v cmd "%q " "$PACMAN" "$@"
+ fi
if (( ! ASROOT )) && [[ ! $1 = -@(T|Qq) ]]; then
if type -p sudo >/dev/null; then
cmd="sudo $cmd"