Gentoo Archives: gentoo-user

From: Alan McKinnon <alan.mckinnon@×××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Q on portage's rational to re-emerge packages
Date: Fri, 27 Sep 2013 22:27:11
Message-Id: 52460528.30303@gmail.com
In Reply to: Re: [gentoo-user] Q on portage's rational to re-emerge packages by Philip Webb
1 On 27/09/2013 13:18, Philip Webb wrote:
2 > 130927 Hinnerk van Bruinehsen wrote:
3 >> you are encountering a relatively new feature of portage
4 >> that is supposed to make revdep-rebuild & emerge @preserve-rebuild obsolete.
5 >> The logic is, that if you update a package, other packages
6 >> depending on this package will automatically rebuild to prevent breakage.
7 >> It seems that in your case portage "thinks" that one of that packages
8 >> depends on zsh-completion and pulls that in for rebuild,
9 >> which in turn, most likely via setuptools or PyQt4,
10 >> pulls libreoffice to rebuild.
11 >
12 > I have found sometimes that Portage wants to remerge LO or similar,
13 > but in fact the existing installed version continues to work regardless.
14 > Try remerging the other pkgs first & see if LO still functions as usual ;
15 > only if it doesn't do you need to remerge it.
16
17
18 Also consider how portage "knows" to rebuild something. In truth, it
19 doesn't know and has no way to just find out. It has to rely on data
20 added to the ebuild, and that's where this new feature called sub-slots
21 comes in.
22
23 In a nutshell, it's a DEPEND in reverse. LO has this one for example:
24
25 =dev-util/mdds-0.8*:=
26
27 That's a classic DEPEND, to install LO you must have mdds, so it gets
28 pulled in and built. From then on portage keeps mdds up to date and
29 knows it must use only version 0.8.something.
30
31 So far so goo. But what happens if mdds-0.8.1 introduces an API/ABI
32 change that breaks LO? Traditionally we had no way of dealing with this
33 in ebuilds and had to rely on revdep-rebuild and @preserved-rebuild,
34 both of which are ugly hacks (never mind that they work reliably).
35 Portage still had no way of knowing breakage would happen if it did it's
36 usual thing, so that's where subslots come in (the := notation)[1]
37
38 Basically, it say something like "LO DEPENDS on mdds, but also if the
39 installed version of mdds later changes, then LO needs to be rebuilt to
40 properly link against the new (and changed) version of mdds.
41
42 This only works right if the ebuild maintainer is on the ball, watches
43 Changelogs for the DEPENDS packages and put the proper metadata in the
44 ebuild. You can imagine how this can work out very very well when done
45 right, and if the maintainer makes a mistake (or doesn't clearly
46 understand how it works) it can cause many unneccessary rebuilds (but
47 not actually *break* stuff). Huge packages like LO with many
48 interconnected DEPENDS are always going to be the usual victim I'm afraid...
49
50 And then there's things that use poppler, boost, PyQT and pykde4 - a
51 similar effect is at work.
52
53 End result = your cpus will be kept nice and toasty warm doing lots of
54 compiles but actual breakage of the sort that led to revdep-rebuild
55 being developed should reduce dramatically. Some unneccessary rebuilds
56 are the price we pay for not having breakage.
57
58 In Helmut's specific case here, the cause seems to be python-exec. I
59 missed that one myself somehow so had no idea it was hanging around
60 biting folks.
61
62
63
64 [1] For clarity, I'll leave out explaining syntax here, that is
65 documented elsewhere.
66
67
68 --
69 Alan McKinnon
70 alan.mckinnon@×××××.com

Replies

Subject Author
Re: [gentoo-user] Q on portage's rational to re-emerge packages "Stefan G. Weichinger" <lists@×××××.at>