I could'nt merge dev-util/yacc-1.9.1-r2 - while emergig this package tried to overwrite files belonging to other packages. Need this package - i want to emerge apache Reproducible: Always Steps to Reproduce: 1.start the system 2.emerge -av apache 3.here we are, not possible to emerge dev-util/yacc-1.9.1-r2 Actual Results: not possible to emerge dev-util/yacc-1.9.1-r2 Expected Results: emerge dev-util/yacc-1.9.1-r2 and then install the apache-package this package was not emerged because it wants to overwrite packeges that belonging to other packages...
Post the exact error message, please.
bash-2.05b$ su Password: bash-2.05b# emerge apache Calculating dependencies ...done! >>> emerge (1 of 2) dev-util/yacc-1.9.1-r2 to / >>> md5 files ;-) yacc-1.9.1-r2.ebuild >>> md5 files ;-) yacc-1.9.1-r1.ebuild >>> md5 files ;-) ChangeLog >>> md5 files ;-) files/digest-yacc-1.9.1-r1 >>> md5 files ;-) files/digest-yacc-1.9.1-r2 >>> md5 files ;-) files/mkstemp.patch >>> md5 files ;-) files/yacc-1.9.1-ia64.patch >>> md5 src_uri ;-) yacc-1.9.1.tar.Z >>> Unpacking source... >>> Unpacking yacc-1.9.1.tar.Z to /var/tmp/portage/yacc-1.9.1-r2/work * Applying mkstemp.patch ... [ ok ] * Applying yacc-1.9.1-ia64.patch ... [ ok ] >>> Source unpacked. rm yacc i686-pc-linux-gnu-gcc -march=athlon-xp -O3 -pipe -fomit-frame-pointer -o yacc cl osure.c error.c lalr.c lr0.c main.c mkpar.c output.c reader.c skeleton.c symtab. c verbose.c warshall.c >>> Test phase [not enabled]: dev-util/yacc-1.9.1-r2 >>> Install yacc-1.9.1-r2 into /var/tmp/portage/yacc-1.9.1-r2/image/ category de v-util man: prepallstrip: strip: i686-pc-linux-gnu-strip --strip-unneeded strip: i686-pc-linux-gnu-strip --strip-unneeded usr/bin/yacc >>> Completed installing yacc-1.9.1-r2 into /var/tmp/portage/yacc-1.9.1-r2/image / * checking 9 files for package collisions existing file /usr/bin/yacc is not owned by this package * spent 0.000842809677124 seconds checking for file collisions * This package is blocked because it wants to overwrite * files belonging to other packages (see messages above). * If you have no clue what this is all about report it * as a bug for this package on http://bugs.gentoo.org package dev-util/yacc-1.9.1-r2 NOT merged No package files given... Grabbing a set.
Do you have sys-devel/bison installed? Is /usr/bin/yacc a symlink?
Marco, please respond to the above comment
bash-2.05b# emerge search bison Searching... [ Results for search key : bison ] [ Applications found : 1 ] * sys-devel/bison Latest version available: 1.875d Latest version installed: 1.875d Size of downloaded files: 862 kB Homepage: http://www.gnu.org/software/bison/bison.html Description: A yacc-compatible parser generator License: GPL-2 bash-2.05b#
OK. See Bug 82849 (http://bugs.gentoo.org/show_bug.cgi?id=82849#c2 explains this). Clean solution: emerge -C sys-devel/bison && emerge dev-util/yacc && emerge sys-devel/bison Quick
OK. See Bug 82849 (http://bugs.gentoo.org/show_bug.cgi?id=82849#c2 explains this). Clean solution: emerge -C sys-devel/bison && emerge dev-util/yacc && emerge sys-devel/bison Quick´n´dirty solution: rm -f /usr/bin/yacc && emerge dev-util/yacc
yacc now contains code to remove & restore the /usr/bin/yacc symlink to /usr/bin/bison when emerging / unmerging portage will require a change before this will work properly, but that shouldnt be a problem
pong - still have 1-year-old package collisions overhere
nothing more we can do in the yacc ebuild
*** Bug 148537 has been marked as a duplicate of this bug. ***
*** Bug 159059 has been marked as a duplicate of this bug. ***
*** Bug 159867 has been marked as a duplicate of this bug. ***
IMHO, this is unsatisfactory and ugly. The clean solution would be an eselect-yacc or quick and dirty yacc DEPENDing, but not RDEPENDING on !bison.
*** Bug 192914 has been marked as a duplicate of this bug. ***
Mike, please, take a look at this bug. I have to reopen this bug as portage will never handle managing symlinks in pkg_preinstall/postinstall correctly. Quoting zmedico: "collision-protect runs before preinst because we specifically want to avoid executing any ebuild phases if there is a file collision" Or take a look at his comments for bug #147446 where he explains this in more details. This means that current fix does not and will never fix collision protection issue. I've talked with zmedico about this issue and he told that eselect module is the most correct way of handling this issues. Such module is written and I'd like somebody from basesystem to approve commit into the main tree. Take a look at module itself and updated yacc/bison packages in my overlay. To simplify you testing this here are comment you could cut&paste into your console: cd /your/local/overlay svn co http://overlays.gentoo.org/svn/dev/pva/dev-util/yacc dev-util/yacc svn co http://overlays.gentoo.org/svn/dev/pva/sys-devel/bison sys-devel/bison svn co http://overlays.gentoo.org/svn/dev/pva/app-admin/eselect-yacc app-admin/eselect-yacc echo -e "sys-devel/bison\ndev-util/yacc\napp-admin/eselect-yacc" >> /etc/portage/package.keywords
Created attachment 155711 [details] irc log of discussion of this issue with zmedico
i already know that portage wont allow it, but without a clean solution, i'm not changing it i dont really care about eselect modules ... if you want to change things, feel free ... doesnt matter to me
i may be missing something obvious, but can we install yacc as oldyacc or something and then make /usr/bin/yacc a wrapper that runs #!/bin/sh if [[ -x /usr/bin/oldyacc ]]; then exec /usr/bin/oldyacc "$@" else exec /usr/bin/bison -y "$@" fi this would give the same functionality we have now. if bison is installed yacc calls bison -y, unless yacc is also installed in which case you get yacc. install the wrapper as part of bison, which is in base/packages meaning everyone should have it in system. (are there any valid reasons for not having it installed?)
(In reply to comment #16) > I've talked with zmedico about this issue and he told that eselect module is > the most correct way of handling this issues. Such module is written and I'd > like somebody from basesystem to approve commit into the main tree. Take a > look at module itself and updated yacc/bison packages in my overlay. I'm not in basesystem, but anyway, here are some remarks about the eselect module: - A relative symlink should be used, not an absolute one. - The module should be updated to support eselect's --brief option. (See bug 154511 comment #5 for this, or kernel.eselect as an example.) - In view of bison already being in the Prefix overlay, it might be wise to support Prefix, i.e. use EROOT and EPREFIX variables instead of ROOT.
*** Bug 652782 has been marked as a duplicate of this bug. ***
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7aec318c57c9af54d5e454e9c7e93239415b5629 commit 7aec318c57c9af54d5e454e9c7e93239415b5629 Author: Sam James <sam@gentoo.org> AuthorDate: 2022-12-02 04:40:00 +0000 Commit: Sam James <sam@gentoo.org> CommitDate: 2022-12-02 21:09:50 +0000 dev-util/yacc: support app-alternatives/yacc Closes: https://bugs.gentoo.org/90089 Signed-off-by: Sam James <sam@gentoo.org> Closes: https://github.com/gentoo/gentoo/pull/28502 Signed-off-by: Sam James <sam@gentoo.org> dev-util/yacc/yacc-1.9.1-r7.ebuild | 44 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+)