Steps to reproduce:
1. emerge -1 =dev-db/oracle-instantclient-basic-10.2.0.3-r1
2. USE="apache2 oci8-instant-client" emerge -1 php
3. emerge -1 dev-db/oracle-instantclient-basic
4. ldd /usr/lib/apache2/modules/libphp5.so
5. /etc/init.d/apache restart
* libclntsh.so and libnnz10.so should be preserved
* libphp5.so should link all right, with no missing dependencies
* apache should start with php support
* libclntsh.so preserved as a direct dependency of libphp5.so
* libnnz10.so dropped, as it is a dependency of libclntsh.so
* ldd prints "libnnz10.so => not found"
* apache fails to start due to this missing dependency of the php module
To find this kind of indirect dependency, I found the following command useful:
$ LD_DEBUG=files LD_TRACE_LOADED_OBJECTS=1 /lib/ld-linux.so.2 <some *.so>
This actually prints which files are needed by which ones.
The NEEDED files seem to list direct dependencies correctly, but portage doesn't seem to take the transitive cover into account when unmerging, at least not the part corresponding to the package just being unmerged.
*** Bug 270022 has been marked as a duplicate of this bug. ***
(In reply to comment #1)
> *** Bug 270022 has been marked as a duplicate of this bug. ***
Are you sure? I'm running portage-2.2_rc33. If so, I guess this bug has seniority.
This should have been fixed by the following commit which uses a directed graph to keep track of the indirect *.so dependencies:
In 2.2.0_alpha34 there are lots of preserve-libs fixes, including bug 286714. Please re-open if you can still reproduce this with 2.2.0_alpha34.
Created attachment 273901 [details]
script to find libraries that are required indirectly
This script will find libraries that are useful for testing purposes. For example, on my system, one of the libraries that it identified was libgvnc-1.0.so.0.0.1:
In order to test the unmerge case (bug 286714), I unmerged gtk-vnc, and the library was correctly preserved:
!!! existing preserved libs:
>>> package: net-libs/gtk-vnc-0.4.3
* - /usr/lib/libgvnc-1.0.so
* - /usr/lib/libgvnc-1.0.so.0
* - /usr/lib/libgvnc-1.0.so.0.0.1
* - /usr/lib/libgtk-vnc-1.0.so
* - /usr/lib/libgtk-vnc-1.0.so.0
* - /usr/lib/libgtk-vnc-1.0.so.0.0.1
* used by /usr/lib/vinagre-1/plugins/libvnc.so (net-misc/vinagre-2.30.3)
In order to test the installation/upgrade case, I created a copy of of the gtk-vnc-0.4.3 ebuild and modified it so that it would install nothing. When I installed this empty ebuild, libgvnc-1.0.so.0.0.1 was correctly preserved in this case as well.