Gentoo Archives: gentoo-dev

From: "Michał Górny" <mgorny@g.o>
To: Michael Orlitzky <mjo@g.o>
Cc: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] [RFC] Global USE=gui
Date: Tue, 07 Jun 2016 21:00:08
Message-Id: 20160607225942.7b1c8cc3.mgorny@gentoo.org
In Reply to: Re: [gentoo-dev] [RFC] Global USE=gui by Michael Orlitzky
1 On Tue, 7 Jun 2016 16:31:52 -0400
2 Michael Orlitzky <mjo@g.o> wrote:
3
4 > On 06/07/2016 02:57 PM, Michał Górny wrote:
5 > >
6 > > The point is that:
7 > >
8 > > 1. REQUIRED_USE is semi-machine-understandable while pkg_pretend() is
9 > > some random function crap.
10 >
11 > Why do users care about that? Why do I even care about that? The whole
12 > ebuild is random function crap. The only benefit is consistent output,
13 > but it's consistently awful.
14 >
15 >
16 > > Portage can be improved to take some sensible action on it.
17 >
18 > I'll believe this when I see it =P
19
20 You won't because the Gentoo way is to create a shitload of hacks
21 instead of fixing the root issue.
22
23 > > 2. REQUIRED_USE can be handled early during dependency resolution.
24 > > pkg_pretend() is like I want 5 minutes for Portage to calculate
25 > > the dependencies, then 2 minutes to run pkg_pretend()s, then it tells
26 > > me I am supposed to change one thing and start over.
27 >
28 > So 7 minutes for an understandable English description of the error and
29 > how to fix it, versus 5 minutes for line noise? There's a great story in
30 > The Psychology of Computer Programming that ends like this:
31
32 Not 5 minutes. Depending on the context, Portage can complain about
33 REQUIRED_USE in a few seconds because it has no further point
34 in evaluating the depgraph.
35
36 Versus wasting a lot of time on a huge depgraph that will be never used
37 because although it seems to be correct, it isn't and pkg_pretend() is
38 used to tell 'you did all the work for nothing'. Back to EAPI 0, eh?
39
40 > > 3. REQUIRED_USE can take USE dependencies into account. pkg_pretend()
41 > > can't.
42 >
43 > What do you mean here?
44
45 I mean that if A depends on B[gtk2], and you have ^^ ( gtk2 gtk3 ),
46 Portage will clearly know gtk2 is the only solution. Your pkg_pretend()
47 will tell user to enable gtk3, then Portage will hit unsolvable deps.
48 Congratulations, your helpful output just resulted in even worse
49 output!
50
51 > > 4. pkg_pretend() is slow, and should be used scarcely. Adding
52 > > an additional slow step for each package on the list, before starting to
53 > > build packages is not really helpful.
54 > >
55 >
56 > See #2, but "each package" is an overestimate. Only the ones with a
57 > non-trivial pkg_pretend() phase would take any time.
58
59 Have you tried it, or is it wild guess? What I'm saying is that
60 *pkg_pretend implementation in Portage is TERRIBLY SLOW*. Even
61 a complete no-op takes a lot of time because Portage needs to do a lot
62 of setup to run it, and can't do multiple packages in parallel.
63
64 --
65 Best regards,
66 Michał Górny
67 <http://dev.gentoo.org/~mgorny/>

Replies

Subject Author
Re: [gentoo-dev] [RFC] Global USE=gui Ciaran McCreesh <ciaran.mccreesh@××××××××××.com>
Re: [gentoo-dev] [RFC] Global USE=gui Michael Orlitzky <mjo@g.o>