When installing sys-apps/mlocate in a new gentoo system, as suggested in the official Handbook[1], emerge fails with a file collision: >>> Installing (1 of 1) sys-apps/mlocate-0.26-r3::gentoo * checking 16 files for package collisions * This package will overwrite one or more files that may belong to other * packages (see list below). You can use a command such as `portageq * owners / <filename>` to identify the installed package that owns a * file. If portageq reports that only one package owns a file then do * NOT file a bug report. A bug report is only useful if it identifies at * least two or more packages that are known to install the same file(s). * If a collision occurs and you can not explain where the file came from * then you should simply ignore the collision since there is not enough * information to determine if a real problem exists. Please do NOT file * a bug report at https://bugs.gentoo.org/ unless you report exactly * which two packages install the same file(s). See * https://wiki.gentoo.org/wiki/Knowledge_Base:Blockers for tips on how * to solve the problem. And once again, please do NOT file a bug report * unless you have completely understood the above message. * * Detected file collision(s): * * /usr/bin/updatedb * /usr/bin/locate * * Searching all installed packages for file collisions... * * Press Ctrl-C to Stop * * sys-apps/findutils-4.8.0:0::gentoo * /usr/bin/locate * /usr/bin/updatedb * * Package 'sys-apps/mlocate-0.26-r3' NOT merged due to file collisions. * If necessary, refer to your elog messages for the whole content of the * above message. I cannot manually remove sys-apps/findutils because it is part of @system and sys-apps/portage doesn't work without the find command, see https://bugs.gentoo.org/740744. Not surprisingly, the same collision happens with sys-apps/plocate. How am I supposed to properly install sys-apps/mlocale (or sys-apps/plocate)? I could not find anything in the wikis / mailing-lists about how to fix these conflicts, but I am confident that it used to work in the past. At the very least, packages sys-apps/{m|p}locate should block on sys-apps/findutils if there isn't a way to replace locate from findutils with other implementations. And the handbook should be updated accordingly. Also, note that the wiki page for mlocate[4] doesn't mention anything about these collisions. Arch Linux doesn't build the locate command from findutils[2] and then let the user choose between mlocate or plocate. Fedora does the same[3]. All this is unnecesserely complicated and confusing. [1] see section "Optional: File indexing" from https://wiki.gentoo.org/wiki/Handbook:AMD64/Full/Installation [2] https://wiki.archlinux.org/title/Locate [3] https://src.fedoraproject.org/rpms/findutils/blob/rawhide/f/findutils.spec [4] https://wiki.gentoo.org/wiki/Mlocate Reproducible: Always
findutils definitely does not install those on my system: $ equery f findutils * Searching for findutils ... * Contents of sys-apps/findutils-4.8.0: /usr /usr/bin /usr/bin/find /usr/bin/xargs /usr/share /usr/share/doc /usr/share/doc/findutils-4.8.0 /usr/share/doc/findutils-4.8.0/AUTHORS.bz2 /usr/share/doc/findutils-4.8.0/ChangeLog.bz2 /usr/share/doc/findutils-4.8.0/NEWS.bz2 /usr/share/doc/findutils-4.8.0/README-hacking.bz2 /usr/share/doc/findutils-4.8.0/README.bz2 /usr/share/doc/findutils-4.8.0/THANKS.bz2 /usr/share/doc/findutils-4.8.0/TODO.bz2 /usr/share/info /usr/share/info/find-maint.info.bz2 /usr/share/info/find.info-1.bz2 /usr/share/info/find.info-2.bz2 /usr/share/info/find.info.bz2 /usr/share/man /usr/share/man/man1 /usr/share/man/man1/find.1.bz2 /usr/share/man/man1/xargs.1.bz2 And I don't believe it's supposed to?
(In reply to Sam James from comment #1) > findutils definitely does not install those on my system: Funny, apparently it does on mine: > qlist -e findutils > /usr/bin/locate > /usr/bin/updatedb > /usr/bin/xargs > /usr/bin/find > /usr/lib64/find/frcode > /usr/share/man/man5/locatedb.5.bz2 > /usr/share/man/man1/find.1.bz2 > /usr/share/man/man1/locate.1.bz2 > /usr/share/man/man1/updatedb.1.bz2 > /usr/share/man/man1/xargs.1.bz2 > /usr/share/doc/findutils-4.8.0/ChangeLog.bz2 > /usr/share/doc/findutils-4.8.0/README.bz2 > /usr/share/doc/findutils-4.8.0/README-hacking.bz2 > /usr/share/doc/findutils-4.8.0/THANKS.bz2 > /usr/share/doc/findutils-4.8.0/AUTHORS.bz2 > /usr/share/doc/findutils-4.8.0/TODO.bz2 > /usr/share/doc/findutils-4.8.0/NEWS.bz2 This is perplexing, but I see that the ebuild for findutils uses sed to patch the makefile on-th-fly: > src_prepare() { > # Don't build or install locate because it conflicts with mlocate, > # which is a secure version of locate. See bug 18729 > sed \ > -e '/^SUBDIRS/s@locate@@' \ > -e '/^built_programs/s@ frcode locate updatedb@@' \ > -i Makefile.in || die > > default >} but for some reason that regex didn't do anything, or my sed command is not working properly. Let me double/triple check if this @system is in a sane state, and then I'll report back.
(In reply to MT from comment #2) > (In reply to Sam James from comment #1) > > but for some reason that regex didn't do anything, or my sed command is not > working properly. Let me double/triple check if this @system is in a sane > state, and then I'll report back. Thanks. Could you share the build log from findutils please?
Please let us know if it happens again and if you can grab that info for us.