]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core.git/commitdiff
chrpath.bbclass: fix Darwin support
authorEtienne Cordonnier <ecordonnier@snap.com>
Fri, 12 Jan 2024 15:33:08 +0000 (16:33 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 15 Jan 2024 21:42:05 +0000 (21:42 +0000)
Ported from the meta-darwin layer:
The call to out.split("\n") expects a string, thus the parameter text=True is
needed (otherwise Popen returns a bytes object).

Note that "text" is just a more readable alias for universal_newlines.

Signed-off-by: Dominik Schnitzer <dominik@snap.com>
Signed-off-by: Etienne Cordonnier <ecordonnier@snap.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/classes/chrpath.bbclass

index 1aecb4df66200b6c881567fa8d7014bb1b9341d5..16729dcf611c2f00df7befe3908233eff9e0f5e1 100644 (file)
@@ -62,7 +62,7 @@ def process_file_linux(cmd, fpath, rootdir, baseprefix, tmpdir, d, break_hardlin
 def process_file_darwin(cmd, fpath, rootdir, baseprefix, tmpdir, d, break_hardlinks = False):
     import subprocess as sub
 
-    p = sub.Popen([d.expand("${HOST_PREFIX}otool"), '-L', fpath],stdout=sub.PIPE,stderr=sub.PIPE)
+    p = sub.Popen([d.expand("${HOST_PREFIX}otool"), '-L', fpath],stdout=sub.PIPE,stderr=sub.PIPE, text=True)
     out, err = p.communicate()
     # If returned successfully, process stdout for results
     if p.returncode != 0: