Ticket #1157 (new defect)
cave fix-linkage --library doesn't work with absolute paths
|Reported by:||cjm||Owned by:|
I upgraded sys-libs/readline on Gentoo. It warned me
*** Old versions of installed libraries were detected on your system. *** In order to avoid breaking packages that depend on these old libs, *** the libraries are not being removed. You need to run revdep-rebuild *** in order to remove these old dependencies. If you do not have this *** helper program, simply emerge the 'gentoolkit' package. *** *** # revdep-rebuild --library '/lib/libhistory.so.5' *** # revdep-rebuild --library '/lib/libreadline.so.5'
So I did:
# cave fix-linkage --library '/lib/libhistory.so.5' --library '/lib/libreadline.so.5' Searching: 12 directories, 85127 files No packages that depend on /lib/libhistory.so.5, /lib/libreadline.so.5 found
But I was suspicious, so I tried:
cave fix-linkage --library 'libhistory.so.5' --library 'libreadline.so.5'
That also searched 12 directories and 85127 files, but it found 7 packages that needed to be rebuilt because they were linked to the outdated libraries.
This is a big deal because Gentoo ebuilds print revdep-rebuild commands using absolute paths (as shown above). If you forget to remove the paths, then packages won't get rebuilt properly. Even if you remember to remove the paths, it's still a hassle to have to do it.
Perhaps fix-linkage should just strip paths from --library arguments? I'm not sure there's much use for them. At the very least, the manpage for fix-linkage needs a big warning message reminding people not to use absolute paths, but I think that's just asking for people to make mistakes.