Gentoo Archives: gentoo-dev

From: Martin Vaeth <martin@×××××.de>
To: gentoo-dev@l.g.o
Subject: [gentoo-dev] Re: don't rely on dynamic deps
Date: Tue, 22 Jul 2014 18:40:46
Message-Id: slrnlstc0a.1m8.martin@epidot.math.uni-rostock.de
In Reply to: Re: [gentoo-dev] don't rely on dynamic deps by Ian Stakenvicius
1 Ian Stakenvicius <axs@g.o> wrote:
2 >
3 > The main issue that I see is
4 > - -how- VDB should be adjusted based on what changes are made to the
5 > ebuilds. For instance, if minimum versions of deps are adjusted
6 > in-place, should vdb be updated to match? what happens if the minimum
7 > version of the currently-installed dep is below the new one? etc. etc.
8
9 All these problems disappear with minor revisions:
10 You have to "install" the minor revisions just like any major revision,
11 just that some phases will be shortcut.
12 In particular, if the new dependencies are not satisfied, you get
13 conflicts as usual if you would want to upgrade to a new version
14 with dependencies not being satisfied.
15
16 > Also, in theory an EAPI bump with nothing else changing should be
17 > re-generatable in the VDB, but i have a gut feeling (no evidence, just
18 > a feeling) that going from say, EAPI2 to EAPI5 without doing some of
19 > the phase functions again (ie 'merge', maybe there are others that can
20 > affect VDB?) will result in a different VDB from a regular rebuild.
21
22 As far as I can see, the phase functions which can be skipped
23 are those from "EbuildExecuter".
24 If a package is special and needs to execute these functions,
25 then this package must not use minor revisions and needs to
26 be recompiled. Howeer, these packages should be rather rare;
27 I cannot even imagine a reason why this should be necessary.
28
29 For "merge" only the regeneration of CONTENTS in /var/db/pkg
30 should be skipped.
31
32 Concerning the confusion with "minor" revisions, I think that
33 just the version comparison function in portage needs to be tuned to
34 ignore minor revisions unless an extra parameter "minor" is passed:
35
36 This extra parameter is essentially only needed in the "best"
37 function and in the check whether phases need to be run.
38 The version comparison function should just return
39 -2, 2, 0 (if minor is not passed or False)
40 -2, 2, -1, 1, 0 (if minor True; the values +-1 mean that
41 *only* the minor revision differs).
42
43 For some parts (some eapi support, parts of EbuildExecuter and
44 version comparison), I have already some patches ready
45 for portage. However, I have almost no free time, and I am
46 not familiar enough with python and portage to do the rest
47 in a reasonable time
48 (e.g. I cannot put some writable attribute to EbuildExecuter
49 since apparently some python hack is used in portage which I
50 do not understand).
51 If there is interest, I can post my patches so far. Where?
52
53 What is not included in these patches, and I will probably
54 not find the time to include it:
55
56 1. The actual skipping of phases (since all my attempts to
57 set some flag led to the python error that all
58 attributes of EbuildExecuter are readonly :( )
59 2. The modification of the merge phase to not regenerate
60 CONTENTS
61 3. Reporting an error if minor versions are used with
62 non-matching EAPI. Surprisingly, this needs a bigger
63 rewrite, since the code generating the regular expression
64 for the version handling is currently not appropriate to
65 such an extension.
66 4. Updating of .tbz2 files - this is certainly a bigger work.
67 5. In particular, the patches could not be tested yet...
68
69 I would suggest to postpone 3. and 4. until the decision
70 is made...

Replies

Subject Author
Re: [gentoo-dev] Re: don't rely on dynamic deps Alexander Berntsen <bernalex@g.o>
[gentoo-dev] Re: don't rely on dynamic deps Ulrich Mueller <ulm@g.o>