Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bugzilla DB migration completed. Please report issues to Infra team via email via infra@gentoo.org or IRC
Bug 652382 - Portage should recognize circular dependencies between shared objects in @preserved-rebuild
Summary: Portage should recognize circular dependencies between shared objects in @pre...
Status: CONFIRMED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: preserve-libs
  Show dependency tree
 
Reported: 2018-04-04 00:19 UTC by Matt Turner
Modified: 2019-02-27 22:05 UTC (History)
1 user (show)

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


Attachments
dep.pdf, showing dependency graph of the listed shared objects (dep.pdf,15.84 KB, application/pdf)
2018-04-04 00:19 UTC, Matt Turner
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Matt Turner gentoo-dev 2018-04-04 00:19:32 UTC
Created attachment 526502 [details]
dep.pdf, showing dependency graph of the listed shared objects

If there are two shared objects that depend on each other (freetype and harfbuzz, for instance), portage will preserve both and is unable to recognize that they are not needed.

For example:

>>> package: sys-libs/zlib-1.2.11-r1
 *  - /lib32/libz.so.1
 *  - /lib32/libz.so.1.2.11
 *      used by /usr/lib32/libfreetype.so.6 (preserved)
 *      used by /usr/lib32/libfreetype.so.6.16.0 (preserved)
 *      used by /usr/lib32/libpng16.so.16 (preserved)
 *      used by /usr/lib32/libpng16.so.16.34.0 (preserved)
>>> package: dev-libs/glib-2.52.3
 *  - /usr/lib32/libglib-2.0.so.0
 *  - /usr/lib32/libglib-2.0.so.0.5200.3
 *      used by /usr/lib32/libharfbuzz.so.0 (preserved)
 *      used by /usr/lib32/libharfbuzz.so.0.10706.0 (preserved)
>>> package: media-gfx/graphite2-1.3.11
 *  - /usr/lib32/libgraphite2.so.3
 *  - /usr/lib32/libgraphite2.so.3.0.1
 *      used by /usr/lib32/libharfbuzz.so.0 (preserved)
 *      used by /usr/lib32/libharfbuzz.so.0.10706.0 (preserved)
>>> package: dev-libs/libpcre-8.42
 *  - /lib32/libpcre.so.1
 *  - /lib32/libpcre.so.1.2.10
 *      used by /usr/lib32/libglib-2.0.so.0 (preserved)
 *      used by /usr/lib32/libglib-2.0.so.0.5200.3 (preserved)
>>> package: media-libs/harfbuzz-1.7.6
 *  - /usr/lib32/libharfbuzz.so.0
 *  - /usr/lib32/libharfbuzz.so.0.10706.0
 *      used by /usr/lib32/libfreetype.so.6 (preserved)
 *      used by /usr/lib32/libfreetype.so.6.16.0 (preserved)
>>> package: app-arch/bzip2-1.0.6-r8
 *  - /lib32/libbz2.so.1
 *  - /lib32/libbz2.so.1.0.6
 *      used by /usr/lib32/libfreetype.so.6 (preserved)
 *      used by /usr/lib32/libfreetype.so.6.16.0 (preserved)
>>> package: media-libs/libpng-1.6.34
 *  - /usr/lib32/libpng16.so.16
 *  - /usr/lib32/libpng16.so.16.34.0
 *      used by /usr/lib32/libfreetype.so.6 (preserved)
 *      used by /usr/lib32/libfreetype.so.6.16.0 (preserved)
>>> package: media-libs/freetype-2.9
 *  - /usr/lib32/libfreetype.so.6
 *  - /usr/lib32/libfreetype.so.6.16.0
 *      used by /usr/lib32/libharfbuzz.so.0 (preserved)
 *      used by /usr/lib32/libharfbuzz.so.0.10706.0 (preserved)
Use emerge @preserved-rebuild to rebuild packages using these libraries


There are no executables that require any of those shared objects, but libharfbuzz.so is preserved for libfreetype.so and vice versa, so none can be removed.

Portage should recognize this dependency loop and remove them.
Comment 1 Matt Turner gentoo-dev 2019-02-27 22:05:43 UTC
FWIW, this is easy to reproduce by transitioning from a multilib profile to a non-multilib profile.