Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 173284
Collapse All | Expand All

(-)bin/dispatch-conf (-2 / +3 lines)
Lines 28-34 Link Here
28
from portage import dispatch_conf
28
from portage import dispatch_conf
29
from portage.process import find_binary
29
from portage.process import find_binary
30
30
31
FIND_EXTANT_CONFIGS  = "find '%s' %s -iname '._cfg????_%s' ! -iname '.*~' ! -iname '.*.bak'"
31
FIND_EXTANT_CONFIGS  = "find '%s' %s -name '._cfg????_%s' ! -name '.*~' ! -iname '.*.bak' -print"
32
DIFF_CONTENTS        = "diff -Nu '%s' '%s'"
32
DIFF_CONTENTS        = "diff -Nu '%s' '%s'"
33
DIFF_CVS_INTERP      = "diff -Nu '%s' '%s' | grep '^[+-][^+-]' | grep -v '# .Header:.*'"
33
DIFF_CVS_INTERP      = "diff -Nu '%s' '%s' | grep '^[+-][^+-]' | grep -v '# .Header:.*'"
34
DIFF_WSCOMMENTS      = "diff -Nu '%s' '%s' | grep '^[+-][^+-]' | grep -v '^[-+]#' | grep -v '^[-+][:space:]*$'"
34
DIFF_WSCOMMENTS      = "diff -Nu '%s' '%s' | grep '^[+-][^+-]' | grep -v '^[-+]#' | grep -v '^[-+][:space:]*$'"
Lines 93-103 Link Here
93
            except OSError:
93
            except OSError:
94
                continue
94
                continue
95
            basename = "*"
95
            basename = "*"
96
            find_opts = ""
96
            find_opts = "-name '.*' -type d -prune -o"
97
            if not stat.S_ISDIR(mymode):
97
            if not stat.S_ISDIR(mymode):
98
                path, basename = os.path.split(path)
98
                path, basename = os.path.split(path)
99
                find_opts = "-maxdepth 1"
99
                find_opts = "-maxdepth 1"
100
100
101
            print FIND_EXTANT_CONFIGS % (path, find_opts, basename)
101
            confs += self.massage(os.popen(FIND_EXTANT_CONFIGS % (path, find_opts, basename)).readlines())
102
            confs += self.massage(os.popen(FIND_EXTANT_CONFIGS % (path, find_opts, basename)).readlines())
102
103
103
        if self.options['use-rcs'] == 'yes':
104
        if self.options['use-rcs'] == 'yes':
(-)bin/etc-update (-3 / +5 lines)
Lines 50-66 Link Here
50
50
51
	for path in ${CONFIG_PROTECT} ; do
51
	for path in ${CONFIG_PROTECT} ; do
52
		path="${ROOT}${path}"
52
		path="${ROOT}${path}"
53
		find_opts="-iname ._cfg????_*"
53
		# Do not traverse hidden directories such as .svn or .git.
54
		find_opts="-name .* -type d -prune -o -name ._cfg????_*"
54
		if [ ! -d "${path}" ]; then
55
		if [ ! -d "${path}" ]; then
55
			[ ! -f "${path}" ] && continue
56
			[ ! -f "${path}" ] && continue
56
			my_basename="${path##*/}"
57
			my_basename="${path##*/}"
57
			path="${path%/*}"
58
			path="${path%/*}"
58
			find_opts="-maxdepth 1 -iname ._cfg????_${my_basename}"
59
			find_opts="-maxdepth 1 -name ._cfg????_${my_basename}"
59
		fi
60
		fi
60
61
61
		ofile=""
62
		ofile=""
62
		# The below set -f turns off file name globbing in the ${find_opts} expansion.
63
		# The below set -f turns off file name globbing in the ${find_opts} expansion.
63
		for file in $(set -f; find ${path}/ ${find_opts} ! -iname '.*~' ! -iname '.*.bak' |
64
		for file in $(set -f ; find ${path}/ ${find_opts} \
65
		       ! -name '.*~' ! -iname '.*.bak' -print |
64
			   sed -e "s:\(^.*/\)\(\._cfg[0-9]*_\)\(.*$\):\1\2\3\%\2\%\3:" |
66
			   sed -e "s:\(^.*/\)\(\._cfg[0-9]*_\)\(.*$\):\1\2\3\%\2\%\3:" |
65
			   sort -t'%' -k3 -k2 | LANG=POSIX LC_ALL=POSIX cut -f1 -d'%'); do
67
			   sort -t'%' -k3 -k2 | LANG=POSIX LC_ALL=POSIX cut -f1 -d'%'); do
66
68

Return to bug 173284