aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/lib/devtool/standard.py
diff options
context:
space:
mode:
authorPaul Eggleton <paul.eggleton@linux.intel.com>2016-01-07 00:15:53 +1300
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-01-11 15:41:07 +0000
commit81cf5580993c99050e3f4d6d891bc67534721487 (patch)
tree9054da92945badd7ba3ccf19b8f966ba6505fc6d /scripts/lib/devtool/standard.py
parentf3bea83db173cce921a9a30f04e88b7e3ed98854 (diff)
downloadopenembedded-core-contrib-81cf5580993c99050e3f4d6d891bc67534721487.tar.gz
devtool: refactor code for getting local recipe file
We're doing this in a couple of places, let's just find the recipe file if it exists within the workspace (which it will if it's been added through "devtool add") when we read in the workspace. 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/standard.py')
-rw-r--r--scripts/lib/devtool/standard.py19
1 files changed, 4 insertions, 15 deletions
diff --git a/scripts/lib/devtool/standard.py b/scripts/lib/devtool/standard.py
index 7ef0ab8c64..e26ce5a6fb 100644
--- a/scripts/lib/devtool/standard.py
+++ b/scripts/lib/devtool/standard.py
@@ -1171,13 +1171,9 @@ def status(args, config, basepath, workspace):
"""Entry point for the devtool 'status' subcommand"""
if workspace:
for recipe, value in workspace.iteritems():
- bbfile = os.path.basename(value['bbappend']).replace('.bbappend', '.bb').replace('%', '*')
- recipefile = glob.glob(os.path.join(config.workspace_path,
- 'recipes',
- recipe,
- bbfile))
+ recipefile = value['recipefile']
if recipefile:
- recipestr = ' (%s)' % recipefile[0]
+ recipestr = ' (%s)' % recipefile
else:
recipestr = ''
print("%s: %s%s" % (recipe, value['srctree'], recipestr))
@@ -1261,15 +1257,8 @@ def edit_recipe(args, config, basepath, workspace):
tinfoil.shutdown()
else:
check_workspace_recipe(workspace, args.recipename)
- bbappend = workspace[args.recipename]['bbappend']
- bbfile = os.path.basename(bbappend).replace('.bbappend', '.bb').replace('%', '*')
- recipefile = glob.glob(os.path.join(config.workspace_path,
- 'recipes',
- args.recipename,
- bbfile))
- if recipefile:
- recipefile = recipefile[0]
- else:
+ recipefile = workspace[args.recipename]['recipefile']
+ if not recipefile:
raise DevtoolError("Recipe file for %s is not under the workspace" %
args.recipename)