Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 243178 - collisions with preserved libraries
Summary: collisions with preserved libraries
Status: RESOLVED FIXED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core (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-10-22 07:54 UTC by Martin von Gagern
Modified: 2008-11-02 01:04 UTC (History)
0 users

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 Martin von Gagern 2008-10-22 07:54:07 UTC
I just added avahi to my global USE flags and ran "emerge -uND world". This remerged kdelibs (as it has avahi in its IUSE) and would then have emerged kdnssd-avahi (as a PDEPEND of kdelibs[+avahi]). Both kdelibs[-avahi] and kdnssd-avahi provide libkdnssd.so.1.0.0, while kdelibs[+avahi] doesn't. Portage preserves these libs when remerging kdelibs, leading to a package collision when kdnssd-avahi gets merged.

I would whish for portage to perform some special handling of preserved libraries when dealing with package collisions, namely not prevent the new package from being merged but instead mark the library as unneeded, so that the newly merged version won't get unmerged later on even if it should be identical (in terms of checksums) to the one original version and no portage apps would be using it.

By the way, doing
FEATURES="-collision-protect -protect-owned" emerge -1 kdnssd-avahi
does merge the new lib but still has the one from kdelibs marked preserved. 
Following hints by zmedico on IRC, the following should help to work around the problem:
# rm /usr/kde/3.5/lib/libkdnssd.so.1*
# emerge -1 kde-misc/kdnssd-avahi
# sed -i~ '\+/usr/kde/3.5/lib/libkdnssd.so.1+d' \
      /var/db/pkg/kde-base/kdelibs-3.5*/CONTENTS

And for those who try to find this bug by pasting parts of the portage error messages, this is what it looks like on the command line:

 * package kde-misc/kdnssd-avahi-0.1.2-r1 NOT merged
 * 
 * Detected file collision(s):
 * 
 *      /usr/kde/3.5/lib/libkdnssd.so.1.0.0
 *      /usr/kde/3.5/lib/libkdnssd.so.1
 * 
 * Searching all installed packages for file collisions...
 * 
 * kde-base/kdelibs-3.5.10-r2
 *      /usr/kde/3.5/lib/libkdnssd.so.1
 *      /usr/kde/3.5/lib/libkdnssd.so.1.0.0
 * 
 * Package 'kde-misc/kdnssd-avahi-0.1.2-r1' NOT merged due to file
 * collisions. If necessary, refer to your elog messages for the whole
 * content of the above message.

>>> Failed to install kde-misc/kdnssd-avahi-0.1.2-r1

!!! existing preserved libs:
>>> package: kde-base/kdelibs-3.5.10-r2
 *  - /usr/kde/3.5/lib/libkdnssd.so.1
 *  - /usr/kde/3.5/lib/libkdnssd.so.1.0.0
 *      used by [45 KDEish files]
Comment 1 Zac Medico gentoo-dev 2008-10-31 20:23:19 UTC
This is fixed in svn r11766.
Comment 2 Zac Medico gentoo-dev 2008-11-02 01:04:13 UTC
This is fixed in 2.2_rc13.