[pacman-dev] [PATCH 2/2 v2] Save path to $PACMAN, to avoid losing access due to --syncdeps

Allan McRae allan at archlinux.org
Sun Nov 11 18:21:34 EST 2012


On 12/11/12 08:37, Martin Panter wrote:
> Unmangled version: https://github.com/vadmium/pacman-arch/commit/3992a1d.patch
> 
> From 3992a1dc7a40c4eefed99ae82e7c682babb4d01b Mon Sep 17 00:00:00 2001
> From: Martin Panter <vadmium à gmail·com>
> Date: Wed, 31 Oct 2012 02:45:36 +0000
> Subject: [PATCH] Save path to $PACMAN, to avoid losing access due to
>  --syncdeps
> 
> ---
>  scripts/makepkg.sh.in | 7 ++++++-
>  1 file changed, 6 insertions(+), 1 deletion(-)
> 
> diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in
> index 0f266df..9c6c0ae 100644
> --- a/scripts/makepkg.sh.in
> +++ b/scripts/makepkg.sh.in
> @@ -2728,7 +2728,12 @@ if (( NODEPS || (NOBUILD && !DEP_BIN ) )); then
>  	if (( NODEPS )); then
>  		warning "$(gettext "Skipping dependency checks.")"
>  	fi
> -elif type -p "$PACMAN" >/dev/null; then
> +elif output="$(command -v "$PACMAN")"; then

NACK.

> command -v pacman
alias pacman='sudo pacman'

> +	# Save full path in case the --syncdeps operation resets the $PATH by
> +	# invoking /etc/profile. If $PACMAN refers to a command in ~/bin/ it
> +	# could become inaccessible.
> +	PACMAN="$output"
> +	
>  	if (( RMDEPS && ! INSTALL )); then
>  		original_pkglist=($(run_pacman -Qq))    # required by remove_dep
>  	fi
> 



More information about the pacman-dev mailing list