On Fri, Nov 29, 2024 at 01:42:40AM +0000, MYT wrote: > Hi Paul, > > thanks for the reply. To be honest I'm a bit confused about your suggestion > as I don't think I declared any new associative array. The patch only add new > value in the string with delimeter. So I'm not sure what you expect me to > change there :)
Probably(?) seen the new documentation bit with declare -A GIT_CRATES, however it matches the other example and that's fine. Also, -g should not really matter for that specific associative array (should make no real difference if it's local or global) and we haven't been using -g for that array across the tree in ebuilds. If there is a problem, then it would be beyond the scope of the changes you're proposing and it should be handled elsewhere (it'd be a tree-wide issue). tl;dr nothing for you to change there > > MYT > > > On Wednesday, 27 November 2024 at 16:14, Paul Zander > <negril.nx+gen...@gmail.com> wrote: > > > > > > > Hi, > > > > associative arrays declared in functions are implicitly local in bash. > > > > That means any associative array declared in global ebuild scope needs > > to be declare global explicitly, as it's not guaranteed not to be > > sourced within a function by a PM ( e.g. paludis does this ). > > > > https://lists.gnu.org/archive/html/bug-bash/2011-08/msg00274.html > > https://github.com/pkgcore/pkgcheck/issues/628 > > > > Paul > -- ionen
signature.asc
Description: PGP signature