From edd4276bbf3d21a7353e3d67ce6639246ef8032d Mon Sep 17 00:00:00 2001 From: Allan McRae Date: Fri, 20 Jan 2012 23:25:57 +1000 Subject: 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 Signed-off-by: Dan McGee --- scripts/makepkg.sh.in | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'scripts') 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" -- cgit v1.2.3-24-g4f1b