[pacman-dev] [PATCH v2 2/3] makepkg: use the `declare` builtin when backing up variables to eval
Allan McRae
allan at archlinux.org
Thu Jun 21 05:48:02 UTC 2018
On 20/06/18 06:26, Eli Schwartz wrote:
> This re-applies commit 9e52a36794552b77ecf26f7f34b226d096978f1e with
> fixes after reverting it in 10ca4f48311370cdd580f66096d5e94858fde467 for
> the maintenance release.
>
> The split package metadata backup/restore was initially refactored to
> use declare, which actually declares variables in a local scope when in
> a function. This did not play nicely with debug packages, which unset
> most metadata variables, thereby reverting to the global scope rather
> than resulting in unset metadata.
>
> This could be fixed by explicitly marking the variables as global, or,
> alternatively, by refactoring everything to use local function
> variables. However, the latter simply moves the issue to other areas
> (what happens if a user-defined package function uses unset instead of
> foo=() for the same effect).
>
> Now that the minimum version of bash has been raised, it is safe to once
> more apply (a working version of) this enhancement.
>
> Signed-off-by: Eli Schwartz <eschwartz at archlinux.org>
> ---
>
> v2: patchset now targets pacman 6.x and is rebased onto
> https://patchwork.archlinux.org/patch/631/
>
So, this patch is also broken.
Given the number of "fixed" versions that have been posted so far, I
will not accept a patch touching this piece of code again unless it
fixes a genuine bug. And given that no bugs have been found in that
code in the nine years since the pacman-3.2 release it was introduced in...
A
More information about the pacman-dev
mailing list