diff options
author | Zac Medico <zmedico@gentoo.org> | 2007-07-30 07:00:22 +0000 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2007-07-30 07:00:22 +0000 |
commit | 58099f89d7532762beb50234a0327a9b7c23144b (patch) | |
tree | f164eeec405677c3f50cdb2feb605bfd827beeee /bin/emerge | |
parent | 9846c4f9f4281844c90ba6858a88b4dba70ddcce (diff) | |
download | portage-58099f89d7532762beb50234a0327a9b7c23144b.tar.gz portage-58099f89d7532762beb50234a0327a9b7c23144b.tar.bz2 portage-58099f89d7532762beb50234a0327a9b7c23144b.zip |
For bug #186610, use `find <path>` to scan for config updates since `cd <path>` could fail and cause the cwd to be scanned. (branches/2.1.2 r7403)
svn path=/main/branches/2.1.2.9/; revision=7506
Diffstat (limited to 'bin/emerge')
-rwxr-xr-x | bin/emerge | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/bin/emerge b/bin/emerge index b338febca..6a4260ca3 100755 --- a/bin/emerge +++ b/bin/emerge @@ -3836,17 +3836,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): |