Gentoo Archives: gentoo-dev

From: "Michał Górny" <mgorny@g.o>
To: gentoo-dev@l.g.o
Cc: pesa@g.o
Subject: Re: [gentoo-dev] RFC: using array variables in qt4-r2.eclass
Date: Sat, 14 Jul 2012 14:01:43
Message-Id: 20120714160042.7e8ea9b8@pomiocik.lan
In Reply to: Re: [gentoo-dev] RFC: using array variables in qt4-r2.eclass by Davide Pesavento
1 On Sat, 14 Jul 2012 12:29:59 +0200
2 Davide Pesavento <pesa@g.o> wrote:
3
4 > On Fri, Jul 13, 2012 at 3:50 PM, Alexis Ballier <aballier@g.o>
5 > wrote:
6 > > On Fri, 13 Jul 2012 15:26:58 +0200
7 > > Davide Pesavento <pesa@g.o> wrote:
8 > >
9 > >> > [...]
10 > >> >> + # backward compatibility for non-array variables
11 > >> >> + if [[ -n ${DOCS} ]] && [[ "$(declare -p DOCS 2>/dev/null
12 > >> >> 2>&1)" != "declare -a"* ]]; then
13 > >> >> + dodoc ${DOCS} || die "dodoc failed"
14 > >> >> + fi
15 > >> >> + if [[ -n ${HTML_DOCS} ]] && [[ "$(declare -p HTML_DOCS
16 > >> >> 2>/dev/null 2>&1)" != "declare -a"* ]]; then
17 > >> >> + dohtml -r ${HTML_DOCS} || die "dohtml failed"
18 > >> >> + fi
19 > >> >> }
20 > >> >
21 > >> > maybe issue an eqawarn in that case telling people to convert to
22 > >> > arrays; some time later make this an ewarn telling non-array
23 > >> > support will be removed and again later make this a die :)
24 > >> > (if you take that route i would expect you to start converting
25 > >> > packages to use arrays)
26 > >> >
27 > >>
28 > >> We have no intention of deprecating non-array variables in qt4-r2
29 > >> eclass.
30 > >
31 > > why ? having two codepaths for the same thing, one being inferior,
32 > > sounds like a good reason to deprecate the inferior one :)
33 > >
34 > > A.
35 > >
36 >
37 > Maintaining these two codepaths has practically zero cost, while
38 > forcing every ebuild using qt4-r2 to switch to arrays would waste
39 > developers' time which is better spent elsewhere.
40 >
41 > Furthermore, the non-array variant is not necessarily inferior,
42 > because it allows you to use bash globbing, brace expansion, etc...
43
44 And arrays stopped to allow that overnight?
45
46 --
47 Best regards,
48 Michał Górny

Attachments

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

Replies

Subject Author
Re: [gentoo-dev] RFC: using array variables in qt4-r2.eclass Davide Pesavento <pesa@g.o>