[pacman-dev] [PATCH] makepkg: use the `declare` builtin when backing up variables to eval

Allan McRae allan at archlinux.org
Thu Mar 15 02:01:03 UTC 2018


On 15/03/18 10:56, Eli Schwartz wrote:
> Rather than manually crafting foo_backup in a loop and eval'ing them
> with a complicated escape pattern, store every splitpkg_overrides
> element into a single variable via the eval-friendly `declare` builtin.
> 
> An alternative to eval would be using `printf -v` but this does not work
> for arrays.
> 
> This has the additional benefit of reducing the number of
> variables/arrays floating around in the environment.
> 

Stop submitting patches without even basic testing.


==> Entering fakeroot environment...
/home/allan/arch/code/pacman/scripts/.lib/makepkg: line 1118: declare:
pkgdesc: not found
/home/allan/arch/code/pacman/scripts/.lib/makepkg: line 1118: declare:
url: not found
/home/allan/arch/code/pacman/scripts/.lib/makepkg: line 1118: declare:
license: not found
/home/allan/arch/code/pacman/scripts/.lib/makepkg: line 1118: declare:
groups: not found
/home/allan/arch/code/pacman/scripts/.lib/makepkg: line 1118: declare:
backup: not found
/home/allan/arch/code/pacman/scripts/.lib/makepkg: line 1118: declare:
options: not found
/home/allan/arch/code/pacman/scripts/.lib/makepkg: line 1118: declare:
install: not found
/home/allan/arch/code/pacman/scripts/.lib/makepkg: line 1118: declare:
changelog: not found


More information about the pacman-dev mailing list