diff options
author | Paul Eggleton <paul.eggleton@linux.intel.com> | 2015-09-22 17:21:24 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2015-09-23 09:53:14 +0100 |
commit | ae788fbd46f8a83d4c1776eeb4457ed5bb61915f (patch) | |
tree | 409a44ee48ca6b70d7bc26ea9ae3354063f82899 /scripts/lib/devtool/build.py | |
parent | 99cd79d8be25c9dca232c3c197b09ea3961ad729 (diff) | |
download | poky-ae788fbd46f8a83d4c1776eeb4457ed5bb61915f.tar.gz |
devtool: check that source tree still exists
Sometimes, particularly if you extracted the source to /tmp which is on
tmpfs, the external source tree that is being pointed to may no longer
exist when you come to run "devtool build" or "devtool update-recipe"
etc. Make all of the commands that need to check for a recipe being in
the workspace call a single function and have that function additionally
check the source tree still exists where appropriate.
(From OE-Core rev: 0c3f289576a2ab35b1d1d8854d6763553cc3bf09)
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts/lib/devtool/build.py')
-rw-r--r-- | scripts/lib/devtool/build.py | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/scripts/lib/devtool/build.py b/scripts/lib/devtool/build.py index 335aff5491..9b58858a62 100644 --- a/scripts/lib/devtool/build.py +++ b/scripts/lib/devtool/build.py | |||
@@ -21,7 +21,7 @@ import bb | |||
21 | import logging | 21 | import logging |
22 | import argparse | 22 | import argparse |
23 | import tempfile | 23 | import tempfile |
24 | from devtool import exec_build_env_command, DevtoolError | 24 | from devtool import exec_build_env_command, check_workspace_recipe, DevtoolError |
25 | 25 | ||
26 | logger = logging.getLogger('devtool') | 26 | logger = logging.getLogger('devtool') |
27 | 27 | ||
@@ -42,9 +42,7 @@ def _create_conf_file(values, conf_file=None): | |||
42 | 42 | ||
43 | def build(args, config, basepath, workspace): | 43 | def build(args, config, basepath, workspace): |
44 | """Entry point for the devtool 'build' subcommand""" | 44 | """Entry point for the devtool 'build' subcommand""" |
45 | if not args.recipename in workspace: | 45 | check_workspace_recipe(workspace, args.recipename) |
46 | raise DevtoolError("no recipe named %s in your workspace" % | ||
47 | args.recipename) | ||
48 | 46 | ||
49 | build_task = config.get('Build', 'build_task', 'populate_sysroot') | 47 | build_task = config.get('Build', 'build_task', 'populate_sysroot') |
50 | 48 | ||