All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Alexander Kanavin" <alex.kanavin@gmail.com>
To: openembedded-core@lists.openembedded.org
Cc: Alexander Kanavin <alex.kanavin@gmail.com>
Subject: [PATCH 42/42] build-sysroots: add sysroot paths with native binaries to PATH
Date: Mon,  8 Jun 2020 09:46:59 +0200	[thread overview]
Message-ID: <20200608074659.7051-42-alex.kanavin@gmail.com> (raw)
In-Reply-To: <20200608074659.7051-1-alex.kanavin@gmail.com>

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>
---
 meta/recipes-core/meta/build-sysroots.bb | 4 ++++
 1 file changed, 4 insertions(+)

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
 python do_build_native_sysroot () {
     targetsysroot = d.getVar("STANDALONE_SYSROOT")
     nativesysroot = d.getVar("STANDALONE_SYSROOT_NATIVE")
+    import os
+    os.environ['PATH'] = "%s/bin:%s/usr/bin:%s" % (nativesysroot, nativesysroot, os.environ['PATH'])
     staging_populate_sysroot_dir(targetsysroot, nativesysroot, True, d)
 }
 do_build_native_sysroot[cleandirs] = "${STANDALONE_SYSROOT_NATIVE}"
@@ -29,6 +31,8 @@ addtask do_build_native_sysroot before do_build
 python do_build_target_sysroot () {
     targetsysroot = d.getVar("STANDALONE_SYSROOT")
     nativesysroot = d.getVar("STANDALONE_SYSROOT_NATIVE")
+    import os
+    os.environ['PATH'] = "%s/bin:%s/usr/bin:%s" % (nativesysroot, nativesysroot, os.environ['PATH'])
     staging_populate_sysroot_dir(targetsysroot, nativesysroot, False, d)
 }
 do_build_target_sysroot[cleandirs] = "${STANDALONE_SYSROOT}"
-- 
2.26.2


      parent reply	other threads:[~2020-06-08  7:48 UTC|newest]

Thread overview: 47+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-08  7:46 [PATCH 01/42] linux-yocto: exclude from version checks/automated version updates Alexander Kanavin
2020-06-08  7:46 ` [PATCH 02/42] pciutils: upgrade 3.6.4 -> 3.7.0 Alexander Kanavin
2020-06-08  7:46 ` [PATCH 03/42] createrepo-c: upgrade 0.15.10 -> 0.15.11 Alexander Kanavin
2020-06-08  7:46 ` [PATCH 04/42] librepo: upgrade 1.11.3 -> 1.12.0 Alexander Kanavin
2020-06-08  7:46 ` [PATCH 05/42] pkgconf: upgrade 1.6.3 -> 1.7.3 Alexander Kanavin
2020-06-08  7:46 ` [PATCH 06/42] python3-numpy: upgrade 1.18.4 -> 1.18.5 Alexander Kanavin
2020-06-08  7:46 ` [PATCH 07/42] python3-git: upgrade 3.1.2 -> 3.1.3 Alexander Kanavin
2020-06-08  7:46 ` [PATCH 08/42] strace: upgrade 5.6 -> 5.7 Alexander Kanavin
2020-06-08  7:46 ` [PATCH 09/42] acpica: upgrade 20200430 -> 20200528 Alexander Kanavin
2020-06-08  7:46 ` [PATCH 10/42] iptables: upgrade 1.8.4 -> 1.8.5 Alexander Kanavin
2020-06-08  7:46 ` [PATCH 11/42] libarchive: upgrade 3.4.2 -> 3.4.3 Alexander Kanavin
2020-06-08  7:46 ` [PATCH 12/42] man-db: upgrade 2.9.1 -> 2.9.2 Alexander Kanavin
2020-06-08  7:46 ` [PATCH 13/42] msmtp: upgrade 1.8.10 -> 1.8.11 Alexander Kanavin
2020-06-08  7:46 ` [PATCH 14/42] epiphany: upgrade 3.36.1 -> 3.36.2 Alexander Kanavin
2020-06-08  7:46 ` [PATCH 15/42] cogl-1.0: upgrade 1.22.6 -> 1.22.8 Alexander Kanavin
2020-06-13 20:44   ` [OE-core] " Andrey Zhizhikin
2020-06-13 22:02     ` Alexander Kanavin
2020-06-08  7:46 ` [PATCH 16/42] libdrm: upgrade 2.4.101 -> 2.4.102 Alexander Kanavin
2020-06-08  7:46 ` [PATCH 17/42] vulkan-demos: upgrade to latest revision Alexander Kanavin
2020-06-08  7:46 ` [PATCH 18/42] xkeyboard-config: upgrade 2.29 -> 2.30 Alexander Kanavin
2020-06-08  7:46 ` [PATCH 19/42] linux-firmware: upgrade 20200421 -> 20200519 Alexander Kanavin
2020-06-08  7:46 ` [PATCH 20/42] babeltrace2: upgrade 2.0.2 -> 2.0.3 Alexander Kanavin
2020-06-08  7:46 ` [PATCH 21/42] lttng-tools: upgrade 2.12.0 -> 2.12.1 Alexander Kanavin
2020-06-08  7:46 ` [PATCH 22/42] ffmpeg: upgrade 4.2.2 -> 4.2.3 Alexander Kanavin
2020-06-08  7:46 ` [PATCH 23/42] wpebackend-fdo: upgrade 1.6.0 -> 1.6.1 Alexander Kanavin
2020-06-08  7:46 ` [PATCH 24/42] gnutls: upgrade 3.6.13 -> 3.6.14 Alexander Kanavin
2020-06-08  7:46 ` [PATCH 25/42] libcap: upgrade 2.34 -> 2.36 Alexander Kanavin
2020-06-08  7:46 ` [PATCH 26/42] vte: upgrade 0.60.2 -> 0.60.3 Alexander Kanavin
2020-06-08  7:46 ` [PATCH 27/42] bison: upgrade 3.6.2 -> 3.6.3 Alexander Kanavin
2020-06-08  7:46 ` [PATCH 28/42] asciidoc: 8.6.10 -> 9.0.0 Alexander Kanavin
2020-06-08  7:46 ` [PATCH 29/42] debianutils: 4.9.1 -> 4.11 Alexander Kanavin
2020-06-08  7:46 ` [PATCH 30/42] git: upgrade 2.26.2 -> 2.27.0 Alexander Kanavin
2020-06-08  7:46 ` [PATCH 31/42] go: 1.14.3 -> 1.14.4 Alexander Kanavin
2020-06-08  7:46 ` [PATCH 32/42] iproute2: upgrade 5.6.0 -> 5.7.0 Alexander Kanavin
2020-06-08  7:46 ` [PATCH 33/42] libksba: 1.3.5 -> 1.4.0 Alexander Kanavin
2020-06-08  7:46 ` [PATCH 34/42] lttng-modules: update to 2.12.1 Alexander Kanavin
2020-06-09 16:24   ` [OE-core] " Peter Kjellerstedt
2020-06-09 17:58     ` Alexander Kanavin
2020-06-08  7:46 ` [PATCH 35/42] mpg123: update to 1.26.1 Alexander Kanavin
2020-06-08  7:46 ` [PATCH 36/42] ovmf: update to 202005 Alexander Kanavin
2020-06-08  7:46 ` [PATCH 37/42] shared-mime-info: upgrade 1.15 -> 2.0 Alexander Kanavin
2020-06-08  7:46 ` [PATCH 38/42] subversion: upgrade 1.13.0 -> 1.14.0 Alexander Kanavin
2020-06-08  7:46 ` [PATCH 39/42] xinetd: 2.3.15 -> 2.3.15.4 Alexander Kanavin
2020-06-13  0:51   ` [OE-core] " Khem Raj
2020-06-08  7:46 ` [PATCH 40/42] init-system-helpers: use https for fetching Alexander Kanavin
2020-06-08  7:46 ` [PATCH 41/42] ca-certificates: correct upstream version check Alexander Kanavin
2020-06-08  7:46 ` Alexander Kanavin [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200608074659.7051-42-alex.kanavin@gmail.com \
    --to=alex.kanavin@gmail.com \
    --cc=openembedded-core@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.