Gentoo Archives: gentoo-dev

From: Kent Fredric <kentnl@g.o>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] Proposed future EAPI feature: FILES whitelist
Date: Fri, 16 Sep 2016 18:43:40
Message-Id: 20160917064258.76d91196@katipo2.lan
In Reply to: Re: [gentoo-dev] Proposed future EAPI feature: FILES whitelist by Ulrich Mueller
1 On Fri, 16 Sep 2016 20:34:49 +0200
2 Ulrich Mueller <ulm@g.o> wrote:
3
4 > That is, similar syntax as for SRC_URI? That would make parsing of the
5 > FILES variable by ebuilds practically impossible. So presumably, one
6 > would need another variable similar to A then, containing the files
7 > from FILES but without the USE-disabled ones.
8
9 Yeah, that's the sort of misgivings I had when I thought of a similar
10 idea myself.
11
12 I'd much rather a way to label groups of files by purpose, have portage
13 validate them, and then apply certain labels manually against certain
14 USE flags
15
16 For instance,
17
18 FILES["foo"] = "foo.patch bar.patch"
19 FILES["quux"] = "quux.patch"
20
21 ...
22
23 if use foo; then
24 eapply $FILES["foo"]
25 else
26 eapply $FILES["quux"]
27 fi
28
29 But that gets into things that are too hard to do in bash, like named
30 arrays ( doable but unfamilar for most ) and arrays-in-named-arrays
31 ( ummm )
32
33 Probably not a good idea to push the limitations of bash in this way.