Gentoo Archives: gentoo-dev

From: Rich Freeman <rich0@g.o>
To: gentoo-dev <gentoo-dev@l.g.o>
Subject: Re: [gentoo-dev] Avoiding rebuilds (was: don't rely on dynamic deps)
Date: Sun, 27 Jul 2014 12:19:13
Message-Id: CAGfcS_=+eRpsWjv0zCdr22NJ3SyyhJoALV0JmTOYMokoTCQ4WQ@mail.gmail.com
In Reply to: [gentoo-dev] Avoiding rebuilds (was: don't rely on dynamic deps) by Ulrich Mueller
1 On Sun, Jul 27, 2014 at 6:16 AM, Ulrich Mueller <ulm@g.o> wrote:
2 > I wonder if it wouldn't be saner to leave our revision syntax
3 > untouched.
4 >
5 > Instead, one could introduce a variable INSTALL_VERSION that would
6 > default to ${PVR} but could be set to the version of a previous ebuild
7 > instead. The PM could compare it against INSTALL_VERSION in the VDB
8 > and skip build and installation if versions match.
9 >
10 > Advantages:
11 > - Support for the variable could be optional. PMs not supporting it
12 > would do a regular revbump instead.
13 > - One could even imagine USE-conditional syntax for the variable.
14
15 This isn't all that different from the concept I put out around having
16 the PM cache hashes of last-seen ebuilds, except that the hash is
17 editable so that developers can mess with it this way, allowing
18 revbumps to avoid rebuilds.
19
20 If an eclass/virtual/etc change impacted 200 packages, would you then
21 revbump all of them but setting INSTALL_VERSION on all the bumps?
22 That could involve a lot of ebuild munging. Also, if you add
23 hard-coded INSTALL_VERSIONs to ebuilds that lacked them previously,
24 maintainers would have to notice that and remove those the next time
25 they did a bump or even a non-revbump might not trigger a rebuild
26 since it is still pointing to the old minor revision.
27
28 I take it that we would also have the package manager not do dynamic
29 deps if the revision doesn't change if we used the INSTALL_VERSION
30 approach?
31
32 This scenario still beg's Kent's question, "why do we have to point
33 out to portage that the deps need reparsing?" If we're going to have
34 dynamic deps, then shouldn't reparsing deps be the default when they
35 change, and rebuilds should be the fallback when a big change happens
36 that dynamic deps can't handle? If so, then we already have a
37 mechanism for that - you change the revision when you want a rebuild,
38 and then this just comes down to devs revbumping when they need to,
39 and having the PM able to detect other changes and properly handle
40 them.
41
42 And yes, I know the argument is that some changes can never be
43 properly handled, but my point is that we only use dyanmic deps for
44 changes which can be handled properly, so we're just arguing over
45 whether that is the empty set or not.
46
47 Rich