Commit 6341e5ce authored by Eli Schwartz's avatar Eli Schwartz Committed by Allan McRae
Browse files

Fix using run_pacman to invoke -Qi with sudo

In commit 5698d7b6

 a new non-root use of
pacman was added -- previously we used -T or -Qq, and run_pacman did not
know how to special-case -Qi to skip being prepended with sudo.

The result is:

  -> Generating .BUILDINFO file...
ERROR: object '' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
[sudo] password for eschwartz:
  -> Adding changelog file...

Fix this by using a more generic glob since neither -Q nor -T will ever
need sudo or PACMAN_OPTS
Signed-off-by: Eli Schwartz's avatarEli Schwartz <>
Signed-off-by: Allan McRae's avatarAllan McRae <>
parent 65243877
......@@ -220,12 +220,12 @@ missing_source_file() {
run_pacman() {
local cmd
if [[ $1 != -@(T|Qq) ]]; then
if [[ $1 != -@(T|Q)*([[:alpha:]]) ]]; then
cmd=("$PACMAN_PATH" "${PACMAN_OPTS[@]}" "$@")
cmd=("$PACMAN_PATH" "$@")
if [[ $1 != -@(T|Qq|Q) ]]; then
if [[ $1 != -@(T|Q)*([[:alpha:]]) ]]; then
if type -p sudo >/dev/null; then
cmd=(sudo "${cmd[@]}")
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment