Gentoo Archives: gentoo-portage-dev

From: Zac Medico <zmedico@g.o>
To: gentoo-portage-dev@l.g.o, Alec Warner <antarus@g.o>
Cc: Zac Medico <zmedico@g.o>
Subject: Re: [gentoo-portage-dev] [PATCH] dep_zapdeps: fix virtual/rust handling (bug 645416)
Date: Wed, 24 Jan 2018 00:52:00
Message-Id: 23a7961e-e729-910d-0a1d-a0d8cba208ff@gentoo.org
In Reply to: Re: [gentoo-portage-dev] [PATCH] dep_zapdeps: fix virtual/rust handling (bug 645416) by Alec Warner
1 On 01/23/2018 03:11 PM, Alec Warner wrote:
2 > I'm starting to be a bit sad about this for a couple of reasons.
3 >
4 > 1) dep_zapdeps is pretty big at this point, and every tweak for || ()
5 > just grows it. Do we have any idea:
6 >   a) When dep_zapdeps will be 'done'?
7
8 We're gradually approaching a point were it can't be improved much more,
9 without major refactoring.
10
11 >   b) Plans for splitting it into more manageable pieces?
12
13 The next step is to evaluate the overlapping || deps for multiple
14 packages at the same time, using DNF. That will be a good time for
15 refactoring.
16
17 > 2) In general I worry that the logic for || () will essentially never be
18 > complete, and we will be forced to tweak the implementation forever as
19 > cases arise where the algorithm fails to compute the 'right' answer.
20 > I'm a bit curious what 'right' even is anymore. The devmanual doesn't
21 > really describe how any-of dependencies are resolved and so the changes
22 > seem rather arbitrary.
23
24 The 'right' answer is optimal in the sense that it:
25
26 1) Installs the minimum number of packages necessary
27 2) Upgrades all packages to the latest version possible
28 3) Prefers choices toward the left when there's no overriding reason to
29 do otherwise (1 or 2 above)
30
31 > I am not worried about specific changes (like
32 > this one) but the fact that we continually apply changes to make the
33 > 'right' thing happen is the larger concern.
34
35 I'd worried if we didn't have unit tests which prove that it's behaving
36 optimally for that cases that it's designed to handle. It's gradually
37 approaching the point where we can't change the behavior much without
38 making it behave sub-optimally for some of our existing test cases.
39 --
40 Thanks,
41 Zac

Attachments

File name MIME type
signature.asc application/pgp-signature