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

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