[poky] Sourcing of poky-init-build-env from a non-bash shell...
Mark Hatle
mark.hatle at windriver.com
Fri Nov 19 17:23:49 PST 2010
In recent days I've had a few people complain to me that the only way they can
use Poky is to switch from their preferred shell to bash. So I took it upon
myself to attempt to address this issue.
In poky-contrib, commit 479e626839e3c9beb789ec2919d5438930eb04cf, head of
mhatle/initenv branch, is a patch that will allow the script to be sourced in
any reasonable shell.
I've attempted to test this with:
* bash
* dash
* ksh (ksh-93)
* zsh
* tcsh
It should also work with csh and pdksh, but I don't have a local version to try it.
If anyone using Poky regularly uses a non-bash shell, could you please try this
and verify that things are working for you?
For those of you who use the bash shell regularly, if you wouldn't mind trying
it in your configurations I'd appreciate it.
(I'm always looking for code reviews as well....)
--Mark
(Commit message follows)
commit 479e626839e3c9beb789ec2919d5438930eb04cf
Author: Mark Hatle <mark.hatle at windriver.com>
Date: Fri Nov 19 18:10:31 2010 -0600
poky-init-build-env: Update the build env to work in all POSIX and CSH shells
The poky-init-build-env was updated to determine the shell type and work in
all POSIX and CSH shells (within reason). Some tricky magic was involved in
determining the type of shell in use (csh or posix), and then configuring
the directories.
If the script was sourced with bash, then it works as it did before. If it
was sourced with any other shell, it requires the user's pwd to be the same
as the OEROOT.
In the scripts directory, poky-init-build-env used to further source the
poky-env-internal script. This script was broken up into two primary pieces:
1) The chunk that sets up the environment
2) The chunk that verifies and sets up the BUILDDIR
The first component was further seperated into two items, an sh and a csh
version. While it's possible to combine them, it's much easier this way.
The second component runs as a stand-a-lone sh script, so it is written for
use in /bin/sh
Signed-off-by: Mark Hatle <mark.hatle at windriver.com>
More information about the poky
mailing list