diff options
author | Dorinda <dorindabassey@gmail.com> | 2021-02-01 09:46:38 -0500 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2021-02-10 23:48:55 +0000 |
commit | 9294bc4bb4bb5b62c8895dfa0f44219b6146f981 (patch) | |
tree | 8c203bdfb3494bbb501e48e948dfa39d13f32503 /scripts/oe-pkgdata-util | |
parent | c2580d3a781538c9b140569751fe572eb261ab9f (diff) | |
download | poky-9294bc4bb4bb5b62c8895dfa0f44219b6146f981.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: e88073e16f1b4cfd0f97c81a988640a84adad674)
Signed-off-by: Dorinda Bassey <dorindabassey@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts/oe-pkgdata-util')
-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') |