diff options
| author | Dorinda <dorindabassey@gmail.com> | 2021-02-01 09:46:38 -0500 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2021-02-18 16:48:28 +0000 |
| commit | df4d2a6a8c985c8da1329daa2e609e5438ba802a (patch) | |
| tree | 7f7773deac8658589c80bb30fccd18e1e4f5823b /scripts | |
| parent | eb7697ed7be25b81e5168c4453f57e12c16a4e46 (diff) | |
| download | poky-df4d2a6a8c985c8da1329daa2e609e5438ba802a.tar.gz | |
oe-pkgdata-util: Check if environment script is initialized
Tinfoil doesn't behave well if environment is not initialized, this check ensures a proper error log if environment is not initialized.
[YOCTO #12096]
(From OE-Core rev: dfa4b0e6cabb870a33627ff5a0b5f413f6edb1e2)
Signed-off-by: Dorinda Bassey <dorindabassey@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit e88073e16f1b4cfd0f97c81a988640a84adad674)
Signed-off-by: Steve Sakoman <steve@sakoman.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts')
| -rwxr-xr-x | scripts/oe-pkgdata-util | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/scripts/oe-pkgdata-util b/scripts/oe-pkgdata-util index 93220e3617..75dd23efa3 100755 --- a/scripts/oe-pkgdata-util +++ b/scripts/oe-pkgdata-util | |||
| @@ -598,6 +598,9 @@ def main(): | |||
| 598 | logger.error("Unable to find bitbake by searching parent directory of this script or PATH") | 598 | logger.error("Unable to find bitbake by searching parent directory of this script or PATH") |
| 599 | sys.exit(1) | 599 | sys.exit(1) |
| 600 | logger.debug('Found bitbake path: %s' % bitbakepath) | 600 | logger.debug('Found bitbake path: %s' % bitbakepath) |
| 601 | if not os.environ.get('BUILDDIR', ''): | ||
| 602 | logger.error("This script can only be run after initialising the build environment (e.g. by using oe-init-build-env)") | ||
| 603 | sys.exit(1) | ||
| 601 | tinfoil = tinfoil_init() | 604 | tinfoil = tinfoil_init() |
| 602 | try: | 605 | try: |
| 603 | args.pkgdata_dir = tinfoil.config_data.getVar('PKGDATA_DIR') | 606 | args.pkgdata_dir = tinfoil.config_data.getVar('PKGDATA_DIR') |
