[pacman-dev] [PATCH 1/3] bacman: pass unshifted arguments to fakeroot

Xyne xyne at archlinux.ca
Tue Sep 17 05:19:24 EDT 2013


---
 contrib/bacman.sh.in | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/contrib/bacman.sh.in b/contrib/bacman.sh.in
index 5435e40..30db686 100644
--- a/contrib/bacman.sh.in
+++ b/contrib/bacman.sh.in
@@ -27,6 +27,8 @@ shopt -s nullglob
 declare -r myname='bacman'
 declare -r myver='@PACKAGE_VERSION@'
 USE_COLOR='y'
+# Required for fakeroot because options are shifted off the array.
+ARGS=("$@")
 
 m4_include(../scripts/library/output_format.sh)
 
@@ -71,7 +73,7 @@ if (( EUID )); then
 	if [[ -f /usr/bin/fakeroot ]]; then
 		msg "Entering fakeroot environment"
 		export INFAKEROOT="1"
-		/usr/bin/fakeroot -u -- "$0" "$@"
+		/usr/bin/fakeroot -u -- "$0" "${ARGS[@]}"
 		exit $?
 	else
 		warning "installing fakeroot or running $myname as root is required to"
-- 
1.8.4



More information about the pacman-dev mailing list