summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/devtool12
-rw-r--r--scripts/lib/devtool/standard.py19
2 files changed, 15 insertions, 16 deletions
diff --git a/scripts/devtool b/scripts/devtool
index bda05e1c2f..2d57da0bc1 100755
--- a/scripts/devtool
+++ b/scripts/devtool
@@ -112,8 +112,18 @@ def read_workspace():
112 res = externalsrc_re.match(line.rstrip()) 112 res = externalsrc_re.match(line.rstrip())
113 if res: 113 if res:
114 pn = res.group(2) or os.path.splitext(os.path.basename(fn))[0].split('_')[0] 114 pn = res.group(2) or os.path.splitext(os.path.basename(fn))[0].split('_')[0]
115 # Find the recipe file within the workspace, if any
116 bbfile = os.path.basename(fn).replace('.bbappend', '.bb').replace('%', '*')
117 recipefile = glob.glob(os.path.join(config.workspace_path,
118 'recipes',
119 pn,
120 bbfile))
121 if recipefile:
122 recipefile = recipefile[0]
115 workspace[pn] = {'srctree': res.group(3), 123 workspace[pn] = {'srctree': res.group(3),
116 'bbappend': fn} 124 'bbappend': fn,
125 'recipefile': recipefile}
126 logger.debug('Found recipe %s' % workspace[pn])
117 127
118def create_workspace(args, config, basepath, workspace): 128def create_workspace(args, config, basepath, workspace):
119 if args.layerpath: 129 if args.layerpath:
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):
1171 """Entry point for the devtool 'status' subcommand""" 1171 """Entry point for the devtool 'status' subcommand"""
1172 if workspace: 1172 if workspace:
1173 for recipe, value in workspace.iteritems(): 1173 for recipe, value in workspace.iteritems():
1174 bbfile = os.path.basename(value['bbappend']).replace('.bbappend', '.bb').replace('%', '*') 1174 recipefile = value['recipefile']
1175 recipefile = glob.glob(os.path.join(config.workspace_path,
1176 'recipes',
1177 recipe,
1178 bbfile))
1179 if recipefile: 1175 if recipefile:
1180 recipestr = ' (%s)' % recipefile[0] 1176 recipestr = ' (%s)' % recipefile
1181 else: 1177 else:
1182 recipestr = '' 1178 recipestr = ''
1183 print("%s: %s%s" % (recipe, value['srctree'], recipestr)) 1179 print("%s: %s%s" % (recipe, value['srctree'], recipestr))
@@ -1261,15 +1257,8 @@ def edit_recipe(args, config, basepath, workspace):
1261 tinfoil.shutdown() 1257 tinfoil.shutdown()
1262 else: 1258 else:
1263 check_workspace_recipe(workspace, args.recipename) 1259 check_workspace_recipe(workspace, args.recipename)
1264 bbappend = workspace[args.recipename]['bbappend'] 1260 recipefile = workspace[args.recipename]['recipefile']
1265 bbfile = os.path.basename(bbappend).replace('.bbappend', '.bb').replace('%', '*') 1261 if not recipefile:
1266 recipefile = glob.glob(os.path.join(config.workspace_path,
1267 'recipes',
1268 args.recipename,
1269 bbfile))
1270 if recipefile:
1271 recipefile = recipefile[0]
1272 else:
1273 raise DevtoolError("Recipe file for %s is not under the workspace" % 1262 raise DevtoolError("Recipe file for %s is not under the workspace" %
1274 args.recipename) 1263 args.recipename)
1275 1264