diff options
author | Zac Medico <zmedico@gentoo.org> | 2007-07-26 21:52:14 +0000 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2007-07-26 21:52:14 +0000 |
commit | 5e2d2b4715cdf0c9bc1df709f2c41900cb123299 (patch) | |
tree | c71fab108b49e67a94be193f0c95a0013480207e | |
parent | fc9e005a7f3a3f1415c81c6f9614ccfcf8df65e4 (diff) | |
download | portage-5e2d2b4715cdf0c9bc1df709f2c41900cb123299.tar.gz portage-5e2d2b4715cdf0c9bc1df709f2c41900cb123299.tar.bz2 portage-5e2d2b4715cdf0c9bc1df709f2c41900cb123299.zip |
For bug #186610, use `find <path>` to scan for config updates since `cd <path>` could fail and cause the cwd to be scanned.
svn path=/main/trunk/; revision=7402
-rw-r--r-- | pym/emerge/__init__.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/pym/emerge/__init__.py b/pym/emerge/__init__.py index 2c6d81d27..b76874758 100644 --- a/pym/emerge/__init__.py +++ b/pym/emerge/__init__.py @@ -4365,17 +4365,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): |