Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 253121 - portage-2.2_rc20 doesn't preserve indirect *.so dependencies
Summary: portage-2.2_rc20 doesn't preserve indirect *.so dependencies
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core - Dependencies (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Portage team
: 270022 (view as bug list)
Depends on:
Blocks: preserve-libs
  Show dependency tree
Reported: 2008-12-30 11:20 UTC by Martin von Gagern
Modified: 2011-05-19 03:41 UTC (History)
2 users (show)

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

script to find libraries that are required indirectly (,1.26 KB, text/x-python)
2011-05-19 03:41 UTC, Zac Medico

Note You need to log in before you can comment on or make changes to this bug.
Description Martin von Gagern 2008-12-30 11:20:54 UTC
Steps to reproduce:
1. emerge -1 =dev-db/oracle-instantclient-basic-
2. USE="apache2 oci8-instant-client" emerge -1 php
3. emerge -1 dev-db/oracle-instantclient-basic
4. ldd /usr/lib/apache2/modules/
5. /etc/init.d/apache restart

Expected result:
* and should be preserved
* should link all right, with no missing dependencies
* apache should start with php support

Actual result:
* preserved as a direct dependency of
* dropped, as it is a dependency of
* ldd prints " => 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/ <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.
Comment 1 Sebastian Luther (few) 2009-05-16 06:30:10 UTC
*** Bug 270022 has been marked as a duplicate of this bug. ***
Comment 2 Bob Raitz 2009-05-16 07:06:41 UTC
(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.
Comment 3 Zac Medico gentoo-dev 2011-05-18 16:56:04 UTC
This should have been fixed by the following commit which uses a directed graph to keep track of the indirect *.so dependencies:;a=commit;h=a97986713e6a0138551970592fad3a63a6a7d7ae

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.
Comment 4 Zac Medico gentoo-dev 2011-05-19 03:41:10 UTC
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

  net-libs/gtk-vnc-0.4.3 /usr/lib/

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/
 *  - /usr/lib/
 *  - /usr/lib/
 *  - /usr/lib/
 *  - /usr/lib/
 *  - /usr/lib/
 *      used by /usr/lib/vinagre-1/plugins/ (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, was correctly preserved in this case as well.