summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2007-09-28 21:52:51 +0000
committerZac Medico <zmedico@gentoo.org>2007-09-28 21:52:51 +0000
commit32c40a53101e9d6a5065b5c27868455d73d6f2d0 (patch)
tree7ad0202880062969be9897649496d968d16855f5 /bin
parentaa9c02fc58e4feca71eeea7fb8ed946f01d3acd1 (diff)
downloadportage-32c40a53101e9d6a5065b5c27868455d73d6f2d0.tar.gz
portage-32c40a53101e9d6a5065b5c27868455d73d6f2d0.tar.bz2
portage-32c40a53101e9d6a5065b5c27868455d73d6f2d0.zip
Bug #193548 - When scanning for config updates and an error
occurs, send find's stdout to /dev/null so that only an error message is shown. (trunk r7875) svn path=/main/branches/2.1.2/; revision=7876
Diffstat (limited to 'bin')
-rwxr-xr-xbin/emerge10
1 files changed, 6 insertions, 4 deletions
diff --git a/bin/emerge b/bin/emerge
index 7dc67c8c5..cba9ef5e5 100755
--- a/bin/emerge
+++ b/bin/emerge
@@ -4537,11 +4537,13 @@ def chk_updated_cfg_files(target_root, config_protect):
else:
mycommand = "find '%s' -maxdepth 1 -iname '._cfg????_%s'" % \
os.path.split(x.rstrip(os.path.sep))
- a = commands.getstatusoutput(mycommand + \
- " ! -iname '.*~' ! -iname '.*.bak' -print0")
+ mycommand += " ! -iname '.*~' ! -iname '.*.bak' -print0"
+ a = commands.getstatusoutput(mycommand)
if a[0] != 0:
- print >> sys.stderr, " " + bad("*")+ \
- " error scanning '%s': %s" % (x, a[1])
+ sys.stderr.write(" %s error scanning '%s': " % (bad("*"), x))
+ sys.stderr.flush()
+ # Show the error message alone, sending stdout to /dev/null.
+ os.system(mycommand + " 1>/dev/null")
else:
files = a[1].split('\0')
# split always produces an empty string as the last element