diff options
author | Paul Eggleton <paul.eggleton@linux.intel.com> | 2015-03-08 12:51:36 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2015-03-20 11:27:45 +0000 |
commit | 3f370f8f6f626ab6c56de674532ccbb495f800e9 (patch) | |
tree | 986a62f6e340ac30873160d195473daddde9512c /scripts | |
parent | ad57dab31f5d91327cadac196e8d620bc9df551e (diff) | |
download | ast2050-yocto-poky-3f370f8f6f626ab6c56de674532ccbb495f800e9.zip ast2050-yocto-poky-3f370f8f6f626ab6c56de674532ccbb495f800e9.tar.gz |
devtool: deploy-target: detect and error if D is empty
If you haven't built the recipe yet or if the output directory (${D}) is
empty, then we should tell the user rather than have scp error out.
(From OE-Core rev: 3fd9ac277393bef5c646f16b9d8f30c277881d70)
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/lib/devtool/deploy.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/scripts/lib/devtool/deploy.py b/scripts/lib/devtool/deploy.py index d232d31..68edb98 100644 --- a/scripts/lib/devtool/deploy.py +++ b/scripts/lib/devtool/deploy.py @@ -43,13 +43,17 @@ def deploy(args, config, basepath, workspace): deploy_dir = os.path.join(basepath, 'target_deploy', args.target) deploy_file = os.path.join(deploy_dir, args.recipename + '.list') + stdout, stderr = exec_build_env_command(config.init_path, basepath, 'bitbake -e %s' % args.recipename, shell=True) + recipe_outdir = re.search(r'^D="(.*)"', stdout, re.MULTILINE).group(1) + if not os.path.exists(recipe_outdir) or not os.listdir(recipe_outdir): + logger.error('No files to deploy - have you built the %s recipe? If so, the install step has not installed any files.' % args.recipename) + return -1 + if os.path.exists(deploy_file): if undeploy(args, config, basepath, workspace): # Error already shown return -1 - stdout, stderr = exec_build_env_command(config.init_path, basepath, 'bitbake -e %s' % args.recipename, shell=True) - recipe_outdir = re.search(r'^D="(.*)"', stdout, re.MULTILINE).group(1) extraoptions = '' if args.no_host_check: extraoptions += '-o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no' |