Gentoo Archives: gentoo-dev

From: Hilco Wijbenga <hilco.wijbenga@×××××.com>
To: Gentoo Dev <gentoo-dev@l.g.o>
Subject: Re: [gentoo-dev] Portage dependency solving algorithm
Date: Sat, 08 Nov 2014 18:11:43
Message-Id: CAE1pOi17VJ3D7nhVxuVuXYpmJh4=X51PNSkwj0-2O6dZVueU1g@mail.gmail.com
In Reply to: Re: [gentoo-dev] Portage dependency solving algorithm by Ciaran McCreesh
1 On 8 November 2014 05:40, Ciaran McCreesh
2 <ciaran.mccreesh@××××××××××.com> wrote:
3 > On Fri, 07 Nov 2014 20:57:41 +0100
4 > Jauhien Piatlicki <jauhien@g.o> wrote:
5 >> What;s wrong with input? PMS itself or how do maintainers write
6 >> ebuilds? Could you explain?
7 >
8 > A mixture of both. Gentoo developers like writing eclasses that write
9 > unnecessarily clever, highly messy and technically incorrect dependency
10 > strings (see how Perl and Ruby are done, for prime examples). Doing
11 > this kind of thing well requires support from PMS, so developers can
12 > express what they want to say directly rather than via some convoluted
13 > mess of nested ||s, []s, slot abuse and faked range dependencies.
14 > However, it's currently culturally more acceptable to try to make
15 > yourself look clever by writing the new "world's most convoluted family
16 > of eclasses", so developers aren't asking for the features they need.
17 >
18 > In a way, this brings us back to SAT and CNF. Although you *can* encode
19 > this kind of thing in SAT (or rather, in QSAT...), the encoding is
20 > utterly opaque and doesn't lend itself to a good algorithm. The
21 > dependencies some developers are writing are nearly as bad.
22
23 So would it make sense then to move to a more declarative ebuild
24 model? Or just a "better" model?
25
26 Both Portage and Paludis at some point figure out what they think is
27 needed to install an ebuild. At that point, they could emit an ebuild
28 in a "new and improved" model? I have no doubt that this scheme would
29 fail utterly for many of the more complex/convoluted ebuilds but if it
30 worked for, say, 80% then the work to improve the tree would be
31 drastically reduced.
32
33 (I only write the simplest of ebuilds so I'm undoubtedly
34 oversimplifying but I thought I would throw this idea out there.)

Replies

Subject Author
Re: [gentoo-dev] Portage dependency solving algorithm Ciaran McCreesh <ciaran.mccreesh@××××××××××.com>