]> code.ossystems Code Review - openembedded-core.git/commit
build-sysroots: add sysroot paths with native binaries to PATH
authorAlexander Kanavin <alex.kanavin@gmail.com>
Mon, 8 Jun 2020 07:46:59 +0000 (09:46 +0200)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 8 Jun 2020 20:42:24 +0000 (21:42 +0100)
commit6b5f7bda4204d45cd29670cefcd53dc5da031095
treefbd8c2266628cb201e35b3eacd55fd15dec5d180
parent9bc2943a7819c7e6d1bd4c1c03b265671811784c
build-sysroots: add sysroot paths with native binaries to PATH

staging_populate_sysroot_dir() collects postinsts from the sysroot
and executes them. These postinsts, in turn, may call binaries that
are only available from the sysroot. This works fine with recipe-specific
sysroots, as all necessary paths are already in PATH, but breaks down
in this recipe which imitates the old global sysroot way but doesn't adjust
the PATH to include the binary paths from global sysroot.

To reproduce the failure:

$ bitbake docbook-xml-dtd4-native
$ bitbake -c build_native_sysroot build-sysroots

...

Exception: subprocess.CalledProcessError: Command '/home/akanavin/build/tmp/sysroots/x86_64/usr/bin/postinst-docbook-xml-dtd4-native-xmlcatalog' returned non-zero exit status 127.

Subprocess output:
/home/akanavin/build/tmp/sysroots/x86_64/usr/bin/postinst-docbook-xml-dtd4-native-xmlcatalog: 5: /home/akanavin/build/tmp/sysroots/x86_64/usr/bin/postinst-docbook-xml-dtd4-native-xmlcatalog: xmlcatalog: not found
/home/akanavin/build/tmp/sysroots/x86_64/usr/bin/postinst-docbook-xml-dtd4-native-xmlcatalog: 8: /home/akanavin/build/tmp/sysroots/x86_64/usr/bin/postinst-docbook-xml-dtd4-native-xmlcatalog: xmlcatalog: not found

Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/recipes-core/meta/build-sysroots.bb