Hi Richard, I checked devtool and recipetool, they have checks in place that errors out immediately if executed without initializing oe-init-build-env script.
However, I'm unsure about this: I'm wondering if there should be a check inside tinfoil itself? Thanks and Regards, Dorinda. On Feb 8, 2021 17:42, "Richard Purdie" <[email protected]> wrote: Hi Dorinda, On Mon, 2021-02-01 at 09:46 -0500, Dorinda wrote: > Tinfoil doesn't behave well if environment is not initialized, this check ensures a proper error log if environment is not initialized. > > [YOCTO #12096] > > Signed-off-by: Dorinda Bassey <[email protected]> > --- > v2: > -Positioned check under a condition when it cannot determine the pkgdata_dir > > scripts/oe-pkgdata-util | 3 +++ > 1 file changed, 3 insertions(+) > > 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(): > logger.error("Unable to find bitbake by searching parent directory of this script or PATH") > sys.exit(1) > logger.debug('Found bitbake path: %s' % bitbakepath) > + if not os.environ.get('BUILDDIR', ''): > + logger.error("This script can only be run after initialising the build environment (e.g. by using oe-init-build-env)") > + sys.exit(1) > tinfoil = tinfoil_init() > try: > args.pkgdata_dir = tinfoil.config_data.getVar('PKGDATA_DIR') I'm a little worried about this patch since it fixes the oe-pkgdata- util case but what about devtool, or recipetool or anything else which uses tinfoil. I'm wondering if there should be a check inside tinfoil itself? or is this problem really oe-pkgdata-util specific? Cheers, Richard
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#147847): https://lists.openembedded.org/g/openembedded-core/message/147847 Mute This Topic: https://lists.openembedded.org/mt/80286903/21656 Group Owner: [email protected] Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [[email protected]] -=-=-=-=-=-=-=-=-=-=-=-
