Allan McRae wrote: > Cedric Staniewski wrote: >> Fixes FS#16871. >> >> Signed-off-by: Cedric Staniewski <[email protected]> >> --- >> scripts/makepkg.sh.in | 4 ++-- >> 1 files changed, 2 insertions(+), 2 deletions(-) >> >> diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in >> index 92b0454..8ca89e1 100644 >> --- a/scripts/makepkg.sh.in >> +++ b/scripts/makepkg.sh.in >> @@ -1315,7 +1315,7 @@ devel_update() { >> backup_package_variables() { >> for var in ${splitpkg_overrid...@]}; do >> indirect="${var}_backup" >> - eval "${indirect}=(\${$v...@]})" >> + eval "${indirect}=(\"\${$v...@]}\")" >> done >> } >> >> @@ -1323,7 +1323,7 @@ restore_package_variables() { >> for var in ${splitpkg_overrid...@]}; do >> indirect="${var}_backup" >> if [ -n "${!indirect}" ]; then >> - eval "${var}=(\${$indire...@]})" >> + eval "${var}=(\"\${$indire...@]}\")" >> else >> unset ${var} >> fi > > Looks good. This will also fix the pkgdesc issues that are worked > around at the end of the restore_package_variables function so you can > delete those few lines too. > > Allan
Right, thanks. >From b2f582678e2f3d8cfce1dd0a343e988b35f58d8e Mon Sep 17 00:00:00 2001 -- 8< -- From: Cedric Staniewski <[email protected]> Date: Thu, 5 Nov 2009 17:27:34 +0100 Subject: [PATCH] makepkg: quote arrays in order to preserve spaces in array items Fixes FS#16871 and makes the pkgdesc workaround obsolete. Signed-off-by: Cedric Staniewski <[email protected]> --- scripts/makepkg.sh.in | 9 ++------- 1 files changed, 2 insertions(+), 7 deletions(-) diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in index 92b0454..25fb8d9 100644 --- a/scripts/makepkg.sh.in +++ b/scripts/makepkg.sh.in @@ -1315,7 +1315,7 @@ devel_update() { backup_package_variables() { for var in ${splitpkg_overrid...@]}; do indirect="${var}_backup" - eval "${indirect}=(\${$v...@]})" + eval "${indirect}=(\"\${$v...@]}\")" done } @@ -1323,16 +1323,11 @@ restore_package_variables() { for var in ${splitpkg_overrid...@]}; do indirect="${var}_backup" if [ -n "${!indirect}" ]; then - eval "${var}=(\${$indire...@]})" + eval "${var}=(\"\${$indire...@]}\")" else unset ${var} fi done - - # pkgdesc gets restored as an array - convert back to a string - local pkgdesc_backup="${pkgde...@]}" - unset pkgdesc - pkgdesc=${pkgdesc_backup} } # getopt like parser -- 1.6.5.2
