summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorMarkus Lehtonen <markus.lehtonen@linux.intel.com>2015-04-27 10:53:16 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-06-28 09:44:14 +0100
commitd768a803919f6c1cbd9f285290096d781002a712 (patch)
tree53dbc5fda65a0fb3ed84b66c1b5ea8c196d0bc4b /scripts
parent66dd73d1d163b0530f4f13b391ae9245cfcd1ed1 (diff)
downloadpoky-d768a803919f6c1cbd9f285290096d781002a712.tar.gz
devtool: include bbappends in recipe parsing
In order to get correct metadata, SRCREV for example. Fixes [YOCTO #7648]. (From OE-Core master rev: 8b1794559dd7fd956716179d628e61cffdce1686) (From OE-Core rev: becbd5d50a091fe4a980361d9c99efa01f43edcc) Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts')
-rw-r--r--scripts/lib/devtool/standard.py35
1 files changed, 22 insertions, 13 deletions
diff --git a/scripts/lib/devtool/standard.py b/scripts/lib/devtool/standard.py
index aa30a98090..faf5c92176 100644
--- a/scripts/lib/devtool/standard.py
+++ b/scripts/lib/devtool/standard.py
@@ -130,18 +130,29 @@ def _get_recipe_file(cooker, pn):
130 logger.error("Unable to find any recipe file matching %s" % pn) 130 logger.error("Unable to find any recipe file matching %s" % pn)
131 return recipefile 131 return recipefile
132 132
133def _parse_recipe(config, tinfoil, pn, appends):
134 """Parse recipe of a package"""
135 import oe.recipeutils
136 recipefile = _get_recipe_file(tinfoil.cooker, pn)
137 if not recipefile:
138 # Error already logged
139 return None
140 if appends:
141 append_files = tinfoil.cooker.collection.get_file_appends(recipefile)
142 # Filter out appends from the workspace
143 append_files = [path for path in append_files if
144 not path.startswith(config.workspace_path)]
145 return oe.recipeutils.parse_recipe(recipefile, append_files,
146 tinfoil.config_data)
133 147
134def extract(args, config, basepath, workspace): 148def extract(args, config, basepath, workspace):
135 import bb 149 import bb
136 import oe.recipeutils
137 150
138 tinfoil = setup_tinfoil() 151 tinfoil = setup_tinfoil()
139 152
140 recipefile = _get_recipe_file(tinfoil.cooker, args.recipename) 153 rd = _parse_recipe(config, tinfoil, args.recipename, True)
141 if not recipefile: 154 if not rd:
142 # Error already logged
143 return -1 155 return -1
144 rd = oe.recipeutils.parse_recipe(recipefile, tinfoil.config_data)
145 156
146 srctree = os.path.abspath(args.srctree) 157 srctree = os.path.abspath(args.srctree)
147 initial_rev = _extract_source(srctree, args.keep_temp, args.branch, rd) 158 initial_rev = _extract_source(srctree, args.keep_temp, args.branch, rd)
@@ -327,11 +338,10 @@ def modify(args, config, basepath, workspace):
327 338
328 tinfoil = setup_tinfoil() 339 tinfoil = setup_tinfoil()
329 340
330 recipefile = _get_recipe_file(tinfoil.cooker, args.recipename) 341 rd = _parse_recipe(config, tinfoil, args.recipename, True)
331 if not recipefile: 342 if not rd:
332 # Error already logged
333 return -1 343 return -1
334 rd = oe.recipeutils.parse_recipe(recipefile, tinfoil.config_data) 344 recipefile = rd.getVar('FILE', True)
335 345
336 if not _check_compatible_recipe(args.recipename, rd): 346 if not _check_compatible_recipe(args.recipename, rd):
337 return -1 347 return -1
@@ -428,11 +438,10 @@ def update_recipe(args, config, basepath, workspace):
428 from oe.patch import GitApplyTree 438 from oe.patch import GitApplyTree
429 import oe.recipeutils 439 import oe.recipeutils
430 440
431 recipefile = _get_recipe_file(tinfoil.cooker, args.recipename) 441 rd = _parse_recipe(config, tinfoil, args.recipename, True)
432 if not recipefile: 442 if not rd:
433 # Error already logged
434 return -1 443 return -1
435 rd = oe.recipeutils.parse_recipe(recipefile, tinfoil.config_data) 444 recipefile = rd.getVar('FILE', True)
436 445
437 orig_src_uri = rd.getVar('SRC_URI', False) or '' 446 orig_src_uri = rd.getVar('SRC_URI', False) or ''
438 if args.mode == 'auto': 447 if args.mode == 'auto':