On Tue, 7 Jun 2016 16:31:52 -0400 Michael Orlitzky <m...@gentoo.org> wrote:
> On 06/07/2016 02:57 PM, Michał Górny wrote: > > > > The point is that: > > > > 1. REQUIRED_USE is semi-machine-understandable while pkg_pretend() is > > some random function crap. > > Why do users care about that? Why do I even care about that? The whole > ebuild is random function crap. The only benefit is consistent output, > but it's consistently awful. > > > > Portage can be improved to take some sensible action on it. > > I'll believe this when I see it =P You won't because the Gentoo way is to create a shitload of hacks instead of fixing the root issue. > > 2. REQUIRED_USE can be handled early during dependency resolution. > > pkg_pretend() is like I want 5 minutes for Portage to calculate > > the dependencies, then 2 minutes to run pkg_pretend()s, then it tells > > me I am supposed to change one thing and start over. > > So 7 minutes for an understandable English description of the error and > how to fix it, versus 5 minutes for line noise? There's a great story in > The Psychology of Computer Programming that ends like this: Not 5 minutes. Depending on the context, Portage can complain about REQUIRED_USE in a few seconds because it has no further point in evaluating the depgraph. Versus wasting a lot of time on a huge depgraph that will be never used because although it seems to be correct, it isn't and pkg_pretend() is used to tell 'you did all the work for nothing'. Back to EAPI 0, eh? > > 3. REQUIRED_USE can take USE dependencies into account. pkg_pretend() > > can't. > > What do you mean here? I mean that if A depends on B[gtk2], and you have ^^ ( gtk2 gtk3 ), Portage will clearly know gtk2 is the only solution. Your pkg_pretend() will tell user to enable gtk3, then Portage will hit unsolvable deps. Congratulations, your helpful output just resulted in even worse output! > > 4. pkg_pretend() is slow, and should be used scarcely. Adding > > an additional slow step for each package on the list, before starting to > > build packages is not really helpful. > > > > See #2, but "each package" is an overestimate. Only the ones with a > non-trivial pkg_pretend() phase would take any time. Have you tried it, or is it wild guess? What I'm saying is that *pkg_pretend implementation in Portage is TERRIBLY SLOW*. Even a complete no-op takes a lot of time because Portage needs to do a lot of setup to run it, and can't do multiple packages in parallel. -- Best regards, Michał Górny <http://dev.gentoo.org/~mgorny/>
pgpSWkIbtwo2j.pgp
Description: OpenPGP digital signature