summaryrefslogtreecommitdiffstats
path: root/scripts/lib/devtool
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/lib/devtool
parent66dd73d1d163b0530f4f13b391ae9245cfcd1ed1 (diff)
downloadast2050-yocto-poky-d768a803919f6c1cbd9f285290096d781002a712.zip
ast2050-yocto-poky-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/lib/devtool')
-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 aa30a98..faf5c92 100644
--- a/scripts/lib/devtool/standard.py
+++ b/scripts/lib/devtool/standard.py
@@ -130,18 +130,29 @@ def _get_recipe_file(cooker, pn):
logger.error("Unable to find any recipe file matching %s" % pn)
return recipefile
+def _parse_recipe(config, tinfoil, pn, appends):
+ """Parse recipe of a package"""
+ import oe.recipeutils
+ recipefile = _get_recipe_file(tinfoil.cooker, pn)
+ if not recipefile:
+ # Error already logged
+ return None
+ if appends:
+ append_files = tinfoil.cooker.collection.get_file_appends(recipefile)
+ # Filter out appends from the workspace
+ append_files = [path for path in append_files if
+ not path.startswith(config.workspace_path)]
+ return oe.recipeutils.parse_recipe(recipefile, append_files,
+ tinfoil.config_data)
def extract(args, config, basepath, workspace):
import bb
- import oe.recipeutils
tinfoil = setup_tinfoil()
- recipefile = _get_recipe_file(tinfoil.cooker, args.recipename)
- if not recipefile:
- # Error already logged
+ rd = _parse_recipe(config, tinfoil, args.recipename, True)
+ if not rd:
return -1
- rd = oe.recipeutils.parse_recipe(recipefile, tinfoil.config_data)
srctree = os.path.abspath(args.srctree)
initial_rev = _extract_source(srctree, args.keep_temp, args.branch, rd)
@@ -327,11 +338,10 @@ def modify(args, config, basepath, workspace):
tinfoil = setup_tinfoil()
- recipefile = _get_recipe_file(tinfoil.cooker, args.recipename)
- if not recipefile:
- # Error already logged
+ rd = _parse_recipe(config, tinfoil, args.recipename, True)
+ if not rd:
return -1
- rd = oe.recipeutils.parse_recipe(recipefile, tinfoil.config_data)
+ recipefile = rd.getVar('FILE', True)
if not _check_compatible_recipe(args.recipename, rd):
return -1
@@ -428,11 +438,10 @@ def update_recipe(args, config, basepath, workspace):
from oe.patch import GitApplyTree
import oe.recipeutils
- recipefile = _get_recipe_file(tinfoil.cooker, args.recipename)
- if not recipefile:
- # Error already logged
+ rd = _parse_recipe(config, tinfoil, args.recipename, True)
+ if not rd:
return -1
- rd = oe.recipeutils.parse_recipe(recipefile, tinfoil.config_data)
+ recipefile = rd.getVar('FILE', True)
orig_src_uri = rd.getVar('SRC_URI', False) or ''
if args.mode == 'auto':
OpenPOWER on IntegriCloud