aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/oe-buildenv-internal
AgeCommit message (Collapse)Author
2018-11-06oe-init-buildenv/base: Relax python version checks in favour of HOSTTOOLS ↵Richard Purdie
manipulation Several distros are now shipping "python" as python v3 contra to the original python guidelines. This causes users confusion/pain in trying to use our tools. We can just force "python" to "python2" within HOSTTOOLS to avoid this issue and hide the complexity from the user. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-03-01oe-init-env: search 'bitbake' outside of oe-coreEnrico Scholz
atm, 'oe-init-build-env' expects 'bitbake' to be within the OE core git repository. This complicates the project setup because you have to manage the 'bitbake' directory or symlink manually (or specify the bitbake location explicitly). Looking for 'bitbake' outside the main git repository will ease project management significantly. Now, you can put everything into git submodules, clone the project with | git clone --recursive ... and continue immediately with | ..../oe-init-build-env E.g. when you had previously | . | |-- build/ | `-- sources/ | `-- org.openembedded.core/ | `-- bitbake -> ../bitbake (where 'bitbake' must be created manually after cloning the project), you can have now | . | |-- build/ | `-- sources/ | |-- bitbake/ | `-- org.openembedded.core/ which is completely managed by 'git'. Patch adds $OEROOT/.. to the search path for 'bitbake' Signed-off-by: Enrico Scholz <enrico.scholz@sigma-chemnitz.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-11-03oe-buildenv-internal: Fix finding build directoryRichard Purdie
The intent of the env setup scripts is to set BBPATH to point at the build directory. This means if the user changes directory, bitbake can still find the original build directory. The default bblayers.conf files reset BBPATH to the correct components so this is safe and restores the behaviour the script was intended to have. [YOCTO #12163] Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-21oe-init-build-env-memres: Drop itRichard Purdie
With the new server structure we no longer need this separate environment init script. Just set BB_SERVER_TIMEOUT to be greater than zero and bitbake will remain in memory and the UI will auto-reconnect to it. Also clean out the old shutdown code from oe-init-build-env which also doesn't make sense now. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-12-13oe-buildenv-internal: show usage outputEd Bartosh
Show usage text if script is not sourced. Tested in bash, zsh and dash. [YOCTO #10751] Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-08-17oe-buildenv-internal: hint at specifying bitbake path in error messagePaul Eggleton
If you check out OE-Core and then run oe-init-build-env you get an error about not having bitbake checked out in a "bitbake" subdirectory, however it's possible to specify the bitbake path on the oe-init-build-env command line, so hint at that in the error message rather than implying it has to be in the default location. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-07-07classes/sstate: add a mode to error if sstate package unavailablePaul Eggleton
If BB_SETSCENE_ENFORCE is set to "1" and an sstate package fails to download outside of the whitelist specified by BB_SETSCENE_ENFORCE_WHITELIST, then fail immediately so you can tell that the problem was caused by failing to restore the task from sstate. Part of the implementation of [YOCTO #9367]. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-06-01oe-buildenv-internal: Update to python3Richard Purdie
Check that 'python' is a python v2 since that is what we assume everywhere and upstream python devs recommend. We can need both python2 and python3 available since we don't control the software we might download and run. Also check that python 3 is >= 3.4.0, our minimum version for bitbake. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-05-17oe-buildenv-internal: add BBPATH_EXTRA to BB_ENV_EXTRAWHITE_OERobert Yang
So that user can easily make their own conf files such as conf/site.conf work. For example, poky's default BBPATH in bblayers.conf is: BBPATH = "${TOPDIR}" Will change it to: BBPATH_EXTRA ??= "" BBPATH = "${BBPATH_EXTRA}${TOPDIR}" When user sets BBPATH_EXTRA in env to their own dir which contains conf/site.conf, it will work. Note, BBPATH_EXTRA must end with ":", we can't set BBPATH as "${BBPATH_EXTRA}:${TOPDIR}" since the sanity would fail when BBPATH_EXTRA is null. [YOCTO #7837] Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-04-05scripts/oe-buildenv-internal: Fix regression in BB_ENV_EXTRAWHITE settingOtavio Salvador
The commit OE-Core:ada4639 (oe-buildenv-internal: simplify derivation of BB_ENV_EXTRAWHITE) changed the format of BB_ENV_EXTRAWHITE variable to: ,---- | BB_ENV_EXTRAWHITE='ALL_PROXY | BB_NO_NETWORK | BB_NUMBER_THREADS | ... | ' `---- Instead of: ,---- | BB_ENV_EXTRAWHITE='ALL_PROXY BB_NO_NETWORK BB_NUMBER_THREADS...' `---- The old format allow for external script parsing easier and there is no need to change the format as it has no benefit from usage perspective. Signed-off-by: Otavio Salvador <otavio@ossystems.com.br> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-03-26oe-buildenv-internal: simplify derivation of BB_ENV_EXTRAWHITEAndre McCurdy
Use 'sort --unique' to combine the two lists and remove duplicates. Signed-off-by: Andre McCurdy <armccurdy@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-03-21oe-buildenv-internal: Correct the sed expression which updates $PATHPeter Kjellerstedt
Without this, the code that adds paths to $PATH could cause it to end up with a trailing : which would then cause an error from the sanity checker. Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-03-20oe-buildenv-internal: Some clean upPeter Kjellerstedt
* Consistent indentation (four spaces) * Use [ -z ...] and [ -n ... ] where possible * Unset temporary variables * Use $(...) instead of `...` * Avoid an unnecessary call to expr Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-03-20oe-buildenv-internal: Add variables individually to BB_ENV_EXTRAWHITEPeter Kjellerstedt
Instead of adding all variables to BB_ENV_EXTRAWHITE as one, treat them separately and add them one by one as needed. Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-03-20oe-buildenv-internal: Add paths to $PATH individuallyPeter Kjellerstedt
Instead of assuming that the path to the scripts directory always is in $PATH directly before the bitbake directory, treat them as separate paths and add them individually to $PATH. Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-12-22oe-buildenv-internal: fix return codeJuro Bystricky
The script oe-buildenv-internal is called from oe-init-build-env. Make sure oe-init-buildenv does not return an error if BB_ENV_EXTRAWHITE is already set, otherwise this will cause oe-init-build-env to fail. Signed-off-by: Juro Bystricky <juro.bystricky@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-12-12oe-buildenv-internal: preserve existing BB_ENV_EXTRAWHITEJuro Bystricky
According to the BitBake User Manual the environment variable BB_ENV_EXTRAWHITE specifies an additional set of variables to allow through (whitelist) from the external environment into BitBake's datastore. However, running: $ source oe-init-build-env build-name will overwrite any pre-existing BB_ENV_EXTRAWHITE variables. This patch modifies this behaviour: all oe-build-internal BB_ENV_EXTRAWHITE variables are appended to any potentially already existing BB_ENV_EXTRAWHITE variables. (The variables are only appended if not already in BB_ENV_EXTRAWHITE) Signed-off-by: Juro Bystricky <juro.bystricky@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-02-23scripts/oe-buildenv-internal: add means of skipping SDK check during setupRandy Witt
The oe-buildenv-internal script checks if the user is already in an sdk environment and errors if true. Add a way to skip this check. Signed-off-by: Randy Witt <randy.e.witt@linux.intel.com> Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-06-17oe-buildenv-internal: Ensure error messages got to stderrRichard Purdie
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-06-17oe-buildenv-internal: Fix exit verses returnRichard Purdie
This script is sourced so we should return, not exit. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-06-14scripts/buildenv-internal/sanity: Update to python 2.7.3 as a minimumRichard Purdie
We're finding bugs in python 2.6 and starting to require unittest functionality in python 2.7.x. Its time to bump the minimum version requirement. Anyone without python 2.7.x can use the buildtools-tarball out to install a standalone python/git/tar setup which will work with the system. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-06-14scripts/oe-buildenv-internal bitbake: Migrate python version checksRichard Purdie
In preparation for removal of the bitbake wrapper script, move the python version checks to the environment script. There are also checks within bitbake itself but these may not always function correctly on every version of python so this is really insurance. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-04-09oe-buildenv-internal: Only add to $PATH if neededPeter Kjellerstedt
First strip $PATH of any existence of the paths needed by Open Embedded and BitBake. Then add the needed paths at the beginning. This makes sure the needed paths are searched first, without growing $PATH unnecessarily if oe-init-build-env is rerun for a directory for which it has previously been run. Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-04-08oe-buildenv-internal: Only add to $PATH if neededPeter Kjellerstedt
If $PATH already has the needed paths at the beginning, there is no need to add them again. This allows rerunning oe-init-build-env for the same directory without having $PATH increase unnecessarily every time. Signed-off-by: Peter Kjellerstedt <pkj@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-03-07bitbake.conf: add STAMPS_DIR for constructing STAMPRobert Yang
Add STAMPS_DIR for constructing STAMP, the defination of STAMP is: STAMP = "${TMPDIR}/stamps/${MULTIMACH_TARGET_SYS}/${PN}/${EXTENDPE}${PV}-${PR}" We can only change the TMPDIR if we want to change the STAMP's location, but the bb_cache.dat would be regenerated if TMPDIR changes, so add STAMPS_DIR for constructing it, and add it to the BB_ENV_EXTRAWHITE, this is very usefull for the "bitbake -S", since then it can be run by: STAMPS_DIR=<path> bitbake -S <recipe> which will avoid putting the stamps to ${TMPDIR}/stamps. BTW, break the too long BB_ENV_EXTRAWHITE into several lines. [YOCTO #1659] Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2013-02-11oe-buildenv-internal: Add upper and lower case proxy vars to BB_ENV_EXTRAWHITEDarren Hart
Applications are inconsistent in their use of upper and lower case proxy variables. Curl, for example, specifies NO_PROXY (not no_proxy) in the man page (changed in 2009 [1]). Avoid proxy issues by ensuring both the upper and lower case versions of each proxy variable are available in the environment for the fetcher commands. Add FTPS_PROXY and ftps_proxy to the list as well. 1. http://curl.haxx.se/mail/tracker-2009-04/0012.html Signed-off-by: Darren Hart <dvhart@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-02-11oe-buildenv-internal: Remove GIT variables from BB_ENV_EXTRAWHITEDarren Hart
The following variables perform no function outside of bitbake: GIT_CONFIG GIT_PROXY_HOST GIT_PROXY_PORT GIT_PROXY_IGNORE GIT_CONFIG only affects the git-config command which is not relevant to the fetcher. This was previously used with the OE GIT_CORE_CONFIG variable which would provide a basic git config to use instead of the user's config. This usage was deprecated by git for over a year now: http://git.661346.n2.nabble.com/Overriding-gitconfig-using-GIT-CONFIG-td6680977 GIT_PROXY_HOST and GIT_PROXY_PORT are not used by git. GIT_PROXY_IGNORE was an OE construct used to create the custom git config and had no meaning outside of the OE environment. It is not used by git. Remove these variables from the fetcher environment. Users wishing to configure git to work with a proxy should define the GIT_PROXY_COMMAND environment variable to use an external script. NO_PROXY can be used within this script to skip the proxy for certain hosts. Signed-off-by: Darren Hart <dvhart@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-10-07oe-buildenv-internal: Add BB_NO_NETWORK to BB_ENV_EXTRAWHITEOtavio Salvador
This allows for use of bitbake in offline mode, but override it in command line. Signed-off-by: Otavio Salvador <otavio@ossystems.com.br> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-10-02scripts/oe-buildenv-internal: Ensure we detect the SDK/ADT and error outRichard Purdie
The SDK/ADT may ship with a python installed which may not have all the modules need for a bitbake build. We should therefore detect if its already present in the environment and error out in this case, asking the user to use a clean environment. This also removes the potential for any other conflict between the two. [YOCTO #2979] Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-05-12oe-buildenv-internal: Fix BITBAKEDIR changes to work with existing ↵Richard Purdie
autobuilder scritpts The BITBAKEDIR change does not work well when the script is sourced from another script since $2 may be unrelated. This change adds the logic onto the BDIR conditional and which more external scripts would set, hence avoiding the problem. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-05-11Add option to oe-buildenv-internal script to change bitbake location.Philip Balister
Having bitbake inside the oe-core is annoying to some people. This commit adds a second option to the oe-init-build-env script. Run like this: . ./oe-init-build-env ../build ../bitbake for example. Without the second option, the old behavior is preserved. Signed-off-by: Philip Balister <philip@balister.org> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-05-06terminal.bbclass, oe-buildenv-internal: pass SCREENDIR environment variableJason Wessel
Some versions of the screen utility provided from the host OS vendor write the socket directory to $HOME/.screen. When using a shared home directory across many servers, one sets the SCREENDIR environment variable to avoid collisions in the shared home directory. This results in problems launching a devshell where it is not entirely obvious what happened because the SCREENDIR environment variable got stripped from the environment prior to setting up the screen in detached mode. Example: % bitbake -c devshell busybox # ...Please connect in another terminal with "screen -r devshell" % screen -r devshell There is no screen to be resumed matching devshell. The temporary work around was to do something like: sh -c "unset SCREENDIR; screen -r devshell" This patch adds SCREENDIR to the white list to ensure screen works properly on systems where a developer needs to use the SCREENDIR with shared home directories. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-03-26Various typoes fixed, all comments or output strings.Robert P. J. Day
Typoes fixed: "enviroment", "editted", "spliting", "scheulder". Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-10-05scripts/oe-buildenv-internal: Add SOCKS5_{USER, PASSWD} to BB_ENV_EXTRAWHITEKumar Gala
If a SOCKS5 gateway is needed for a proxy access like git it might also require authentication to the proxy via a password and username. Adding SOCKS5_USER & SOCKS5_PASSWD to BB_ENV_EXTRAWHITE allow for automation of the authentication request to occur when something like a git fetch is going through the proxy. This patch requires the bitbake patch to add extra exportvars so these variables get passed from Env -> bitbake -> fetcher Signed-off-by: Kumar Gala <galak@kernel.crashing.org> Signed-off-by: Matthew McClintock <msm@freescale.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-08-10scripts/oe-buildenv-internal: improve the error detecting for $BDIRDexuan Cui
The previous fix for a bug in Ubuntu 10.04 readlink, be2a2764d8ceb398d81714661e6f199c8b11946c, notified the user when a trailing slash was used. As there is no semantic difference, simply remove any trailing slashes and proceed without nagging the user. See [YOCTO #671] for more details. Signed-off-by: Dexuan Cui <dexuan.cui@intel.com> Acked-by: Darren Hart <dvhart@linux.intel.com> Cc: Paul Eggleton <paul.eggleton@linux.intel.com>
2011-08-02oe-init-build-env, scripts/oe-buildenv-internal: add error detecting for $BDIRDexuan Cui
[YOCTO #671] "readlink -f" in Ubuntu 10.04 is buggy: it doesn't ignore a trailing / (e.g., "readlink -f /tmp/non-existent-dir/" returns nothing, but according to http://www.gnu.org/s/coreutils/manual/coreutils.pdf it should do that -- hence we get bug 671. It seems Ubuntu 10.10 or even later Ubuntu 11.04, and other Linux distributions(e.g., Open Suse 11.4) haven't such an issue. So I think we should detect this and ask Ubuntu 10.04 users to avoid supply a path with trailing slash here. Moreever, I also add the detection of non-existent path, e.g., source oe-init-build-env /non-existent-dir/build can be detected and we'll print an error msg. And, if we get errors in oe-buildenv-internal, we should stop the script and shouldn't further run. Signed-off-by: Dexuan Cui <dexuan.cui@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-07-19oe-buildenv-internal: Replace POKYMODE POKYLIBC with TCMODE and TCLIBCKhem Raj
These are new variable names in oe-core Signed-off-by: Khem Raj <raj.khem@gmail.com>
2011-06-28Add PARALLEL_MAKE to BB_ENV_EXTRAWHITEDarren Hart
As BB_NUMBER_THREADS is already whitelisted, it is consistent to also allow PARALLEL_MAKE to be overridden via the environment. This also simplifies performance testing where multiple combinations of those two variables are a natural thing to do. Signed-off-by: Darren Hart <dvhart@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-05-18scripts/oe-buildenv-internal: Improve message when bitbake is missingRichard Purdie
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-04-21Further cleanup of various poky referencesRichard Purdie
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-04-20Rename poky-qemu to runqemuRichard Purdie
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-04-20Rename poky-init-build-env to oe-init-build-envRichard Purdie
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>