oe-pkgdata-util: Check if environment script is initialized
PATCH 1/1 oe-pkgdata-util: Check if environment script is initialized
Tinfoil doesn't behave well if environment is not initialised, this check ensures a proper error log if environment is not initialzed.
[YOCTO #12096]
Signed-off-by Dorinda Bassey <[email protected]>
--- scripts/oe-pkgdata-util | 5 +++++ 1 file changed, 5 insertions(+)
scripts/oe-pkgdata-util +5 -0
@@ -513,6 +513,11 @@ def find_path(args): def main(): + + 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) + parser = argparse_oe.ArgumentParser(description="OpenEmbedded pkgdata tool - queries the pkgdata files written out during do_package", epilog="Use %(prog)s <subcommand> --help to get help on a specific command") parser.add_argument('-d', '--debug', help='Enable debug output', action='store_true')
Signature · 1 line
2.17.1
There's a '-p' option. It should error out only when it cannot determine the pkdata dir.
Regards,
Chen Qi
Quoted 27 lines · Dorinda
[YOCTO #12096]
Signed-off-by Dorinda Bassey <[email protected]>--- scripts/oe-pkgdata-util | 5 +++++ 1 file changed, 5 insertions(+)scripts/oe-pkgdata-util +5
-0@@ -513,6 +513,11 @@ def find_path(args): def main(): + + 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) + parser = argparse_oe.ArgumentParser(description="OpenEmbedded pkgdata tool - queries the pkgdata files written out during do_package", epilog="Use %(prog)s <subcommand> --help to get help on a specific command") parser.add_argument('-d', '--debug', help='Enable debug output', action='store_true')