On 2016-02-15 15:05 +1000
Allan McRae wrote:

>No chance the full patch will be accepted.  But the changing PACMAN_OPTS
>to an array should probably be done.

Here's a patch for converting PACMAN_OPTS to an array (if this list accepts
attachments). I'll post a link if not.

Any change of getting --pkg restored just for selecting which package to
install? It would only affect the package loop in the "install_package"
function. Incidentally, "pkg:" is still in the OPT_LONG array.
--- makepkg.orig	2016-02-15 22:13:16.930571029 +0000
+++ makepkg	2016-02-15 22:14:52.888596176 +0000
@@ -87,7 +87,7 @@
 SOURCEONLY=0
 VERIFYSOURCE=0
 
-PACMAN_OPTS=
+PACMAN_OPTS=()
 
 shopt -s extglob
 
@@ -219,7 +219,7 @@
 run_pacman() {
 	local cmd
 	if [[ $1 != -@(T|Qq) ]]; then
-		cmd=("$PACMAN_PATH" $PACMAN_OPTS "$@")
+		cmd=("$PACMAN_PATH" "${PACMAN_OPTS[@]}" "$@")
 	else
 		cmd=("$PACMAN_PATH" "$@")
 	fi
@@ -1926,8 +1926,8 @@
 		# Pacman Options
 		--asdeps)         ASDEPS=1;;
 		--needed)         NEEDED=1;;
-		--noconfirm)      PACMAN_OPTS+=" --noconfirm" ;;
-		--noprogressbar)  PACMAN_OPTS+=" --noprogressbar" ;;
+		--noconfirm)      PACMAN_OPTS+=(--noconfirm) ;;
+		--noprogressbar)  PACMAN_OPTS+=(--noprogressbar) ;;
 
 		# Makepkg Options
 		--allsource)      SOURCEONLY=2 ;;
@@ -1945,7 +1945,7 @@
 		-i|--install)     INSTALL=1 ;;
 		--key)            shift; GPGKEY=$1 ;;
 		-L|--log)         LOGGING=1 ;;
-		-m|--nocolor)     USE_COLOR='n'; PACMAN_OPTS+=" --color never" ;;
+		-m|--nocolor)     USE_COLOR='n'; PACMAN_OPTS+=(--color never) ;;
 		--noarchive)      NOARCHIVE=1 ;;
 		--nocheck)        RUN_CHECK='n' ;;
 		--noprepare)      RUN_PREPARE='n' ;;

Reply via email to