summaryrefslogtreecommitdiffstats
path: root/scripts/lib/devtool/standard.py
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-04-27 15:05:52 +0100
commitca1f4d7279417cbfb1966c27311a5e39d571d742 (patch)
tree0b1f00e9dab98422135a5656863c0c5cd31cf0c5 /scripts/lib/devtool/standard.py
parenta8c7558c76bb5f512d3aca4e3bbb1158635601c8 (diff)
downloadpoky-ca1f4d7279417cbfb1966c27311a5e39d571d742.tar.gz
devtool: include bbappends in recipe parsing
In order to get correct metadata, SRCREV for example. Fixes [YOCTO #7648]. (From OE-Core rev: 8b1794559dd7fd956716179d628e61cffdce1686) Signed-off-by: Markus Lehtonen <markus.lehtonen@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.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':