Gentoo Archives: gentoo-dev

From: Ian Stakenvicius <axs@g.o>
To: gentoo-dev <gentoo-dev@l.g.o>
Subject: [gentoo-dev] RFC: USE flags in virtuals, to allow a specific provider to be determined
Date: Fri, 25 Jul 2014 18:50:00
Message-Id: 53D2A6C8.9060900@gentoo.org
1 -----BEGIN PGP SIGNED MESSAGE-----
2 Hash: SHA256
3
4 Hey all.. So, putting aside for now how much of a mess this would be
5 to implement in the virtuals' ebuilds themselves, what do people think
6 of changing the virtuals so that they contain an entry in IUSE for
7 each provider that can satisfy it?
8
9 The idea here is that the package satisfying a virtual could be
10 optionally explicitly-chosen through package.use (or USE= in
11 make.conf, perhaps) instead of having an entry in @world, that way if
12 nothing depends on the virtual then it and the provider can be
13 - --depclean'ed from the system. The idea is specifically NOT to have
14 rdeps depend on these flags, that would undermine the whole purpose of
15 the virtual; it would just be for end-users to set if they so chose.
16
17 This may also help with getting portage to peg a virtual's provider to
18 a specific package instead of constantly trying to switch from one to
19 another, ie, how systemd kept getting pulled in, in relation to the
20 upower virtual. Note - I haven't done any tests to determine if this
21 actually helps with such issues tho (or even attempted to reproduce
22 them, as i was apparently one of the lucky ones that it didn't happen to).
23
24 I don't know if this would aid heavy binpkg users or not.
25
26
27 For completion, here's one of those rather messy examples:
28
29 - --- virtual/krb5-0.ebuild 2013-06-28 09:04:47.000000000 -0400
30 +++ virtual/krb5-0.ebuild.new 2014-07-25 14:47:48.000000000 -0400
31 @@ -2,7 +2,7 @@
32 # Distributed under the terms of the GNU General Public License v2
33 # $Header: /var/cvsroot/gentoo-x86/virtual/krb5/krb5-0.ebuild,v 1.2
34 2013/06/27 20:42:55 aballier Exp $
35
36 - -EAPI=3
37 +EAPI=5
38
39 DESCRIPTION="Virtual for Kerberos V implementation"
40 HOMEPAGE=""
41 @@ -11,7 +11,12 @@
42 LICENSE=""
43 SLOT="0"
44 KEYWORDS="alpha amd64 arm hppa ia64 m68k ~mips ppc ppc64 s390 sh
45 sparc x86 ~amd64-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos"
46 - -IUSE=""
47 +IUSE="heimdal mit-krb5"
48
49 DEPEND=""
50 - -RDEPEND="|| ( app-crypt/mit-krb5 app-crypt/heimdal )"
51 +RDEPEND="!mit-krb5? ( !heimdal? ( || ( app-crypt/mit-krb5
52 app-crypt/heimdal ) ) )
53 + mit-krb5? ( app-crypt/mit-krb5 )
54 + heimdal? ( app-crypt/heimdal )"
55 +
56 +REQUIRED_USE="heimdal? ( !mit-krb5 )
57 + mit-krb5? ( !heimdal )"
58
59
60 Thoughts?
61 -----BEGIN PGP SIGNATURE-----
62 Version: GnuPG v2
63
64 iF4EAREIAAYFAlPSpsgACgkQ2ugaI38ACPCBGwD6A7Dlras5l/L9Fc1SA8K8oR3K
65 LQKY5g/vbdvYFKtooDoBAKdLiFySl24mHKA0O2YScxmr4g5tvusVAd3dxWTIjnat
66 =gSFT
67 -----END PGP SIGNATURE-----

Replies