The universal_newlines=True changes need to be explained in the commit
message. Why are they added?

The need for hostos.startswith("darwin") is easier to guess, but that
too, needs an explanation.

Alex

On Fri, 12 Jan 2024 at 14:53, Etienne Cordonnier via
lists.openembedded.org <[email protected]>
wrote:
>
> From: Etienne Cordonnier <[email protected]>
>
> Signed-off-by: Dominik Schnitzer <[email protected]>
> Signed-off-by: Etienne Cordonnier <[email protected]>
> ---
>  meta/lib/oe/package.py | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/meta/lib/oe/package.py b/meta/lib/oe/package.py
> index 9a465eaa09..635efc9763 100644
> --- a/meta/lib/oe/package.py
> +++ b/meta/lib/oe/package.py
> @@ -1615,7 +1615,7 @@ def process_shlibs(pkgfiles, d):
>                      sonames.add(prov)
>          if file.endswith('.dylib') or file.endswith('.so'):
>              rpath = []
> -            p = subprocess.Popen([d.expand("${HOST_PREFIX}otool"), '-l', 
> file], stdout=subprocess.PIPE, stderr=subprocess.PIPE)
> +            p = subprocess.Popen([d.expand("${HOST_PREFIX}otool"), '-l', 
> file], stdout=subprocess.PIPE, stderr=subprocess.PIPE, 
> universal_newlines=True)
>              out, err = p.communicate()
>              # If returned successfully, process stdout for results
>              if p.returncode == 0:
> @@ -1624,7 +1624,7 @@ def process_shlibs(pkgfiles, d):
>                      if l.startswith('path '):
>                          rpath.append(l.split()[1])
>
> -        p = subprocess.Popen([d.expand("${HOST_PREFIX}otool"), '-L', file], 
> stdout=subprocess.PIPE, stderr=subprocess.PIPE)
> +        p = subprocess.Popen([d.expand("${HOST_PREFIX}otool"), '-L', file], 
> stdout=subprocess.PIPE, stderr=subprocess.PIPE, universal_newlines=True)
>          out, err = p.communicate()
>          # If returned successfully, process stdout for results
>          if p.returncode == 0:
> @@ -1686,7 +1686,7 @@ def process_shlibs(pkgfiles, d):
>                  soname = None
>                  if cpath.islink(file):
>                      continue
> -                if hostos == "darwin" or hostos == "darwin8":
> +                if hostos.startswith("darwin"):
>                      darwin_so(file, needed, sonames, renames, pkgver)
>                  elif hostos.startswith("mingw"):
>                      mingw_dll(file, needed, sonames, renames, pkgver)
> --
> 2.36.1.vfs.0.0
>
>
> 
>
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#193582): 
https://lists.openembedded.org/g/openembedded-core/message/193582
Mute This Topic: https://lists.openembedded.org/mt/103682827/21656
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to