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

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