makepkg: fix variable backup/restore for splitpkg

The backup and restore of variables that can be overridden while
making split packages only dealt with the first element, not the
whole array (FS#15010).  Adjust the bash voodoo to fix it...

Signed-off-by: Allan McRae <allan@archlinux.org>
Signed-off-by: Dan McGee <dan@archlinux.org>
This commit is contained in:
Allan McRae 2009-06-09 14:11:15 +10:00 committed by Dan McGee
parent 04d5c4294a
commit ef500b44ce

View file

@ -1262,7 +1262,7 @@ devel_update() {
backup_package_variables() {
for var in ${splitpkg_overrides[@]}; do
indirect="${var}_backup"
eval "${indirect}=\"${!var}\""
eval "${indirect}=(\${$var[@]})"
done
}
@ -1270,7 +1270,7 @@ restore_package_variables() {
for var in ${splitpkg_overrides[@]}; do
indirect="${var}_backup"
if [ -n "${!indirect}" ]; then
eval "${var}=\"${!indirect}\""
eval "${var}=(\${$indirect[@]})"
else
unset ${var}
fi