From ae788fbd46f8a83d4c1776eeb4457ed5bb61915f Mon Sep 17 00:00:00 2001 From: Paul Eggleton Date: Tue, 22 Sep 2015 17:21:24 +0100 Subject: 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 Signed-off-by: Richard Purdie --- scripts/lib/devtool/build.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'scripts/lib/devtool/build.py') 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 import logging import argparse import tempfile -from devtool import exec_build_env_command, DevtoolError +from devtool import exec_build_env_command, check_workspace_recipe, DevtoolError logger = logging.getLogger('devtool') @@ -42,9 +42,7 @@ def _create_conf_file(values, conf_file=None): def build(args, config, basepath, workspace): """Entry point for the devtool 'build' subcommand""" - if not args.recipename in workspace: - raise DevtoolError("no recipe named %s in your workspace" % - args.recipename) + check_workspace_recipe(workspace, args.recipename) build_task = config.get('Build', 'build_task', 'populate_sysroot') -- cgit v1.2.3-54-g00ecf