summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorAllan McRae <allan@archlinux.org>2010-12-25 13:14:55 +1000
committerDan McGee <dan@archlinux.org>2010-12-29 18:44:32 -0600
commiteb93955477c411eaf914c2f1650ce37d02d8b56e (patch)
tree829cbb4ced81d7c35cf45549e790ca55445f9c7d /scripts
parenta7972625e3ef98348b8a0957217aa2991501a07b (diff)
downloadpacman-eb93955477c411eaf914c2f1650ce37d02d8b56e.tar.xz
makepkg: allow pkgname usage in split package functions
Currently, using $pkgname in a split package package_*() function always returns the first value in the pkgname array rather than the name of tha package being packaged. Fix this so $pkgname gives the expected value. Fixes FS#22174 Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'scripts')
-rw-r--r--scripts/makepkg.sh.in10
1 files changed, 6 insertions, 4 deletions
diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in
index 1996dd46..79b307aa 100644
--- a/scripts/makepkg.sh.in
+++ b/scripts/makepkg.sh.in
@@ -1406,17 +1406,19 @@ restore_package_variables() {
}
run_split_packaging() {
- for pkg in ${pkgname[@]}; do
- pkgdir="$pkgdir/$pkg"
+ local pkgname_backup=${pkgname[@]}
+ for pkgname in ${pkgname_backup[@]}; do
+ pkgdir="$pkgdir/$pkgname"
mkdir -p "$pkgdir"
chmod a-s "$pkgdir"
backup_package_variables
- run_package $pkg
+ run_package $pkgname
tidy_install
- create_package $pkg
+ create_package $pkgname
restore_package_variables
pkgdir="${pkgdir%/*}"
done
+ pkgname=${pkgname_backup[@]}
}
# Canonicalize a directory path if it exists