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

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