euse: Fix check for /etc/make.profile.
authoridl0r <idl0r@gentoo.org>
Sun, 11 Apr 2010 18:07:15 +0000 (18:07 -0000)
committeridl0r <idl0r@gentoo.org>
Sun, 11 Apr 2010 18:07:15 +0000 (18:07 -0000)
Check if its readable and a directory instead of checking if its a link,
thanks to Phillip Brink (ohnobinki) <ohnobinki@ohnopublishing.net>.

svn path=/trunk/gentoolkit/; revision=772

ChangeLog
bin/euse

index 0c5e3e25e0eae28c939a6c483cfb196b6b4bf067..9b9e0cc53f1862ea8267a7561aaa38f64dac834d 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2010-04-11: Christian Ruppert <idl0r@gentoo.org>
+       * euse: Fix check for /etc/make.profile, check if its readable and a
+       directory instead of checking if its a link. Thanks to Phillip Brink
+       (ohnobinki) <ohnobinki@ohnopublishing.net>.
+
 2010-04-06: Christian Ruppert <idl0r@gentoo.org>
        * euse: Fix query to get USE, bug 181309, thanks to Jean-Baptiste Rouault
        <jbrouault@gmail.com>.
index 023bfe409216bc0ba43bd119f16456c0abdf914c..ab8b932e20e6f5807d1d7617947101e380bb4ef6 100755 (executable)
--- a/bin/euse
+++ b/bin/euse
@@ -68,11 +68,12 @@ check_sanity() {
        local descdir
        local make_defaults
 
+       [[ ! -d "${MAKE_PROFILE_PATH}" || ! -r "${MAKE_PROFILE_PATH}" ]] && error "${MAKE_PROFILE_PATH} is not readable"
+
        descdir="$(get_portdir)/profiles"
 
        [ ! -r "${MAKE_CONF_PATH}" ] && error "${MAKE_CONF_PATH} is not readable"
        [ ! -r "${MAKE_GLOBALS_PATH}" ] && error "${MAKE_GLOBALS_PATH} is not readable"
-       [ ! -h "${MAKE_PROFILE_PATH}" ] && error "${MAKE_PROFILE_PATH} is not a symlink"
        [ -z "$(get_portdir)" ] && error "\$PORTDIR couldn't be determined"
        [ ! -d "${descdir}" ] && error "${descdir} does not exist or is not a directory"
        [ ! -r "${descdir}/use.desc" ] && error "${descdir}/use.desc is not readable"