commit:     86be11692e59d41b3f6efbe86dfbf38202b1c9ad
Author:     Violet Purcell <vimproved <AT> inventati <DOT> org>
AuthorDate: Wed Oct 18 15:46:15 2023 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Wed Oct 18 15:55:30 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=86be1169

dev-util/ninja: add pkg_postinst workaround for ninja symlink

This commit adds a workaround in pkg_postinst similar to other packages
covered by app-alternatives such as app-arch/tar. If the ninja symlink
does not already exist in pkg_postinst, temporarily symlink
ninja-reference to ensure there is no breakage between the update and
the subsequent merge of app-alternatives/ninja.

Signed-off-by: Violet Purcell <vimproved <AT> inventati.org>
Closes: https://github.com/gentoo/gentoo/pull/33396
Signed-off-by: Sam James <sam <AT> gentoo.org>

 dev-util/ninja/ninja-1.11.1-r3.ebuild | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/dev-util/ninja/ninja-1.11.1-r3.ebuild 
b/dev-util/ninja/ninja-1.11.1-r3.ebuild
index 4f8bdfff6267..c4874b6be066 100644
--- a/dev-util/ninja/ninja-1.11.1-r3.ebuild
+++ b/dev-util/ninja/ninja-1.11.1-r3.ebuild
@@ -121,6 +121,9 @@ src_install() {
 
 pkg_postinst() {
        use emacs && elisp-site-regen
+       if ! [[ -e "${EROOT}/usr/bin/ninja" ]]; then
+               ln -s ninja-reference "${EROOT}/usr/bin/ninja" || die
+       fi
 }
 
 pkg_postrm() {

Reply via email to