summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core
diff options
context:
space:
mode:
authorAlexander Kanavin <alex.kanavin@gmail.com>2020-06-08 09:46:59 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2020-06-18 12:25:01 +0100
commit5d53b2117ba860b33fef6aad1000e9c5efb4f2a7 (patch)
treeaa3743b61a729b56481dfce0e6fcc44bd93742cb /meta/recipes-core
parentd0e16ddf3b99cce4715b5d827f7daadc93e844a5 (diff)
downloadpoky-5d53b2117ba860b33fef6aad1000e9c5efb4f2a7.tar.gz
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 (From OE-Core rev: 17fad96d3d9a8cfbc6724466475f6f161e967b74) Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 6b5f7bda4204d45cd29670cefcd53dc5da031095) Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-core')
-rw-r--r--meta/recipes-core/meta/build-sysroots.bb4
1 files changed, 4 insertions, 0 deletions
diff --git a/meta/recipes-core/meta/build-sysroots.bb b/meta/recipes-core/meta/build-sysroots.bb
index 7a712e2f38..ad22a75eb2 100644
--- a/meta/recipes-core/meta/build-sysroots.bb
+++ b/meta/recipes-core/meta/build-sysroots.bb
@@ -20,6 +20,8 @@ deltask populate_sysroot
20python do_build_native_sysroot () { 20python do_build_native_sysroot () {
21 targetsysroot = d.getVar("STANDALONE_SYSROOT") 21 targetsysroot = d.getVar("STANDALONE_SYSROOT")
22 nativesysroot = d.getVar("STANDALONE_SYSROOT_NATIVE") 22 nativesysroot = d.getVar("STANDALONE_SYSROOT_NATIVE")
23 import os
24 os.environ['PATH'] = "%s/bin:%s/usr/bin:%s" % (nativesysroot, nativesysroot, os.environ['PATH'])
23 staging_populate_sysroot_dir(targetsysroot, nativesysroot, True, d) 25 staging_populate_sysroot_dir(targetsysroot, nativesysroot, True, d)
24} 26}
25do_build_native_sysroot[cleandirs] = "${STANDALONE_SYSROOT_NATIVE}" 27do_build_native_sysroot[cleandirs] = "${STANDALONE_SYSROOT_NATIVE}"
@@ -29,6 +31,8 @@ addtask do_build_native_sysroot before do_build
29python do_build_target_sysroot () { 31python do_build_target_sysroot () {
30 targetsysroot = d.getVar("STANDALONE_SYSROOT") 32 targetsysroot = d.getVar("STANDALONE_SYSROOT")
31 nativesysroot = d.getVar("STANDALONE_SYSROOT_NATIVE") 33 nativesysroot = d.getVar("STANDALONE_SYSROOT_NATIVE")
34 import os
35 os.environ['PATH'] = "%s/bin:%s/usr/bin:%s" % (nativesysroot, nativesysroot, os.environ['PATH'])
32 staging_populate_sysroot_dir(targetsysroot, nativesysroot, False, d) 36 staging_populate_sysroot_dir(targetsysroot, nativesysroot, False, d)
33} 37}
34do_build_target_sysroot[cleandirs] = "${STANDALONE_SYSROOT}" 38do_build_target_sysroot[cleandirs] = "${STANDALONE_SYSROOT}"