Gentoo Logo
Gentoo Spaceship




Note: Due to technical difficulties, the Archives are currently not up to date. GMANE provides an alternative service for most mailing lists.
c.f. bug 424647
List Archive: gentoo-pms
Navigation:
Lists: gentoo-pms: < Prev By Thread Next > < Prev By Date Next >
Headers:
To: gentoo-pms@g.o
From: David Leverton <levertond@...>
Subject: Re: License for code snippets included in PMS
Date: Sun, 13 Mar 2011 17:14:35 +0000
On 13 March 2011 16:40, Brian Harring <ferringb@...> wrote:
> This section wasn't accurate, as such I threw it out- attached is a
> brain dump of exactly what characteristics can be relied on for
> env saving, and should be reasonably complete.
>
> Could stand to have some comments added though.

As discussed on IRC, the use of "declare" here is problematic, because
inside a function it acts like "local", even if said function is part
of the PM that sources the ebuild.  This would put a pretty nasty
constraint on the PM implementation, and wouldn't work in eclasses
anyway because of the "inherit" function.  Arrays can still be used
simply by not using "declare" and just assigning them, which doesn't
have the implicit local attached, so all that's needed is to change
"declare -a ARRAY_VARIABLE=( a b )" in the patch to simply
"ARRAY_VARIABLE=( a b )".

(See also http://bugs.gentoo.org/show_bug.cgi?id=309369, in which this
caused problems with loading environment.bz2 files.)

As an aside, bash 4.2 has "declare -g" to override the implicit local,
but it'll be a while before we can start using that in ebuilds.


References:
License for code snippets included in PMS
-- Ulrich Mueller
Re: License for code snippets included in PMS
-- Ulrich Mueller
Re: License for code snippets included in PMS
-- Petteri R├Ąty
Re: License for code snippets included in PMS
-- Ulrich Mueller
Re: License for code snippets included in PMS
-- Brian Harring
Navigation:
Lists: gentoo-pms: < Prev By Thread Next > < Prev By Date Next >
Previous by thread:
Re: License for code snippets included in PMS
Next by thread:
Re: License for code snippets included in PMS
Previous by date:
Re: License for code snippets included in PMS
Next by date:
Re: License for code snippets included in PMS


Updated Jul 18, 2012

Summary: Archive of the gentoo-pms mailing list.

Donate to support our development efforts.

Copyright 2001-2013 Gentoo Foundation, Inc. Questions, Comments? Contact us.