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 244636 - portage-2.2_rc12 @perserved-rebuild function appears possible to confuse re: libkipi
Summary: portage-2.2_rc12 @perserved-rebuild function appears possible to confuse re: ...
Status: RESOLVED INVALID
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core - Ebuild Support (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: preserve-libs
  Show dependency tree
 
Reported: 2008-10-27 13:39 UTC by Guy
Modified: 2011-01-25 01:56 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 Guy 2008-10-27 13:39:38 UTC
I've tried to find if this has been reported already but was unable to determine that. So I'm reporting it anyway. I hope this isn't a duplicate report.

It appears possible to confuse the @preserved-rebuild function of portage under special circumstances. Consider the following:

equery d libkipi
[ Searching for packages depending on libkipi... ]
kde-base/gwenview-4.1.2 (kipi? kde-base/libkipi:4.1)
kde-base/kdegraphics-meta-4.1.2 (>=kde-base/libkipi-4.1.2:4.1)
media-gfx/kphotoalbum-3.1.1-r1 (>=media-libs/libkipi-0.1)
media-plugins/kipi-plugins-0.1.5 (>=media-libs/libkipi-0.1.5)

Notice that I have two different libkipi packages installed.

Now consider the following:

# emerge @preserved-rebuild

... <== much output snipped for brevity

--- replaced obj /usr/lib64/kde3/kipiplugin_acquireimages.so
--- replaced obj /usr/lib64/kde3/kipiplugin_acquireimages.la
--- replaced dir /usr/lib64/kde3
--- replaced dir /usr/lib64
--- replaced obj /usr/bin/images2mpg
--- replaced dir /usr/bin
--- replaced dir /usr
 * Running kbuildsycoca to build global database ...                                                                                     [ ok ]
>>> Regenerating /etc/ld.so.cache...
>>> Original instance of package unmerged safely.
 * Running kbuildsycoca to build global database ...                                                                                     [ ok ]
>>> Regenerating /etc/ld.so.cache...
>>> Auto-cleaning packages...

>>> No outdated packages were found on your system.

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

!!! existing preserved libs:
>>> package: media-libs/libkipi-0.1.6-r1
 *  - /usr/lib64/libkipi.so.0
 *  - /usr/lib64/libkipi.so.0.1.1
 *      used by /usr/bin/kphotoalbum (media-gfx/kphotoalbum-3.1.1-r1)
 *      used by /usr/lib64/kde3/kipiplugin_acquireimages.so (media-plugins/kipi-plugins-0.1.5)
 *      used by /usr/lib64/kde3/kipiplugin_batchprocessimages.so (media-plugins/kipi-plugins-0.1.5)
 *      used by 20 other files
Use emerge @preserved-rebuild to rebuild packages using these libraries


Notice that even though the packages affected by the @preserved-rebuild have rebuilt successfully to completion, libkipi is still generating @preserved-rebuild.

What I think is happening is that the relevant packages in kde-3.5.10 are not being picked up and rebuilt when I execute: emerge @preserved-rebuild.

I'm not a developer and I don't know how to check this.

I'm guessing this is a special case where I have kde-3.5.10, kde-4.1.2 and kphotoalbum (which resides in media-qfx) and each is using different libkipi libraries. I'm further guessing that portage's @preserved-rebuild function is correctly reporting a problem but emerge of the @preserved-rebuild set is not picking up all the packages to be rebuilt. That's just a simple guess on my part. I probably shouldn't even be guessing that much.

Reproducible: Always

Steps to Reproduce:

Actual Results:  
As above

Expected Results:  
portage still reports @preserved-rebuild for libkipi

Portage 2.2_rc12 (default-linux/amd64/2007.0, gcc-4.2.4, glibc-2.8_p20080602-r0, 2.6.22.19 x86_64)
=================================================================
System uname: Linux-2.6.22.19-x86_64-AMD_Athlon-tm-_64_X2_Dual_Core_Processor_5200+-with-glibc2.2.5
Timestamp of tree: Mon, 27 Oct 2008 12:07:01 +0000
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/cmake:      2.6.2
sys-apps/baselayout: 2.0.0
sys-apps/openrc:     0.3.0-r1
sys-apps/sandbox:    1.2.18.1-r3
sys-devel/autoconf:  2.13, 2.61-r2
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-r4
sys-devel/gcc-config: 1.4.0-r4
sys-devel/libtool:   2.2.6a
virtual/os-headers:  2.6.27-r2
ACCEPT_KEYWORDS="amd64 ~amd64"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=opteron -O2 -pipe"
CHOST="x86_64-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/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/terminfo /etc/texmf/web2c /etc/udev/rules.d"
CXXFLAGS="-march=opteron -O2 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="ccache distlocks parallel-fetch preserve-libs protect-owned sandbox sfperms strict unmerge-orphans userfetch"
GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo"
LDFLAGS=""
MAKEOPTS="-j4"
PKGDIR="/usr/portage/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"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="3dnow 3dnowext 7zip X a52 aac aalib accessibility acl acpi aften aiglx aim aimextras aio akode allegro alsa amarok amazon amd amd64 amr ao aotuv apache2 asterisk async atlas audacious audiofile automount bash-completion bdf berkdb bigpatch binary-drivers bittorrent blender-game bonjour bonobo boost bsf bzip2 cairo ccache cdaudio cdda cddb cdio cdparanoia cdr cdrom cgi chm chroot cli commercial config-log corba cracklib crypt css cups curl curlwrappers dbase dbm dbus dbx depth32 devhelp dga dia directfb djvu dpms dri dts dv dvb dvd dvdr dvdread dynamic eds effects emboss emovix emul-linux-x86 enblend encode enscript esd exif expat extrafilters fam fame fastcgi fat fbcon fbdev ffmpeg fftw filter firefox flac flash font-server fontconfig foomaticdb fortran fping fpx ftp fuse gatos gcj gd gdbm geoip ggi gif gimp gimpprint glib glibc-omitfp glitz glut gmail gmailtimestamps gmp gnutls gocr gpac gphoto2 gpm grammar graphicsmagick graphviz gs gstreamer gstreamer010 gtk gtkhtml guile gzip hal hddtemp hdri html htmlhandbook httpd iconv icq icu id3 idea imagemagick imap imlib inkjar insecure-savers ipfilter ipsec ipv6 irc isdnlog jabber jack java javascript jbig jikes jpeg jpeg2k junit kde kdexdeltas kerberos kipi lame lash latex lcms ldap lesstiff libcaca libg++ libnotify libsamplerate libvisual libwww linuxthreads-tls live lm_sensors logrotate lyx lzo lzw mad maildir mailwrapper matroska midi mikmod milter mime ming mjpeg mmap mmx mmxext mng mod modplug mono mozdevelop moznoirc moznomail mozsha1 mp2 mp3 mp4 mp4live mpeg mpeg2 mpi mplayer msn msql mudflap multiuser musepack mysql mysqli nas ncurses network nfs nls nntp nodrm nptl nptlonly nsplugin ntfs nxclient ocrad odbc odk offensive ogg ole on-the-fly-crypt openal opendoc openexr opengl openmp openssl opensslcrypt osc oscar oss ots pam pam_chroot pam_timestamp pango passwordsave paste64 pcre pda pdf perl php player plib plotutils plugins png portaudio posix postrgres postscript povray ppds pppd print ps pulseaudio python q32 qt3 qt4 quicktime rar rc5 rdesktop readline recode reflection regex reiser4 reiserfs restrict-javascript rle rss rtc rtsp ruby samba sasl scanner screen sdk sdl sdl-image seamonkey sensord session sftp sftplogging sharedmem shorten shout sift simplexml skins slang sndfile snmp soap sockets sox speedo speex spell spf spl sql sqlite srs sse sse2 ssl stream streamripper submenu subp subtitles subversion svg svgz swat sysfs syslog szip t1lib taglib tagwriter tcl tcltk tcpd tcpwrapper tesseract tetex tga theora thesaurus threads tidy tiff timidity tk tokenizer toolbar tools totem transcode truetype tta type1 udev unicode unzip usb utempter utils uudeview v4l v4l2 vcd vdr vfat vhosts visualization vlm vorbis vorbis-psy wav wavpack winbind winf wma wmf wordperfect wv wxwindows x264 xanim xcomposite xeo xface xforms xfs xft xine xinerama xml xmlrpc xorg xosd xpm xprint xscreensaver xv xvid xvmc yaepg yahoo zeroconf zip zlib zoran" ALSA_CARDS="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 auth_digest authn_anon authn_dbd 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 dbd deflate dir disk_cache env expires ext_filter file_cache filter headers ident imagemap include info log_config logio mem_cache mime mime_magic negotiation proxy proxy_ajp proxy_balancer proxy_connect proxy_http rewrite setenvif so speling status unique_id userdir usertrack vhost_alias" CAMERAS="canon minolta konica" ELIBC="glibc" INPUT_DEVICES="wacom keyboard mouse evdev" KERNEL="linux" USERLAND="GNU" VIDEO_CARDS="vesa ati radeon"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LANG, LC_ALL, LINGUAS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY
Comment 1 Zac Medico gentoo-dev 2008-10-27 16:47:33 UTC
(In reply to comment #0)
> I'm guessing this is a special case where I have kde-3.5.10, kde-4.1.2 and
> kphotoalbum (which resides in media-qfx) and each is using different libkipi
> libraries.

I haven't studied this problem in detail, but my first guess it that it's something more like bug 230257. In some cases, rebuilding a package doesn't seem to solve the problem because the build system incorrectly links against the preserved library instead of the new one. As a workaround for cases like this, you can remove the library by hand (temporarily breaking the packages that depend on it) and then use revdep-rebuild to rebuild the broken packages. Please report back if this solves the problem.
Comment 2 Guy 2008-10-27 17:43:07 UTC
So, if I understand you correctly, I should:

rm -f /usr/lib64/libkipi*
rm -f /usr/kde/3.5/lib64/libkipi*

Then run "revdep-rebuild".

Yes?

In the meantime, out of curiosity, I ran "revdep-rebuild -p". These were the results:

# revdep-rebuild -p
 * Configuring search environment for revdep-rebuild

 * Checking reverse dependencies
 * Packages containing binaries and libraries broken by a package update
 * will be emerged.

 * Collecting system binaries and libraries
 * Generated new 1_files.rr
 * Collecting complete LD_LIBRARY_PATH
 * Generated new 2_ldpath.rr
 * Checking dynamic linking consistency
[ 35% ]  *   broken /usr/lib/gcc/x86_64-pc-linux-gnu/4.2.4/libgij.la (requires /usr/lib/../lib64/libgcj.la)
[ 48% ]  *   broken /usr/lib64/gcc/x86_64-pc-linux-gnu/4.2.4/libgij.la (requires /usr/lib/../lib64/libgcj.la)
 *   broken /usr/lib64/gcj-4.2.4/libjvm.la (requires /usr/lib/../lib64/libgcj.la)
[ 62% ]  *   broken /usr/lib64/libSDL.la (requires /usr/lib64/libcucul.la)
 *   broken /usr/lib64/libSDL_image.la (requires /usr/lib64/libcucul.la)
 *   broken /usr/lib64/libSDL_ttf.la (requires /usr/lib64/libcucul.la)
[ 70% ]  *   broken /usr/lib64/liblavplay.la (requires /usr/lib64/libcucul.la)
[ 79% ]  *   broken /usr/lib64/mpg123/output_sdl.la (requires /usr/lib64/libcucul.la)
[ 90% ]  *   broken /usr/lib64/transcode/filter_preview.la (requires /usr/lib64/libcucul.la)
 *   broken /usr/lib64/transcode/filter_pv.la (requires /usr/lib64/libcucul.la)
[ 92% ]  *   broken /usr/lib64/vlc/audio_output/libaout_sdl_plugin.la (requires /usr/lib64/libcucul.la)
 *   broken /usr/lib64/vlc/codec/libsdl_image_plugin.la (requires /usr/lib64/libcucul.la)
[ 94% ]  *   broken /usr/lib64/vlc/video_output/libcaca_plugin.la (requires /usr/lib64/libcucul.la)
 *   broken /usr/lib64/vlc/video_output/libvout_sdl_plugin.la (requires /usr/lib64/libcucul.la)
[ 100% ]
 * Generated new 3_broken.rr
 * Assigning files to packages
 *   /usr/lib/gcc/x86_64-pc-linux-gnu/4.2.4/libgij.la -> sys-devel/gcc
 *  !!! /usr/lib64/gcc/x86_64-pc-linux-gnu/4.2.4/libgij.la not owned by any package is broken !!!
 *   /usr/lib64/gcc/x86_64-pc-linux-gnu/4.2.4/libgij.la -> (none)
 *   /usr/lib64/gcj-4.2.4/libjvm.la -> sys-devel/gcc
 *   /usr/lib64/libSDL.la -> media-libs/libsdl
 *   /usr/lib64/libSDL_image.la -> media-libs/sdl-image
 *   /usr/lib64/libSDL_ttf.la -> media-libs/sdl-ttf
 *   /usr/lib64/liblavplay.la -> media-video/mjpegtools
 *   /usr/lib64/mpg123/output_sdl.la -> media-sound/mpg123
 *   /usr/lib64/transcode/filter_preview.la -> media-video/transcode
 *   /usr/lib64/transcode/filter_pv.la -> media-video/transcode
 *   /usr/lib64/vlc/audio_output/libaout_sdl_plugin.la -> media-video/vlc
 *   /usr/lib64/vlc/codec/libsdl_image_plugin.la -> media-video/vlc
 *   /usr/lib64/vlc/video_output/libcaca_plugin.la -> media-video/vlc
 *   /usr/lib64/vlc/video_output/libvout_sdl_plugin.la -> media-video/vlc
 * Generated new 4_raw.rr and 4_owners.rr
 * Cleaning list of packages to rebuild
 * Generated new 4_pkgs.rr
 * Assigning packages to ebuilds
 * Generated new 4_ebuilds.rr
 * Evaluating package order
 * Generated new 5_order.rr
 * All prepared. Starting rebuild
emerge --oneshot --pretend media-libs/libsdl:0
media-libs/sdl-image:0
media-libs/sdl-ttf:0
media-sound/mpg123:0
media-video/mjpegtools:1
media-video/transcode:0
media-video/vlc:0
sys-devel/gcc:4.2

These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild   R   ] media-libs/libsdl-1.2.13
[ebuild   R   ] sys-devel/gcc-4.2.4
[ebuild   R   ] media-libs/sdl-image-1.2.6-r1
[ebuild   R   ] media-video/mjpegtools-1.9.0_rc3
[ebuild   R   ] media-libs/sdl-ttf-2.0.9
[ebuild   R   ] media-sound/mpg123-1.5.1
[ebuild   R   ] media-video/transcode-1.0.7_rc1
[ebuild   R   ] media-video/vlc-0.9.5

!!! existing preserved libs:
>>> package: media-libs/libkipi-0.1.6-r1
 *  - /usr/lib64/libkipi.so.0
 *  - /usr/lib64/libkipi.so.0.1.1
 *      used by /usr/bin/kphotoalbum (media-gfx/kphotoalbum-3.1.1-r1)
 *      used by /usr/lib64/kde3/kipiplugin_acquireimages.so (media-plugins/kipi-plugins-0.1.5)
 *      used by /usr/lib64/kde3/kipiplugin_batchprocessimages.so (media-plugins/kipi-plugins-0.1.5)
 *      used by 20 other files
Use emerge @preserved-rebuild to rebuild packages using these libraries
 * Now you can remove -p (or --pretend) from arguments and re-run revdep-rebuild.

I had interpreted the documentation regarding that the new portage "sets" functionality combined with "@preserved-rebuild" could perhaps greatly reduce or even eliminate the need for revdep-rebuild {as a general thing} so I haven't been vigilant about running it. {an aside - this is NOT any criticism!! - I very much like what I see with the new portage functionality!}

In the interests of giving you as much information as possible, I'm running revdep-rebuild now and will try "emerge @preserved-rebuild" immediately after.

Then I will delete the "libkipi" files as above and re-run "revdep-rebuild" again. If you could comment before I reach this point, it would be appreciated.
Comment 3 Zac Medico gentoo-dev 2008-10-27 19:39:28 UTC
(In reply to comment #2)
> So, if I understand you correctly, I should:
> 
> rm -f /usr/lib64/libkipi*
> rm -f /usr/kde/3.5/lib64/libkipi*
> 
> Then run "revdep-rebuild".
> 
> Yes?

No, not exactly. You should only remove the libraries that have actually been preserved. They are listed in the "!!! existing preserved libs" message shown in comment #0:

> !!! existing preserved libs:
> >>> package: media-libs/libkipi-0.1.6-r1
>  *  - /usr/lib64/libkipi.so.0
>  *  - /usr/lib64/libkipi.so.0.1.1
Comment 4 Zac Medico gentoo-dev 2008-10-27 19:47:38 UTC
(In reply to comment #2)
> I had interpreted the documentation regarding that the new portage "sets"
> functionality combined with "@preserved-rebuild" could perhaps greatly reduce
> or even eliminate the need for revdep-rebuild {as a general thing} so I haven't

You are probably thinking of as-needed, which is what will greatly reduce the number of rebuilds that are necessary:

  http://www.gentoo.org/proj/en/qa/asneeded.xml

> been vigilant about running it. {an aside - this is NOT any criticism!! - I
> very much like what I see with the new portage functionality!}

The functionality that is provided by @preserved-rebuild serves as a replacement for part of the functionality that used to be provided by revdep-rebuild. However, since we are trying to work around a buggy build system here, we have to use revdep-rebuild instead of @preserved-rebuild.
Comment 5 Guy 2008-10-27 20:47:45 UTC
Thank you for the clarification and comments.

This is what I did:

slizard ~ # ls -l /usr/lib64/libkipi.so.0*
lrwxrwxrwx 1 root root     16 Oct 15 21:52 /usr/lib64/libkipi.so.0 -> libkipi.so.0.1.1
-rwxr-xr-x 1 root root 263600 Dec 25  2007 /usr/lib64/libkipi.so.0.1.1
slizard ~ # rm /usr/lib64/libkipi.so.0*
slizard ~ # ls -l /usr/lib64/libkipi.so.0*
ls: cannot access /usr/lib64/libkipi.so.0*: No such file or directory


revdep-rebuild is running again now.
Comment 6 Guy 2008-10-27 22:09:19 UTC
revdep-rebuild finished.

There are no more @preserved-rebuild items left.

Thank you.
Comment 7 Zac Medico gentoo-dev 2008-10-28 01:56:52 UTC
So, this bug seems similar to bug 231563 in the sense that dev-util/pkgconfig doesn't seem to be generating the correct compile/link flags when the old lib has been preserved.
Comment 8 Zac Medico gentoo-dev 2008-11-25 22:54:10 UTC
(In reply to comment #7)
> So, this bug seems similar to bug 231563 in the sense that dev-util/pkgconfig
> doesn't seem to be generating the correct compile/link flags when the old lib
> has been preserved.

Actually, it seems to be a problem with libtool as mentioned in bug #231563, comment #17.
Comment 9 Guy 2011-01-25 01:56:48 UTC
I'm the originally reporter and I'm closing this because I've observed no further instances of this happening.

I suspect that circumstances for this to happen require improper artifacts left from possible previously broken ebuilds. In other words, on a properly built recent vintage system, this problem most likely will never happen.