mirror of
https://git.yoctoproject.org/poky
synced 2026-05-30 12:29:55 +00:00
lib/oe/recipeutils: avoid parsing in get_var_files()
Let's have the caller do this and then the function is a bit more flexible (e.g. we can choose to parse with bbappends or not); fix up calls to this function appropriately (of which there are only two, both within devtool). (From OE-Core rev: 6ba969f1ac5a1a0e277a21287fc5ae1622a6b14e) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
committed by
Richard Purdie
parent
677e8c8e97
commit
0f23a3af8e
@@ -79,10 +79,9 @@ def get_var_files(fn, varlist, d):
|
|||||||
"""Find the file in which each of a list of variables is set.
|
"""Find the file in which each of a list of variables is set.
|
||||||
Note: requires variable history to be enabled when parsing.
|
Note: requires variable history to be enabled when parsing.
|
||||||
"""
|
"""
|
||||||
envdata = parse_recipe(fn, [], d)
|
|
||||||
varfiles = {}
|
varfiles = {}
|
||||||
for v in varlist:
|
for v in varlist:
|
||||||
history = envdata.varhistory.variable(v)
|
history = d.varhistory.variable(v)
|
||||||
files = []
|
files = []
|
||||||
for event in history:
|
for event in history:
|
||||||
if 'file' in event and not 'flag' in event:
|
if 'file' in event and not 'flag' in event:
|
||||||
|
|||||||
@@ -630,7 +630,7 @@ def _update_recipe_srcrev(args, srctree, rd, config_data):
|
|||||||
rd, args.append, None, wildcardver=args.wildcard_version,
|
rd, args.append, None, wildcardver=args.wildcard_version,
|
||||||
extralines=patchfields)
|
extralines=patchfields)
|
||||||
else:
|
else:
|
||||||
oe.recipeutils.patch_recipe(config_data, recipefile, patchfields)
|
oe.recipeutils.patch_recipe(rd, recipefile, patchfields)
|
||||||
|
|
||||||
if not 'git://' in orig_src_uri:
|
if not 'git://' in orig_src_uri:
|
||||||
logger.info('You will need to update SRC_URI within the recipe to '
|
logger.info('You will need to update SRC_URI within the recipe to '
|
||||||
@@ -742,7 +742,7 @@ def _update_recipe_patch(args, config, srctree, rd, config_data):
|
|||||||
updaterecipe = True
|
updaterecipe = True
|
||||||
if updaterecipe:
|
if updaterecipe:
|
||||||
logger.info('Updating recipe %s' % os.path.basename(recipefile))
|
logger.info('Updating recipe %s' % os.path.basename(recipefile))
|
||||||
oe.recipeutils.patch_recipe(config_data, recipefile,
|
oe.recipeutils.patch_recipe(rd, recipefile,
|
||||||
{'SRC_URI': ' '.join(srcuri)})
|
{'SRC_URI': ' '.join(srcuri)})
|
||||||
elif not updatepatches:
|
elif not updatepatches:
|
||||||
# Neither patches nor recipe were updated
|
# Neither patches nor recipe were updated
|
||||||
|
|||||||
Reference in New Issue
Block a user