summaryrefslogtreecommitdiffstats
path: root/meta/lib/oe/patch.py
diff options
context:
space:
mode:
Diffstat (limited to 'meta/lib/oe/patch.py')
-rw-r--r--meta/lib/oe/patch.py14
1 files changed, 9 insertions, 5 deletions
diff --git a/meta/lib/oe/patch.py b/meta/lib/oe/patch.py
index 40755fbb03..8ad70f53f1 100644
--- a/meta/lib/oe/patch.py
+++ b/meta/lib/oe/patch.py
@@ -38,15 +38,19 @@ def runcmd(args, dir = None):
38 args = [ pipes.quote(str(arg)) for arg in args ] 38 args = [ pipes.quote(str(arg)) for arg in args ]
39 cmd = " ".join(args) 39 cmd = " ".join(args)
40 # print("cmd: %s" % cmd) 40 # print("cmd: %s" % cmd)
41 (exitstatus, output) = subprocess.getstatusoutput(cmd) 41 proc = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=True)
42 stdout, stderr = proc.communicate()
43 stdout = stdout.decode('utf-8')
44 stderr = stderr.decode('utf-8')
45 exitstatus = proc.returncode
42 if exitstatus != 0: 46 if exitstatus != 0:
43 raise CmdError(cmd, exitstatus >> 8, output) 47 raise CmdError(cmd, exitstatus >> 8, "stdout: %s\nstderr: %s" % (stdout, stderr))
44 if " fuzz " in output and "Hunk " in output: 48 if " fuzz " in stdout and "Hunk " in stdout:
45 # Drop patch fuzz info with header and footer to log file so 49 # Drop patch fuzz info with header and footer to log file so
46 # insane.bbclass can handle to throw error/warning 50 # insane.bbclass can handle to throw error/warning
47 bb.note("--- Patch fuzz start ---\n%s\n--- Patch fuzz end ---" % format(output)) 51 bb.note("--- Patch fuzz start ---\n%s\n--- Patch fuzz end ---" % format(stdout))
48 52
49 return output 53 return stdout
50 54
51 finally: 55 finally:
52 if dir: 56 if dir: