[pacman-dev] [PATCH 1/2 v2] Remove last traces of handling command arguments in $PACMAN
Martin Panter
vadmium+patch at gmail.com
Sun Nov 11 17:34:31 EST 2012
New version removing the arguments rather than adding them back.
Unmangled version: https://github.com/vadmium/pacman-arch/commit/7d15a05.patch
>From 7d15a057e37defece4c93bf17e4bbdac1db4106d Mon Sep 17 00:00:00 2001
From: Martin Panter <vadmium à gmail·com>
Date: Wed, 31 Oct 2012 03:05:42 +0000
Subject: [PATCH] Remove last traces of handling command arguments in $PACMAN
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
This resolves an inconsistency with how the $PACMAN variable was interpreted.
Previously “makepkg” would extract the first word from the $PACMAN variable
and check that it existed as a command. This appears to have been happening
ever since the variable was implemented in revision 66c6d28 (makepkg: allow
to specify an alternative pacman command). Thus it looks like command
arguments were originally allowed in the variable.
However the run_pacman() function now quotes $PACMAN, so the whole variable
has to be just the command name. This quoting was introduced more recently,
perhaps in revision 622326b (makepkg: fix sudo/su calling of pacman).
---
scripts/makepkg.sh.in | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in
index d387b7d..0f266df 100644
--- a/scripts/makepkg.sh.in
+++ b/scripts/makepkg.sh.in
@@ -2728,7 +2728,7 @@ if (( NODEPS || (NOBUILD && !DEP_BIN ) )); then
if (( NODEPS )); then
warning "$(gettext "Skipping dependency checks.")"
fi
-elif type -p "${PACMAN%% *}" >/dev/null; then
+elif type -p "$PACMAN" >/dev/null; then
if (( RMDEPS && ! INSTALL )); then
original_pkglist=($(run_pacman -Qq)) # required by remove_dep
fi
@@ -2757,7 +2757,7 @@ elif type -p "${PACMAN%% *}" >/dev/null; then
exit 1
fi
else
- warning "$(gettext "%s was not found in %s; skipping dependency
checks.")" "${PACMAN%% *}" "PATH"
+ warning "$(gettext "%s was not found in %s; skipping dependency
checks.")" "$PACMAN" "PATH"
fi
# ensure we have a sane umask set
--
1.8.0
More information about the pacman-dev
mailing list