Gentoo Archives: gentoo-dev

From: Jeremy Olexa <darkside@g.o>
To: gentoo-dev@l.g.o
Subject: [gentoo-dev] RFC: best way to introduce USE=prefix
Date: Fri, 03 Apr 2009 14:47:08
Message-Id: 90b936c0904030747la03fdeep10270107cf78c743@mail.gmail.com
1 Hello all,
2 In the Gentoo Prefix project we have a special USE flag: 'prefix',
3 kind of like $ARCH USE flags. I am writing here to ask of the best way
4 to introduce a global implicit USE flag to gentoo-x86. There has been
5 some interest from other devs to kill diffs in ebuilds between
6 gentoo-x86 and prefix overlay. The addition of this USE flag will
7 allow this to happen in a more staged approach.
8
9 We utilize the prefix USE flag for various things, such as (but not limited to):
10 -Exclude dependencies that the host OS provides (glibc, xorg-server, etc)
11 -No-op a particular action not appropriate for prefix
12 -Ensure a particular action that is only needed for prefix
13
14 ie.
15 # unavoidable conditional patch, can't submit upstream either, rare case
16 use prefix && epatch prefix-search-path.patch
17 # glibc is provided from the host OS, at least can't install in prefix
18 !prefix? ( elibc_glibc? ( >=sys-libs/glibc-2.36 ) )
19 # rarely seen in real life, but something like this is possible.
20 $(use_enable !prefix some-host-os-feature)
21
22 So, my recommendation is to:
23 1) mask the prefix USE flag in base/use.mask because no one except the
24 prefix profiles should use this flag.
25 2) unmask and force the USE flag in prefix profile.
26 3) add entry to use.desc.
27 addendum) use.{mask,force} imply that the USE flag is explicit so
28 there will be no QA warnings.
29
30 However, we have toyed with other ideas. One of which is to introduce
31 IUSE=prefix in prefix.eclass similar to the USE=multilib approach. I
32 don't really like this idea because it exposes the use flag and we
33 don't want it exposed to the users.
34
35 BTW, the prefix profiles are not in gentoo-x86 yet, discussion will
36 follow the USE flag introduction.
37
38 Thanks,
39 -Jeremy

Replies