diff options
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/lib/devtool/package.py | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/scripts/lib/devtool/package.py b/scripts/lib/devtool/package.py index b8d84235c8..53d3dc7a38 100644 --- a/scripts/lib/devtool/package.py +++ b/scripts/lib/devtool/package.py | |||
@@ -32,14 +32,17 @@ def package(args, config, basepath, workspace): | |||
32 | """Entry point for the devtool 'package' subcommand""" | 32 | """Entry point for the devtool 'package' subcommand""" |
33 | check_workspace_recipe(workspace, args.recipename) | 33 | check_workspace_recipe(workspace, args.recipename) |
34 | 34 | ||
35 | image_pkgtype = config.get('Package', 'image_pkgtype', '') | 35 | tinfoil = setup_tinfoil(basepath=basepath) |
36 | if not image_pkgtype: | 36 | try: |
37 | tinfoil = setup_tinfoil(basepath=basepath) | 37 | tinfoil.prepare(config_only=True) |
38 | try: | 38 | |
39 | tinfoil.prepare(config_only=True) | 39 | image_pkgtype = config.get('Package', 'image_pkgtype', '') |
40 | if not image_pkgtype: | ||
40 | image_pkgtype = tinfoil.config_data.getVar('IMAGE_PKGTYPE', True) | 41 | image_pkgtype = tinfoil.config_data.getVar('IMAGE_PKGTYPE', True) |
41 | finally: | 42 | |
42 | tinfoil.shutdown() | 43 | deploy_dir_pkg = tinfoil.config_data.getVar('DEPLOY_DIR_%s' % image_pkgtype.upper(), True) |
44 | finally: | ||
45 | tinfoil.shutdown() | ||
43 | 46 | ||
44 | package_task = config.get('Package', 'package_task', 'package_write_%s' % image_pkgtype) | 47 | package_task = config.get('Package', 'package_task', 'package_write_%s' % image_pkgtype) |
45 | try: | 48 | try: |
@@ -47,7 +50,8 @@ def package(args, config, basepath, workspace): | |||
47 | except bb.process.ExecutionError as e: | 50 | except bb.process.ExecutionError as e: |
48 | # We've already seen the output since watch=True, so just ensure we return something to the user | 51 | # We've already seen the output since watch=True, so just ensure we return something to the user |
49 | return e.exitcode | 52 | return e.exitcode |
50 | logger.info('Your packages are in %s/tmp/deploy/%s' % (basepath, image_pkgtype)) | 53 | |
54 | logger.info('Your packages are in %s' % deploy_dir_pkg) | ||
51 | 55 | ||
52 | return 0 | 56 | return 0 |
53 | 57 | ||