Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 30095 - revdep-rebuild wants to rebuild package providing lib
Summary: revdep-rebuild wants to rebuild package providing lib
Status: CONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Portage Tools Team
URL:
Whiteboard:
Keywords: Inclusion
: 210383 (view as bug list)
Depends on:
Blocks:
 
Reported: 2003-10-01 11:39 UTC by Don Seiler (RETIRED)
Modified: 2019-08-19 06:28 UTC (History)
8 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
revdep-rebuild_skip-rebuild-libowner.patch (revdep-rebuild_skip-rebuild-libowner.patch,4.89 KB, patch)
2008-02-25 16:32 UTC, michael@smith-li.com
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Don Seiler (RETIRED) gentoo-dev 2003-10-01 11:39:43 UTC
revdep-rebuild --soname libcrypto.so.0.9.6 wants to rebuild openssl.  This is
looks like because libssl.so.0.9.6 depends on libcrypto.so.0.9.6 but rebuilding
openssl is pointless since I had just rebuilt it, prompting me to do the
revdep-rebuild in the first place.

Should probably do a check for this kind of circular behavior.

Reproducible: Always
Steps to Reproduce:
1. emerge openssl-0.9.7c
2. revdep-rebuild --soname libcrypto.so.0.9.6

Actual Results:  
It starts rebuilding openssl-0.9.7c

Expected Results:  
Ignore openssl.
Comment 1 Don Seiler (RETIRED) gentoo-dev 2003-10-01 12:01:59 UTC
Just to also note that "revdep-rebuild --soname libcrypto.so.0.9.6" will
always see that libssl.so.0.9.6 then until the file is manually deleted.
Comment 2 Stanislav Brabec 2003-10-02 11:46:57 UTC
Hmm, this is a problem, because generally you don't know, that linking against
this library is delibrate (as for openssl) or mistake (as for some versions
of GIMP, where just compiled plug-ins were linked against old version of
library). For example some 

And generally, it is not a good idea, that some package provides two incompatible
libraries - I have got warning messages from linker, because half of libraries
was linked against libcrypto.so.0.9.6 and second half against libcrypto.so.0.9.7.
If the library contains static strings, it can be allocated twice and some
calls use one instance, other second one.

I know, for openssl it's nearly must.

But I haven't any idea, how to discriminate, that it's OK for libssl.so.0.9.6
to be linked against libcrypto.so.0.9.6, but it's not OK for, say libssl.so.0.9.7
(for correctly written packages it cannot occur, but there are many packages
with this bug).
Comment 3 Jakub Moc (RETIRED) gentoo-dev 2006-09-08 07:11:14 UTC
Any ideas here? Still an issue w/ openssl-0.9.8c
Comment 4 Paul Varner (RETIRED) gentoo-dev 2006-09-12 20:28:32 UTC
Unfortunately, I don't have any ideas. However, I still have some boxes that need openssl updated and will play with it then to see if I can come up with anything.
Comment 5 Jakub Moc (RETIRED) gentoo-dev 2008-02-16 18:27:32 UTC
*** Bug 210383 has been marked as a duplicate of this bug. ***
Comment 6 DEMAINE Benoît-Pierre, aka DoubleHP 2008-02-16 19:05:38 UTC
I am author of bug 210383 closed above.

Will dev-libs/nspr-4.7 require a fix ? or will the fix lay in revdep ?
Comment 7 Jakub Moc (RETIRED) gentoo-dev 2008-02-16 19:08:07 UTC
(In reply to comment #6)

There's nothing to fix in the ebuilds; revdep-rebuild should drop the owner of the file passed to it via --library from the list of stuff to be rebuilt.
Comment 8 michael@smith-li.com 2008-02-23 23:49:06 UTC
(In reply to comment #7)
> (In reply to comment #6)
> 
> There's nothing to fix in the ebuilds; revdep-rebuild should drop the owner of
> the file passed to it via --library from the list of stuff to be rebuilt.

That's easily done if the user passes a fully-qualified path-to-soname to --library. What should we do if he uses a pattern like libcr.*\.so.*?

If we dropped the pattern-matching logic it would be much easier to fix this bug. (Frankly, I'm of the opinion that the soname-regex pattern matching logic is not worth keeping -- it's a pain to maintain and I don't believe it's used all that often.) We could allow lists of sonames without allowing actual regex.

Thoughts?
Comment 9 Zac Medico gentoo-dev 2008-02-24 00:14:56 UTC
If you have a fully-qualified path as suggested in comment #8 then you can use the `portageq owners` command to find the owner. That command does inode comparison if necessary to ensure that it works even if the path you give it isn't exactly the same as the one listed in the contents (due to symlinks).

There's also a `portageq contents` command that you can use to get a full contents listing for a package but it would be kind of slow to call that for each installed package until you find a match.
Comment 10 michael@smith-li.com 2008-02-25 16:32:58 UTC
Created attachment 144587 [details, diff]
revdep-rebuild_skip-rebuild-libowner.patch

With this patch r-r greps the full path of the library from the output of ldd. Then it tries to find the owner of that lib. If it finds a match it adds the package to an exclude list and won't rebuild that package unless the (new) -O/--merge-owner flag is used.

Please test.

(There is one known bug with it, if the --library pattern matches more than one line of ldd's output only the first line will be used. Most of the time that shouldn't be a big deal, but it could cause some owners to still get rebuilt. I have a plan to fix it...)
Comment 11 Doktor Notor 2010-03-20 06:44:38 UTC
So, anyone looking at this? Still there, just hit it w/ dev-libs/icu
Comment 12 Paul Varner (RETIRED) gentoo-dev 2010-03-22 19:29:06 UTC
I'll look at it for inclusion in the the gentoolkit-0.3.0 series.  To be honest, this hasn't been a high priority since it is more of an annoyance than anything.

Regarding icu, that one looked legitimate since the package failed to install libicutest.so.44 required by /usr/bin/icuinfo
Comment 13 Paul Varner (RETIRED) gentoo-dev 2011-06-15 04:44:35 UTC
Let's see if we can fix this in 0.3.1
Comment 14 Pacho Ramos gentoo-dev 2012-07-25 20:44:26 UTC
(In reply to comment #10)
> Created attachment 144587 [details, diff] [details, diff]
> revdep-rebuild_skip-rebuild-libowner.patch
> 
> With this patch r-r greps the full path of the library from the output of
> ldd. Then it tries to find the owner of that lib. If it finds a match it
> adds the package to an exclude list and won't rebuild that package unless
> the (new) -O/--merge-owner flag is used.
> 
> Please test.
> 
> (There is one known bug with it, if the --library pattern matches more than
> one line of ldd's output only the first line will be used. Most of the time
> that shouldn't be a big deal, but it could cause some owners to still get
> rebuilt. I have a plan to fix it...)

Any news on this? I hit this on every opensp update

Thanks!
Comment 15 Tom Wijsman (TomWij) (RETIRED) gentoo-dev 2013-07-06 19:07:33 UTC
Ping. Is this still a problem?

The listed versions in this bug are no longer in the Portage tree.
Comment 16 Paul Varner (RETIRED) gentoo-dev 2013-07-08 17:45:12 UTC
Yes, this is still an issue. If you run revdep-rebuild --library libcrypto.so.1.0.0 --pretend, you will see openssl in the list of packages to be rebuilt.