1
0
mirror of https://github.com/moparisthebest/pacman synced 2024-11-12 04:15:06 -05:00

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>
This commit is contained in:
Allan McRae 2012-01-20 23:25:57 +10:00 committed by Dan McGee
parent df47136bcf
commit edd4276bbf

View File

@ -412,7 +412,11 @@ download_file() {
run_pacman() { run_pacman() {
local cmd 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 (( ! ASROOT )) && [[ ! $1 = -@(T|Qq) ]]; then
if type -p sudo >/dev/null; then if type -p sudo >/dev/null; then
cmd="sudo $cmd" cmd="sudo $cmd"