Gentoo Archives: gentoo-dev

From: James Potts <arek75@×××××.com>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] RFC: USE flags in virtuals, to allow a specific provider to be determined
Date: Tue, 29 Jul 2014 04:23:11
Message-Id: CAO2dY5Gk4VDK__0-8fTKW5xeJVaTcGNKMV__BMu=DsCffqW8Yw@mail.gmail.com
In Reply to: Re: [gentoo-dev] RFC: USE flags in virtuals, to allow a specific provider to be determined by Ian Stakenvicius
1 On Mon, Jul 28, 2014 at 12:02 PM, Ian Stakenvicius <axs@g.o> wrote:
2 > -----BEGIN PGP SIGNED MESSAGE-----
3 > Hash: SHA256
4 >
5 > On 28/07/14 07:21 AM, Michał Górny wrote:
6 >> Dnia 2014-07-25, o godz. 14:49:44 Ian Stakenvicius <axs@g.o>
7 >> napisał(a):
8 >>
9 >>> Hey all.. So, putting aside for now how much of a mess this
10 >>> would be to implement in the virtuals' ebuilds themselves, what
11 >>> do people think of changing the virtuals so that they contain an
12 >>> entry in IUSE for each provider that can satisfy it?
13 >>>
14 >>> The idea here is that the package satisfying a virtual could be
15 >>> optionally explicitly-chosen through package.use (or USE= in
16 >>> make.conf, perhaps) instead of having an entry in @world, that
17 >>> way if nothing depends on the virtual then it and the provider
18 >>> can be - --depclean'ed from the system. The idea is specifically
19 >>> NOT to have rdeps depend on these flags, that would undermine the
20 >>> whole purpose of the virtual; it would just be for end-users to
21 >>> set if they so chose.
22 >>
23 >> I think I don't get this argument.
24 >>
25 >> If you really want to have a particular provider for the virtual
26 >> for external purposes, it's fully purposeful to put it in @world
27 >> or otherwise in a custom set. In this case, USE flags aren't
28 >> helpful.
29 >
30 > The argument I was trying to make is that USE flags would allow
31 > end-users to accomplish the same thing, while not having an entry in
32 > @world and therefore allowing the package to be --depclean'ed if the
33 > virtual is --depcleaned.
34 >
35 > I personally don't use sets so i've no idea if the exact same thing
36 > could be accomplished in sets; for some reason i don't think so.
37 >
38 >
39 >>
40 >> If you only prefer a particular provider, you can tip portage
41 >> easily to use it without resorting to USE flags. This also allows
42 >> portage to semi-transparently switch to other provider if
43 >> dependencies need it. In this case, USE flags only make this
44 >> auto-switching harder.
45 >
46 > That is the other part of this idea, to make auto-switching harder,
47 > because right now portage likes to auto-switch even when it seems like
48 > it shouldn't.
49 >
50 > I figure this idea would also help with Ciaran's wishlist item of ||()
51 > deps becoming more strictly-controlled and readily deterministic.
52 >
53 >
54 > -----BEGIN PGP SIGNATURE-----
55 > Version: GnuPG v2
56 >
57 > iF4EAREIAAYFAlPWgi8ACgkQ2ugaI38ACPBfoQD/bZmCxCdLM9EyeJRrst5QmD9X
58 > NS2Y0HCNhRnCfAuplUYA/2UHibYB6YHdKOi40RkWOUA0KMTRSwXYPR6dYsmByiQL
59 > =njwB
60 > -----END PGP SIGNATURE-----
61 >
62 Also, what about the case where multiple providers for the same
63 virtual are installed but the first doesn't satisfy the dependency?
64 Currently, portage only looks at the installed state of the providers,
65 in order, and will use the first installed provider it finds even if
66 it doesn't actually satisfy the dependency (e.g. due to use deps) and
67 the dependency is already satisfied by a different installed provider.
68 Paludis has an elegant solution for this situation (-F/-A), but afaik
69 portage doesn't. Use flags in virtuals would solve this without
70 having to hack around in portage and have it check all possible deps
71 before choosing one.
72
73 --James

Replies

Subject Author
Re: [gentoo-dev] RFC: USE flags in virtuals, to allow a specific provider to be determined Ciaran McCreesh <ciaran.mccreesh@××××××××××.com>