Gentoo Archives: gentoo-user

From: Fernando Rodriguez <frodriguez.developer@×××××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Endless preserved-rebuild loop, libmozalloc & more
Date: Tue, 25 Aug 2015 17:43:58
Message-Id: BLU436-SMTP211046063E6A686B0698EB58D610@phx.gbl
In Reply to: Re: [gentoo-user] Endless preserved-rebuild loop, libmozalloc & more by Alan McKinnon
1 On Tuesday, August 25, 2015 12:30:09 PM Alan McKinnon wrote:
2 > On 25/08/2015 04:28, Fernando Rodriguez wrote:
3 > > On Monday, August 24, 2015 9:31:38 PM Alan McKinnon wrote:
4 > >> Does anyone have an opinion to offer on bug 501468?
5 > >>
6 > >> https://bugs.gentoo.org/show_bug.cgi?id=501468
7 > >>
8 > >> It's been annoying me for a week now with this message:
9 > >>
10 > >> !!! existing preserved libs:
11 > >>>>> package: www-client/firefox-40.0.2
12 > >> * - /usr/lib64/firefox/libmozalloc.so
13 > >> * used by /usr/lib64/thunderbird/components/libdbusservice.so
14 > >> (mail-client/thunderbird-38.2.0)
15 > >> * used by /usr/lib64/thunderbird/components/libmozgnome.so
16 > >> (mail-client/thunderbird-38.2.0)
17 > >> * used by
18 > >> /usr/lib64/thunderbird/distribution/extensions/{e2fda1a4-762b-4020-b5ad-
19 > > a41df1933103}/components/libcalbasecomps.so
20 > >> (mail-client/thunderbird-38.2.0)
21 > >> * used by 4 other files
22 > >>
23 > >>
24 > >> Both Mozilla products ship this file:
25 > >>
26 > >> $ locate libmozalloc
27 > >> /usr/lib64/firefox/libmozalloc.so
28 > >> /usr/lib64/thunderbird/libmozalloc.so
29 > >>
30 > >> and according to preserved libs, thunderbird linked to the firefox copy.
31 > >> The only offered solution on the bug is to use a MASK variable, which
32 > >> seems to me an ugly hammer to swat a fly.
33 > >>
34 > >> I was wondering if there's a better way been developed in the last year.
35 > >
36 > > Actually, now I have a general idea of what's going on and that sounds
37 like an
38 > > acceptable solution but perhaps I could be better. This is what happens:
39 > >
40 > > 1. revdep-rebuild uses ldd to find breakage. It finds breakage in
41 > > libdbusservice.so because firefox uses tricks to preload the library from
42 it's
43 > > directory.
44 > > 2. revdep-rebuild find that thunderbird provides the library and thinks it
45 > > needs to be rebuild. (And wrongly tells you that firefox links against it).
46 > >
47 > > A better way would be:
48 > >
49 > > 1. same as step 1 above
50 > > 2. revdep-rebuild checks the package that provides the broken binary (in
51 this
52 > > case the firefox package), if this package also provides the missing
53 library
54 > > then it's safe to ignore the problem.
55 > > 3. same as step 2 above.
56 > >
57 > > Another solution is to make patch firefox to use RPATH so ldd can find the
58 > > labraries, this would also make prelink work better with firefox but it's
59 > > probably not ideal to mantain.
60 >
61 >
62 > that does make sense. In my case, it's not revdep-rebuild causing
63 > problems, it's the preserved-rebuild message at the end of emerge -v
64 >
65 > At this level is there a difference?
66
67 I don't know the details but it seems to me that portage either uses revdep-
68 rebuild to find breakage (without scanning the whole system) before deleting
69 the old libs for good or duplicates some of it's logic. Come to think of it,
70 the SEARCH_DIR_MASK may not be ideal because if I understand what it does
71 correctly then real breakage in firefox won't be detected.
72
73 --
74 Fernando Rodriguez

Replies

Subject Author
Re: [gentoo-user] Endless preserved-rebuild loop, libmozalloc & more Alan McKinnon <alan.mckinnon@×××××.com>