Gentoo Archives: gentoo-dev

From: Dan Douglas <ormaaj@×××××.com>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] [PATCH] git-r3.eclass: Make EGIT_LIVE_* associative arrays
Date: Thu, 23 Jun 2016 11:29:12
Message-Id: 9629a5dd-6fff-3ef2-d985-af9e877db069@gmail.com
In Reply to: Re: [gentoo-dev] [PATCH] git-r3.eclass: Make EGIT_LIVE_* associative arrays by Michael Orlitzky
1 On 06/22/2016 09:56 PM, Michael Orlitzky wrote:
2 > On 06/22/2016 08:34 PM, Dan Douglas wrote:
3 >> On 06/22/2016 07:12 PM, Ulrich Mueller wrote:
4 >>>>>>>> On Wed, 22 Jun 2016, Dan Douglas wrote:
5 >>>
6 >>>> + [[
7 >>>> + ( BASH_VERSINFO[0] -ge 4 || EAPI -ge 6 ) &&
8 >>>> + $(declare -p "EGIT_${livevars[idx+1]}" 2>/dev/null) == 'declare -A'*
9 >>>> + ]] && ref=EGIT_${livevars[idx+1]}[\$PN]
10 >>>
11 >>> EAPI is not a number but a string, so don't use arithmetic comparison
12 >>> to test for it
13 >>
14 >> You mean in the future it may have non-digit values that pass the
15 >> `case $EAPI in ...)` at the top?
16 >
17 > Yeah, it would be perfectly legal to name the next EAPI "seven" and add
18 > it to the case statement at the top. Then [[ "seven" -ge 6 ]] is false.
19 >
20
21 Oh fun, thanks.
22
23 Well I just dropped the EAPI check since it was pointless anyway.
24
25 https://github.com/gentoo/gentoo/pull/1723/commits/3ebc1f57378a5ed4a62232ac87a0955ccdd33a4d

Attachments

File name MIME type
signature.asc application/pgp-signature

Replies