Replace calls to readlink with bash function
authorfuzzyray <fuzzyray@gentoo.org>
Tue, 1 Aug 2006 03:55:02 +0000 (03:55 -0000)
committerfuzzyray <fuzzyray@gentoo.org>
Tue, 1 Aug 2006 03:55:02 +0000 (03:55 -0000)
svn path=/; revision=307

trunk/ChangeLog
trunk/src/euse/euse

index 3cc782eff8dcdcbbcd254a36fe6fea817cc8de4e..44e2e1e4a2ea433335bd56887ad16ef6a85860c4 100644 (file)
@@ -1,3 +1,7 @@
+2006-07-31 Paul Varner <fuzzyray@gentoo.org>
+       * euse: Replace calls to readlink with bash function for Gentoo/ALT
+       compatibility. (Bugs #140477, #128960)
+
 2006-07-28 Paul Varner <fuzzyray@gentoo.org>
        * revdep-rebuild: Fix revdep-rebuild to correctly handle --ask being
        passed to emerge. Thanks to Sal Gonzalez <ghostx@optonline.net> for
index eaf964522b87bb673b18669db016ecff4052040a..df8d1575de1a2df25b8560e2a03864ca61d64258 100755 (executable)
@@ -55,6 +55,14 @@ error() {
        exit 1
 }
 
+get_real_path() {
+       set -P
+       cd "$1"
+       pwd
+       cd $OLDPWD
+       set +P
+}
+
 check_sanity() {
        # file permission tests
        local descdir
@@ -157,12 +165,12 @@ get_all_make_defaults() {
        local parent
        local rvalue
        
-       curdir="$(readlink -f ${MAKE_PROFILE_PATH})"
+       curdir="$(get_real_path ${MAKE_PROFILE_PATH})"
        
        while [ -f "${curdir}/parent" ]; do
                [ -f "${curdir}/make.defaults" ] && rvalue="${curdir}/make.defaults ${rvalue}"
                parent="$(egrep -v '(^#|^ *$)' ${curdir}/parent)"
-               curdir="$(readlink -f ${curdir}/${parent})"
+               curdir="$(get_real_path ${curdir}/${parent})"
        done
 
        echo "${rvalue}"
@@ -173,11 +181,11 @@ get_make_defaults() {
        local curdir
        local parent
        
-       curdir="$(readlink -f ${MAKE_PROFILE_PATH})"
+       curdir="$(get_real_path ${MAKE_PROFILE_PATH})"
        
        while [ ! -f "${curdir}/make.defaults" -a -f "${curdir}/parent" ]; do
                parent="$(egrep -v '(^#|^ *$)' ${curdir}/parent)"
-               curdir="$(readlink -f ${curdir}/${parent})"
+               curdir="$(get_real_path ${curdir}/${parent})"
        done
 
        echo "${curdir}/make.defaults"