Always treat PKGLIST as an array.

Fixes repackaging issues when multiple package names are passed to the
--pkg option.

Signed-off-by: Dave Reisner <d@falconindy.com>
Signed-off-by: Allan McRae <allan@archlinux.org>
Signed-off-by: Dan McGee <dan@archlinux.org>
This commit is contained in:
Dave Reisner 2010-07-24 17:13:01 -04:00 committed by Dan McGee
parent fcb4f0264f
commit 7f5c486666

View file

@ -73,7 +73,7 @@ HOLDVER=0
BUILDFUNC=0 BUILDFUNC=0
PKGFUNC=0 PKGFUNC=0
SPLITPKG=0 SPLITPKG=0
PKGLIST="" PKGLIST=()
# Forces the pkgver of the current PKGBUILD. Used by the fakeroot call # Forces the pkgver of the current PKGBUILD. Used by the fakeroot call
# when dealing with svn/cvs/etc PKGBUILDs. # when dealing with svn/cvs/etc PKGBUILDs.
@ -1585,7 +1585,7 @@ while true; do
-m|--nocolor) USE_COLOR='n' ;; -m|--nocolor) USE_COLOR='n' ;;
-o|--nobuild) NOBUILD=1 ;; -o|--nobuild) NOBUILD=1 ;;
-p) shift; BUILDFILE=$1 ;; -p) shift; BUILDFILE=$1 ;;
--pkg) shift; PKGLIST=$1 ;; --pkg) shift; PKGLIST=($1) ;;
-r|--rmdeps) RMDEPS=1 ;; -r|--rmdeps) RMDEPS=1 ;;
-R|--repackage) REPKG=1 ;; -R|--repackage) REPKG=1 ;;
--skipinteg) SKIPINTEG=1 ;; --skipinteg) SKIPINTEG=1 ;;
@ -1800,7 +1800,7 @@ pkgbase=${pkgbase:-${pkgname[0]}}
if [[ -n "${PKGLIST[@]}" ]]; then if [[ -n "${PKGLIST[@]}" ]]; then
unset pkgname unset pkgname
pkgname="${PKGLIST[@]}" pkgname=("${PKGLIST[@]}")
fi fi
if (( ! SPLITPKG )); then if (( ! SPLITPKG )); then