From 1142a32c7f6f8ab82528581277b7c7cac6b2d1ae Mon Sep 17 00:00:00 2001 From: Benjamin Yates Date: Tue, 27 Oct 2015 16:22:57 -0400 Subject: makepkg: fix $pkgname element duplication run_split_packaging did not preserve the $pkgname array correctly, and would create duplicate entries in the list during restore. After restoring the backup (a b c) would become (a b c b c). This probably went unnoticed because during --install, pacman would reconcile the duplicates. Signed-off-by: Allan McRae --- scripts/makepkg.sh.in | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'scripts') diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in index abc80dd6..22679f76 100644 --- a/scripts/makepkg.sh.in +++ b/scripts/makepkg.sh.in @@ -1672,7 +1672,7 @@ restore_package_variables() { } run_split_packaging() { - local pkgname_backup=${pkgname[@]} + local pkgname_backup=("${pkgname[@]}") for pkgname in ${pkgname_backup[@]}; do pkgdir="$pkgdirbase/$pkgname" mkdir "$pkgdir" @@ -1684,7 +1684,7 @@ run_split_packaging() { create_debug_package restore_package_variables done - pkgname=${pkgname_backup[@]} + pkgname=("${pkgname_backup[@]}") } m4_include(library/parseopts.sh) -- cgit v1.2.3-24-g4f1b