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

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