profiles: amd64/17.1/profile.bashrc - Dereference symlink to /lib and /usr/lib
authorBrian Evans <grknight@gentoo.org>
Wed, 16 May 2018 19:20:06 +0000 (15:20 -0400)
committerBrian Evans <grknight@gentoo.org>
Wed, 16 May 2018 19:23:49 +0000 (15:23 -0400)
Advanced users may want /lib and/or /usr/lib to point somewhere else

This checks what should not be and warns but still lets those
advanced people do what they like.

profiles/default/linux/amd64/17.1/profile.bashrc

index 44dc51c55408d0bd51fdd25f757537a001ea106d..7019782fb8f9dd4662e22c4dee6614c3a6e9483d 100644 (file)
@@ -1,7 +1,9 @@
-if [[ "${EBUILD_PHASE}" == "setup" ]] && [[ -L ${ROOT%/}/lib || -L ${ROOT%/}/usr/lib ]] ; then
-       eerror "Please follow the instructions in the news item:"
-       eerror "2017-12-26-experimental-amd64-17-1-profiles"
-       eerror "or choose the 17.0 profile."
-       die "ERROR: 17.1 migration has not been performed!!"
+if [[ "${EBUILD_PHASE}" == "setup" ]] ; then
+       if [[ "$(realpath ${ROOT%/}/lib)" == "${ROOT%/}/lib64" || "$(realpath ${ROOT%/}/usr/lib)" == "${ROOT%/}/usr/lib64" ]] ; then
+               eerror "Please follow the instructions in the news item:"
+               eerror "2017-12-26-experimental-amd64-17-1-profiles"
+               eerror "or choose the 17.0 profile."
+               die "ERROR: 17.1 migration has not been performed!!"
+       fi
 fi