From: Alexander Kanavin <alex.kanavin@gmail.com>
To: openembedded-core@lists.openembedded.org
Cc: Alexander Kanavin <alex@linutronix.de>
Subject: [PATCH 1/2] meta/classes-recipe/toolchain-scripts.bbclass: eliminate bash-ism
Date: Tue, 7 Oct 2025 20:21:42 +0200 [thread overview]
Message-ID: <20251007182143.1235445-1-alex.kanavin@gmail.com> (raw)
From: Alexander Kanavin <alex@linutronix.de>
Sourcing a script with arguments is a non-standard bash extension
and doesn't work with other shells (e.g. dash, which is used on
Debian and derivatives). This used to work by coincidence when
running against integrated poky repo without having to separately
specify where bitbake is, but no longer does.
Using set is a POSIX standard.
Signed-off-by: Alexander Kanavin <alex@linutronix.de>
---
meta/classes-recipe/toolchain-scripts.bbclass | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/meta/classes-recipe/toolchain-scripts.bbclass b/meta/classes-recipe/toolchain-scripts.bbclass
index ec040b5ebbe..8c062ef0e74 100644
--- a/meta/classes-recipe/toolchain-scripts.bbclass
+++ b/meta/classes-recipe/toolchain-scripts.bbclass
@@ -92,7 +92,7 @@ toolchain_create_tree_env_script () {
touch $script
echo 'standalone_sysroot_target="${STAGING_DIR}/${MACHINE}"' >> $script
echo 'standalone_sysroot_native="${STAGING_DIR}/${BUILD_ARCH}"' >> $script
- echo "orig=`pwd`; cd ${COREBASE}; . ./oe-init-build-env ${TOPDIR} $bitbakedir; cd \$orig" >> $script
+ echo "orig=`pwd`; cd ${COREBASE}; set ${TOPDIR} $bitbakedir; . ./oe-init-build-env; cd \$orig" >> $script
echo 'export PATH=$standalone_sysroot_native/${bindir_native}:$standalone_sysroot_native/${bindir_native}/${TARGET_SYS}:$PATH' >> $script
echo 'export PKG_CONFIG_SYSROOT_DIR=$standalone_sysroot_target' >> $script
echo 'export PKG_CONFIG_PATH=$standalone_sysroot_target'"$libdir"'/pkgconfig:$standalone_sysroot_target'"$prefix"'/share/pkgconfig' >> $script
--
2.39.5
next reply other threads:[~2025-10-07 18:22 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-07 18:21 Alexander Kanavin [this message]
2025-10-07 18:21 ` [PATCH 2/2] selftest/meta_ide: source the environment first, then change to the sources directory Alexander Kanavin
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=20251007182143.1235445-1-alex.kanavin@gmail.com \
--to=alex.kanavin@gmail.com \
--cc=alex@linutronix.de \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox