bstinson / rpms / mozjs60

Forked from rpms/mozjs60 5 years ago
Clone

Blame SOURCES/icu_sources_data-Write-command-output-to-our-stderr.patch

e43f4b
From: Simon McVittie <smcv@debian.org>
e43f4b
Date: Mon, 9 Oct 2017 09:23:14 +0100
e43f4b
Subject: icu_sources_data: Write command output to our stderr
e43f4b
e43f4b
Saying "See output in /tmp/foobar" is all very well for a developer
e43f4b
build, but on a buildd our /tmp is going to get thrown away after
e43f4b
the build. Just log the usual way instead.
e43f4b
---
e43f4b
 intl/icu_sources_data.py | 7 ++-----
e43f4b
 1 file changed, 2 insertions(+), 5 deletions(-)
e43f4b
e43f4b
diff --git a/intl/icu_sources_data.py b/intl/icu_sources_data.py
e43f4b
index 8cf9290..7d2d983 100644
e43f4b
--- a/intl/icu_sources_data.py
e43f4b
+++ b/intl/icu_sources_data.py
e43f4b
@@ -84,16 +84,13 @@ def update_sources(topsrcdir):
e43f4b
 
e43f4b
 def try_run(name, command, cwd=None, **kwargs):
e43f4b
     try:
e43f4b
-        with tempfile.NamedTemporaryFile(prefix=name, delete=False) as f:
e43f4b
-            subprocess.check_call(command, cwd=cwd, stdout=f,
e43f4b
+        subprocess.check_call(command, cwd=cwd, stdout=sys.stderr,
e43f4b
                                 stderr=subprocess.STDOUT, **kwargs)
e43f4b
     except subprocess.CalledProcessError:
e43f4b
-        print('''Error running "{}" in directory {}
e43f4b
-    See output in {}'''.format(' '.join(command), cwd, f.name),
e43f4b
+        print('''Error running "{}" in directory {}'''.format(' '.join(command), cwd),
e43f4b
             file=sys.stderr)
e43f4b
         return False
e43f4b
     else:
e43f4b
-        os.unlink(f.name)
e43f4b
         return True
e43f4b
 
e43f4b