* 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.
Portage can't know that swfdec-mozilla-0.8.0 will use libswfdec-0.8.so.*.
(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.
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".
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*
# qfile -v /usr/lib/libswfdec-0.6.so.90*
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.
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.
This is fixed in svn r11740.
This is fixed in 2.2_rc13.