commit:     91830d78d6f352ee1450263b6466fda5f7c8003c
Author:     Michael Haubenwallner <haubi <AT> gentoo <DOT> org>
AuthorDate: Mon Jun 24 12:12:59 2019 +0000
Commit:     Michael Haubenwallner <haubi <AT> gentoo <DOT> org>
CommitDate: Mon Jun 24 12:14:55 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=91830d78

prefix/winnt/profile.bashrc: first, check if usr/lib does exist

And fail if creating the back hardlink does fail.

Signed-off-by: Michael Haubenwallner <haubi <AT> gentoo.org>

 profiles/prefix/windows/winnt/profile.bashrc | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/profiles/prefix/windows/winnt/profile.bashrc 
b/profiles/prefix/windows/winnt/profile.bashrc
index c0eaec08a6d..b8def6390de 100644
--- a/profiles/prefix/windows/winnt/profile.bashrc
+++ b/profiles/prefix/windows/winnt/profile.bashrc
@@ -62,6 +62,7 @@ post_src_install() {
                        ;;
                esac
        done
+       [[ -d usr/$(get_libdir) ]] &&
        find usr/$(get_libdir) -maxdepth 1 -type f -name '*.dll' |
        while read f
        do
@@ -69,7 +70,7 @@ post_src_install() {
                        ebegin "moving ${f} to usr/bin for native loader"
                        dodir usr/bin || die
                        mv -f "${f}" usr/bin || die
-                       ln -sf "../bin/${f##*/}" "${f}"
+                       ln -sf "../bin/${f##*/}" "${f}" || die
                        eend $?
                fi
        done

Reply via email to