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]
This is fixed in svn r11766.
This is fixed in 2.2_rc13.