summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2023-01-13 09:49:40 +0000
committerSam James <sam@gentoo.org>2023-01-13 10:01:11 +0000
commitaa1d9b702b2f2ae20082028c5ee9436a40879755 (patch)
tree9d9063baac7565ac585747f4e04c410d87adccd2 /sys-devel/bison
parentdev-python/pyproject-hooks: Keyword 1.0.0 ia64, #890568 (diff)
downloadgentoo-aa1d9b702b2f2ae20082028c5ee9436a40879755.tar.gz
gentoo-aa1d9b702b2f2ae20082028c5ee9436a40879755.tar.bz2
gentoo-aa1d9b702b2f2ae20082028c5ee9436a40879755.zip
sys-devel/bison: adapt pkg_postinst for prefix bootstrapping
The file may exist as it was manually built and it's okay to just ignore it for now as it'll get washed out during stage3. Closes: https://bugs.gentoo.org/886123 Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'sys-devel/bison')
-rw-r--r--sys-devel/bison/bison-3.8.2-r2.ebuild10
1 files changed, 9 insertions, 1 deletions
diff --git a/sys-devel/bison/bison-3.8.2-r2.ebuild b/sys-devel/bison/bison-3.8.2-r2.ebuild
index bdf5a076c80b..5b827b301fd4 100644
--- a/sys-devel/bison/bison-3.8.2-r2.ebuild
+++ b/sys-devel/bison/bison-3.8.2-r2.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2022 Gentoo Authors
+# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
@@ -88,6 +88,14 @@ pkg_postinst() {
# ensure to preserve the symlinks before app-alternatives/yacc
# is installed
if [[ ! -h ${EROOT}/usr/bin/yacc ]]; then
+ if [[ -e ${EROOT}/usr/bin/yacc ]] ; then
+ # bug #886123
+ ewarn "${EROOT}/usr/bin/yacc exists but is not a symlink."
+ ewarn "This is expected during Prefix bootstrap and unsual otherwise."
+ ewarn "Moving away unexpected ${EROOT}/usr/bin/yacc to .bak."
+ mv "${EROOT}/usr/bin/yacc" "${EROOT}/usr/bin/yacc.bak" || die
+ fi
+
ln -s yacc.bison "${EROOT}/usr/bin/yacc" || die
fi
}