public inbox for gentoo-pms@lists.gentoo.org
 help / color / mirror / Atom feed
From: David Leverton <levertond@googlemail.com>
To: gentoo-pms@lists.gentoo.org
Subject: Re: [gentoo-pms] License for code snippets included in PMS
Date: Sun, 13 Mar 2011 17:14:35 +0000	[thread overview]
Message-ID: <AANLkTikYN3imBPSNWbLd1b4V7gNjSeZvYQN424VP1oPw@mail.gmail.com> (raw)
In-Reply-To: <20110313164036.GA13362@hrair>

On 13 March 2011 16:40, Brian Harring <ferringb@gmail.com> 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.



  reply	other threads:[~2011-03-13 17:14 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-20  0:15 [gentoo-pms] License for code snippets included in PMS Ulrich Mueller
2011-02-24  7:49 ` Ulrich Mueller
2011-03-13 10:30   ` Petteri Räty
2011-03-13 14:10     ` Ulrich Mueller
2011-03-13 16:40       ` Brian Harring
2011-03-13 17:14         ` David Leverton [this message]
2011-03-13 16:58       ` Ciaran McCreesh
2011-03-14 22:23         ` Ulrich Mueller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=AANLkTikYN3imBPSNWbLd1b4V7gNjSeZvYQN424VP1oPw@mail.gmail.com \
    --to=levertond@googlemail.com \
    --cc=gentoo-pms@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox