Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 238957 - preserved libraries consumed by other preserved libraries are not removed when appropriate
Summary: preserved libraries consumed by other preserved libraries are not removed whe...
Status: RESOLVED FIXED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core - Dependencies (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords: InVCS
Depends on:
Blocks: preserve-libs 210077
  Show dependency tree
 
Reported: 2008-09-28 16:45 UTC by Petteri Räty (RETIRED)
Modified: 2008-11-02 00:59 UTC (History)
1 user (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Petteri Räty (RETIRED) gentoo-dev 2008-09-28 16:45:37 UTC
* Messages for package media-libs/swfdec-0.8.0:

 *
 * Pulseaudio and ALSA selected. Selecting mature ALSA backend.

 * GNU info directory index is up-to-date.

!!! existing preserved libs:
>>> package: media-libs/swfdec-0.8.0
 *  - /usr/lib/libswfdec-0.6.so.90
 *  - /usr/lib/libswfdec-0.6.so.90.0.0
Use emerge @preserved-rebuild to rebuild packages using these libraries
pena init.d # emerge @preserved-rebuild
emerge: 'preserved-rebuild' is an empty set
emerge: no targets left after set expansion

The scenario here is that I had swfdec-mozilla-0.6.0 installed and started upgrade to 0.8.0. It then first upgrades swfdec to 0.8.0 which causes preserved libs to kick in because swfdec-mozilla-0.6.0 but Portage should take into account that there won't be an issue any more when Portage finishes as by that time swfdec-mozilla is at 0.8.0.
Comment 1 Arfrever Frehtes Taifersar Arahesis (RETIRED) gentoo-dev 2008-09-28 22:00:31 UTC
Portage can't know that swfdec-mozilla-0.8.0 will use libswfdec-0.8.so.*.
Comment 2 Petteri Räty (RETIRED) gentoo-dev 2008-09-28 22:03:53 UTC
(In reply to comment #1)
> Portage can't know that swfdec-mozilla-0.8.0 will use libswfdec-0.8.so.*.
> 

The issue is that it shouldn't tell you to run preserved-rebuild when there is nothing to rebuild.
Comment 3 Arfrever Frehtes Taifersar Arahesis (RETIRED) gentoo-dev 2008-09-28 22:18:47 UTC
OK. The summary could be better, e.g. "At the end of execution of the same emerge command, Portage shouldn't show information about preservation of libraries which were later removed during unmerging of the last package which was using these libraries".
Comment 4 Martin von Gagern 2008-10-02 11:09:19 UTC
Same here. A few lines from the output for gnome-extra/swfdec-gnome-2.24.0 which was the last package emerged:

--- replaced dir /etc
<<<          dir /usr/share/doc/swfdec-gnome-2.22.2
 * Updating desktop mime database ...
 * Updating shared mime info database ...
<<< !needed   sym /usr/lib/libswfdec-gtk-0.6.so.90
<<< !needed   obj /usr/lib/libswfdec-gtk-0.6.so.90.0.0
>>> Regenerating /etc/ld.so.cache...
>>> Original instance of package unmerged safely.

(In reply to comment #3)
> libraries which were later removed during unmerging of the last package which
> was using these libraries.

The libs weren't really removed on my system:
# ls -1 /usr/lib/libswfdec-0.6.so.90*
/usr/lib/libswfdec-0.6.so.90
/usr/lib/libswfdec-0.6.so.90.0.0
# qfile -v /usr/lib/libswfdec-0.6.so.90*
media-libs/swfdec-0.8.0 (/usr/lib/libswfdec-0.6.so.90)
media-libs/swfdec-0.8.0 (/usr/lib/libswfdec-0.6.so.90.0.0)

To me that sounds like emerge claimed to remove those libs, but didn't actually do so. Only when I remerged swfdec, the libraries got actually removed.
Comment 5 Zac Medico gentoo-dev 2008-10-24 22:13:43 UTC
After studying this upgrade:

[binary     U ] media-libs/swfdec-0.8.0 [0.6.8]
[binary     U ] net-www/swfdec-mozilla-0.8.0 [0.6.0]

I've found that the preserve-libs code inside dblink.unmerge() does not properly account for the fact that libswfdec-gtk-0.6.so.90 is a consumer of libswfdec-0.6.so.90, which prevents the libswfdec-0.6.so.90 library from being removed when appropriate. The relevant code will have to be rewritten to account for cases like this, perhaps using a graph to track consumer relationships between libraries.
Comment 6 Zac Medico gentoo-dev 2008-10-28 23:06:31 UTC
This is fixed in svn r11740.
Comment 7 Zac Medico gentoo-dev 2008-11-02 00:59:02 UTC
This is fixed in 2.2_rc13.