Lines 14-26
#
Link Here
|
14 |
|
14 |
|
15 |
from stat import * |
15 |
from stat import * |
16 |
from random import * |
16 |
from random import * |
17 |
import os, shutil, sys, string, re, commands, atexit |
17 |
import os, shutil, stat, string, sys, re, commands, atexit |
18 |
sys.path = ["/usr/lib/portage/pym"]+sys.path |
18 |
sys.path = ["/usr/lib/portage/pym"]+sys.path |
19 |
|
19 |
|
20 |
import portage, dispatch_conf |
20 |
import portage, dispatch_conf |
21 |
from portage_exec import find_binary |
21 |
from portage_exec import find_binary |
22 |
|
22 |
|
23 |
FIND_EXTANT_CONFIGS = "find %s/ -iname '._cfg????_*' | sed -e 's://:/:g'" |
23 |
FIND_EXTANT_CONFIGS = "find '%s' %s -name '._cfg????_%s'" |
24 |
DIFF_CONTENTS = 'diff -Nu %s %s' |
24 |
DIFF_CONTENTS = 'diff -Nu %s %s' |
25 |
DIFF_CVS_INTERP = 'diff -Nu %s %s | grep "^[+-][^+-]" | grep -v "# .Header:.*"' |
25 |
DIFF_CVS_INTERP = 'diff -Nu %s %s | grep "^[+-][^+-]" | grep -v "# .Header:.*"' |
26 |
DIFF_WSCOMMENTS = 'diff -Nu %s %s | grep "^[+-][^+-]" | grep -v "^[-+]#" | grep -v "^[-+][:space:]*$"' |
26 |
DIFF_WSCOMMENTS = 'diff -Nu %s %s | grep "^[+-][^+-]" | grep -v "^[-+]#" | grep -v "^[-+][:space:]*$"' |
Lines 79-88
class dispatch:
Link Here
|
79 |
# |
79 |
# |
80 |
|
80 |
|
81 |
for path in config_paths.split (): |
81 |
for path in config_paths.split (): |
82 |
if not os.path.exists (path): |
82 |
path = portage.normalize_path(path) |
|
|
83 |
try: |
84 |
mymode = os.lstat(path).st_mode |
85 |
except OSError: |
83 |
continue |
86 |
continue |
|
|
87 |
basename = "*" |
88 |
find_opts = "" |
89 |
if not stat.S_ISDIR(mymode): |
90 |
path, basename = os.path.split(path) |
91 |
find_opts = "-maxdepth 1" |
84 |
|
92 |
|
85 |
confs += self.massage (os.popen (FIND_EXTANT_CONFIGS % (path,)).readlines ()) |
93 |
confs += self.massage(os.popen(FIND_EXTANT_CONFIGS % (path, find_opts, basename)).readlines()) |
86 |
|
94 |
|
87 |
if self.options['use-rcs'] == 'yes': |
95 |
if self.options['use-rcs'] == 'yes': |
88 |
for rcs_util in ("rcs", "ci", "co", "rcsmerge"): |
96 |
for rcs_util in ("rcs", "ci", "co", "rcsmerge"): |