Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 243030

Summary: sys-apps/portage-2.2_rc12: fails handling multi-level preserved-libs
Product: Gentoo Linux Reporter: Matthias Schwarzott <zzam>
Component: New packagesAssignee: Portage team <dev-portage>
Status: RESOLVED FIXED    
Severity: normal CC: pesa
Priority: High Keywords: InVCS
Version: unspecified   
Hardware: All   
OS: Linux   
See Also: https://bugs.gentoo.org/show_bug.cgi?id=652382
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 240323, 210077    
Attachments: exclude preserved libs themselves when calculating consumers of preserved libs

Description Matthias Schwarzott gentoo-dev 2008-10-21 10:38:50 UTC
1. Before unmasking the new x264 and ffmpeg ebuilds I had
x264:
Installed libx264.so.61
ffmpeg:
Installed libavcodec.so.51 that links against libx264.so.61.

2. Updating: portage did x264 first (for DEPEND of ffmpeg) and so updated the lib to libx264.so.65.
Portage kept libx264.so.61 for ffmpeg.

3. Updating ffmpeg: new ffmpeg provides libavcodec.so.52, but old is kept for xine-lib linking against it.

4. emerge @preserved-rebuild

First failure: emerge does suggest to rebuild ffmpeg.
This should not be, as ffmpeg itself does not link against old x264, only the preserved libavcodec-lib does.

Second failure: After re-building xine-lib it removed old libavcodec.so.51, but did not remove old libx264.so.61.

# emerge --info
Portage 2.2_rc12 (default/linux/x86/2008.0/desktop, gcc-4.3.2, glibc-2.8_p20080602-r0, 2.6.25-tuxonice-r6 i686)
=================================================================
System uname: Linux-2.6.25-tuxonice-r6-i686-AMD_Athlon-tm-_XP_3000+-with-glibc2.0
Timestamp of tree: Tue, 21 Oct 2008 07:15:02 +0000
distcc 2.18.3 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [disabled]
ccache version 2.4 [enabled]
app-shells/bash:     3.2_p39
dev-java/java-config: 1.3.7, 2.1.6-r1
dev-lang/python:     2.5.2-r8
dev-python/pycrypto: 2.0.1-r6
dev-util/ccache:     2.4-r8
dev-util/cmake:      2.6.2
sys-apps/baselayout: 2.0.0
sys-apps/openrc:     9999
sys-apps/sandbox:    1.2.18.1-r3
sys-devel/autoconf:  2.13, 2.63
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10.1-r1
sys-devel/binutils:  2.18-r3
sys-devel/gcc-config: 1.4.0-r4
sys-devel/libtool:   2.2.6a
virtual/os-headers:  2.6.26
ACCEPT_KEYWORDS="x86 ~x86"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O2 -march=pentium3 -mtune=athlon-xp -fomit-frame-pointer -pipe"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/config"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/eselect/compiler /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/splash /etc/terminfo /etc/texmf/web2c /etc/udev/rules.d"
CXXFLAGS="-O2 -march=pentium3 -mtune=athlon-xp -fomit-frame-pointer -pipe"
DISTDIR="/usr/my-distfiles"
FEATURES="assume-digest ccache collision-protect diggest distlocks multilib-strict parallel-fetch preserve-libs protect-owned sandbox sfperms sign splitdebug strict unmerge-orphans userfetch userpriv usersandbox"
GENTOO_MIRRORS="http://gentoo.supp.name/ http://ftp-stud.fht-esslingen.de/pub/Mirrors/gentoo/"
LANG="de_DE.utf8"
LC_ALL="C"
LDFLAGS="-Wl,-O1,--as-needed"
LINGUAS="de en en_GB"
PKGDIR="/usr/my-packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/overlays/zzam /usr/local/overlays/vdr/experimental /usr/local/overlays/vdr/vdr-devel /usr/local/overlays/vdr/testing /usr/local/overlays/layman/sunrise /usr/local/overlays/gentoo.de /usr/local/overlays/dev-overlay"
SYNC="cvs://zzam@cvs.gentoo.org:/var/cvsroot"
USE="3dnow 3dnowext X Xaw3d a52 aac acl acpi alsa amr apache2 artswrappersuid audacious berkdb bluetooth branding bzip2 cairo cap caps cdaudio cddb cdparanoia cdr cli cracklib crypt css cups curl dbus doc dri dts dvb dvd dvdr dvdread emboss encode evo exif fam fbcon ffmpeg firefox font-server fortran fuse gcj gdbm gif gimpprint glut gnutls gphoto2 gpm graphviz gstreamer gtk gtk2 hal hbci iconv imap ipv6 isdnlog java jpeg jpeg2k kde kdexdeltas kerberos libdvdread libnotify lirc logitech-mouse mad midi mikmod mjpeg mmx mmxext mng mp3 mpeg mplayer mudflap musicbrainz mysql ncurses nls nptl nptlonly nsplugin nvram offensive ogg opengl openmp pam pcre pdf perl php png ppds pppd projectx python qt3 qt3support qt4 quotes readline reflection regex samba session sms sndfile spell spl sql sqlite sse ssl startup-notification svg sysfs taglib tcltk tcpd theora threads tiff truetype unicode usb userlocales v4l v4l2 vcd vdr visualization vorbis webdav win32codecs wma wmf x264 x86 xcomposite xext xinerama xml xorg xrandr xslt xulrunner xv xvid zlib zvbi" ALSA_CARDS="emu10k1 intel8x0" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CAMERAS="ptp2" DVB_CARDS="ttpci usb-wt220u dibusb-usb2 usb-dib0700" ELIBC="glibc" INPUT_DEVICES="mouse keyboard" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text xosd" LINGUAS="de en en_GB" LIRC_DEVICES="all" USERLAND="GNU" VIDEO_CARDS="nvidia v4l vesa vbdev nv"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, MAKEOPTS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 Davide Pesavento gentoo-dev 2008-10-23 12:27:43 UTC
I had the same problem with ffmpeg and x264 upgrade.

Moreover, portage keeps saying:

!!! existing preserved libs:
>>> package: media-libs/x264-0.0.20081006
 *  - /usr/lib64/libx264.so.60
Use emerge @preserved-rebuild to rebuild packages using these libraries

but @preserved-rebuild is empty:

# emerge @preserved-rebuild
emerge: 'preserved-rebuild' is an empty set
emerge: no targets left after set expansion

This may confuse users a lot imho.
Comment 2 Davide Pesavento gentoo-dev 2008-11-07 20:34:43 UTC
This happened again, with portage-2.2_rc13 this time. The preserved-libs chain was more or less the same: x264 <- ffmpeg <- k3b (and many others, k3b was the last of them).

The result is that rc13 performed vastly better than rc12: the "second failure" outlined by zzam (recursive deletion of preserved libs) has been fixed! So the only remaining problem now is the "first failure", i.e. `emerge @preserved-rebuild` wants to rebuild ffmpeg when it's not necessary.
Comment 3 Zac Medico gentoo-dev 2008-11-09 07:46:33 UTC
Created attachment 171153 [details, diff]
exclude preserved libs themselves when calculating consumers of preserved libs

If this patch is saved as /tmp/exclude_plibs.patch then it can be applied as follows:

 patch /usr/lib/portage/pym/portage/sets/libs.py /tmp/exclude_plibs.patch
Comment 4 Zac Medico gentoo-dev 2008-11-11 22:20:33 UTC
This is fixed in 2.2_rc14.