Revert r3129 and r3130 because they don't solve bug #129515.
authorZac Medico <zmedico@gentoo.org>
Tue, 11 Apr 2006 21:11:31 +0000 (21:11 -0000)
committerZac Medico <zmedico@gentoo.org>
Tue, 11 Apr 2006 21:11:31 +0000 (21:11 -0000)
svn path=/main/trunk/; revision=3132

bin/dispatch-conf
bin/etc-update

index 4df6306f71ee36aa37b3bd99d6f39237fc1a1f9c..586b98759f8e4dfd96c2c5e3b49687c9e427caa7 100755 (executable)
@@ -18,16 +18,8 @@ import os, shutil, sys, string, re, commands, atexit
 sys.path = ["/usr/lib/portage/pym"]+sys.path
 
 import portage, dispatch_conf
-import portage_exec
-
-# `readlink -f` is not supported on all systems, so it's necessary to test for
-# the alternative "realpath" program.
-FIND_EXTANT_CONFIGS  = "find -L %s/ -iname '._cfg????_*' -exec realpath '{}' ';' | uniq | sed -e 's://:/:g'"
-realpath_binary = portage_exec.find_binary("realpath")
-if realpath_binary is None:
-    FIND_EXTANT_CONFIGS = FIND_EXTANT_CONFIGS.replace("realpath", "readlink -q -f")
-del realpath_binary
 
+FIND_EXTANT_CONFIGS  = "find %s/ -iname '._cfg????_*' | sed -e 's://:/:g'"
 DIFF_CONTENTS        = 'diff -Nu %s %s'
 DIFF_CVS_INTERP      = 'diff -Nu %s %s | grep "^[+-][^+-]" | grep -v "# .Header:.*"'
 DIFF_WSCOMMENTS      = 'diff -Nu %s %s | grep "^[+-][^+-]" | grep -v "^[-+]#" | grep -v "^[-+][:space:]*$"'
index 234a6bd34166c53353a73accaa405cfd1da09d30..d2946c3a001362278a4cf2d6f782b9234e020cf1 100755 (executable)
@@ -40,16 +40,11 @@ function scan() {
                exit 1
        fi
 
-       # `readlink -f` is not supported on all systems, so it's necessary to test
-       # for the alternative "realpath" program.
-       local realpath_cmd="$(type -p "realpath")"
-       [ -z "${realpath_cmd}" ] && realpath_cmd="readlink -q -f"
-
        for path in ${CONFIG_PROTECT} ; do
                [ ! -d ${path} ] && continue
 
                ofile=""
-               for file in `find -L ${path}/ -iname "._cfg????_*" -exec ${realpath_cmd} '{}' ';' | uniq |
+               for file in `find ${path}/ -iname "._cfg????_*" |
                           sed -e "s:\(^.*/\)\(\._cfg[0-9]*_\)\(.*$\):\1\2\3\%\2\%\3:" |
                           sort -t'%' -k3 -k2 | LANG=POSIX LC_ALL=POSIX cut -f1 -d'%'`; do
                        rpath=`echo "${file/\/\///}" | sed -e "s:/[^/]*$::"`