summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2007-07-26 21:54:49 +0000
committerZac Medico <zmedico@gentoo.org>2007-07-26 21:54:49 +0000
commit5d263871b4e468e35933d88ce5ee6b49f2228986 (patch)
tree8ca1e22d47c6500529b71cf6b9579e99fc2e8428 /bin
parentdd51b5cf3d0b3ec604092ca3a3851b406e8f22ce (diff)
downloadportage-5d263871b4e468e35933d88ce5ee6b49f2228986.tar.gz
portage-5d263871b4e468e35933d88ce5ee6b49f2228986.tar.bz2
portage-5d263871b4e468e35933d88ce5ee6b49f2228986.zip
For bug #186610, use `find <path>` to scan for config updates since `cd <path>` could fail and cause the cwd to be scanned. (trunk r7402)
svn path=/main/branches/2.1.2/; revision=7403
Diffstat (limited to 'bin')
-rwxr-xr-xbin/emerge10
1 files changed, 5 insertions, 5 deletions
diff --git a/bin/emerge b/bin/emerge
index f9fdd09d6..2e783f73b 100755
--- a/bin/emerge
+++ b/bin/emerge
@@ -4352,17 +4352,17 @@ def chk_updated_cfg_files(target_root, config_protect):
except OSError:
continue
if stat.S_ISDIR(mymode):
- mycommand = "cd '%s'; find . -iname '._cfg????_*'" % x
+ mycommand = "find '%s' -iname '._cfg????_*'" % x
else:
- mycommand = "cd '%s'; find . -maxdepth 1 -iname '._cfg????_%s'" % \
+ mycommand = "find '%s' -maxdepth 1 -iname '._cfg????_%s'" % \
os.path.split(x.rstrip(os.path.sep))
a = commands.getstatusoutput(mycommand + \
- " ! -iname '.*~' ! -iname '.*.bak'")
+ " ! -iname '.*~' ! -iname '.*.bak' -print0")
if a[0] != 0:
print >> sys.stderr, " " + bad("*")+ " error scanning '%s'" % x
else:
- files = a[1].split()
- if files:
+ files = a[1].split('\0')
+ if files != ['']:
procount += 1
print colorize("WARN", " * IMPORTANT:"),
if stat.S_ISDIR(mymode):