summaryrefslogtreecommitdiffstats
path: root/scripts/lib
diff options
context:
space:
mode:
authorPaul Eggleton <paul.eggleton@linux.intel.com>2015-03-08 12:51:36 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-03-20 11:27:45 +0000
commit3f370f8f6f626ab6c56de674532ccbb495f800e9 (patch)
tree986a62f6e340ac30873160d195473daddde9512c /scripts/lib
parentad57dab31f5d91327cadac196e8d620bc9df551e (diff)
downloadpoky-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/lib')
-rw-r--r--scripts/lib/devtool/deploy.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/scripts/lib/devtool/deploy.py b/scripts/lib/devtool/deploy.py
index d232d3179f..68edb98113 100644
--- a/scripts/lib/devtool/deploy.py
+++ b/scripts/lib/devtool/deploy.py
@@ -43,13 +43,17 @@ def deploy(args, config, basepath, workspace):
43 deploy_dir = os.path.join(basepath, 'target_deploy', args.target) 43 deploy_dir = os.path.join(basepath, 'target_deploy', args.target)
44 deploy_file = os.path.join(deploy_dir, args.recipename + '.list') 44 deploy_file = os.path.join(deploy_dir, args.recipename + '.list')
45 45
46 stdout, stderr = exec_build_env_command(config.init_path, basepath, 'bitbake -e %s' % args.recipename, shell=True)
47 recipe_outdir = re.search(r'^D="(.*)"', stdout, re.MULTILINE).group(1)
48 if not os.path.exists(recipe_outdir) or not os.listdir(recipe_outdir):
49 logger.error('No files to deploy - have you built the %s recipe? If so, the install step has not installed any files.' % args.recipename)
50 return -1
51
46 if os.path.exists(deploy_file): 52 if os.path.exists(deploy_file):
47 if undeploy(args, config, basepath, workspace): 53 if undeploy(args, config, basepath, workspace):
48 # Error already shown 54 # Error already shown
49 return -1 55 return -1
50 56
51 stdout, stderr = exec_build_env_command(config.init_path, basepath, 'bitbake -e %s' % args.recipename, shell=True)
52 recipe_outdir = re.search(r'^D="(.*)"', stdout, re.MULTILINE).group(1)
53 extraoptions = '' 57 extraoptions = ''
54 if args.no_host_check: 58 if args.no_host_check:
55 extraoptions += '-o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no' 59 extraoptions += '-o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no'