diff options
author | Paul Eggleton <paul.eggleton@linux.intel.com> | 2017-05-15 09:59:52 +1200 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2017-05-23 17:44:00 +0100 |
commit | eee56a19cda051da6267f808cd3a04a4c644acb3 (patch) | |
tree | b79ea2f52b558fc5755499ea3f6fee3c6b2bb014 /scripts/lib/recipetool | |
parent | 389b5f96af68439cc8e135a33f1e41116cb1d1aa (diff) | |
download | openembedded-core-contrib-eee56a19cda051da6267f808cd3a04a4c644acb3.tar.gz |
recipetool: create: skip values extracted from spec files containing macros
If a value we extract from a spec file contains an unexpanded macro
(e.g. %{macroname}) then we should discard it since we're not seeing the
actual value and we don't have an easy way of expanding it at the
moment.
This fixes for example getting %{name} as the recipe name when running
the following:
recipetool create https://github.com/gavincarr/mod_auth_tkt.git
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Diffstat (limited to 'scripts/lib/recipetool')
-rw-r--r-- | scripts/lib/recipetool/create_buildsys.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/scripts/lib/recipetool/create_buildsys.py b/scripts/lib/recipetool/create_buildsys.py index e914e53aaba..4743c740cf9 100644 --- a/scripts/lib/recipetool/create_buildsys.py +++ b/scripts/lib/recipetool/create_buildsys.py @@ -863,6 +863,10 @@ class SpecFileRecipeHandler(RecipeHandler): break if len(foundvalues) == len(valuemap): break + # Drop values containing unexpanded RPM macros + for k in list(foundvalues.keys()): + if '%' in foundvalues[k]: + del foundvalues[k] if 'PV' in foundvalues: if not validate_pv(foundvalues['PV']): del foundvalues['PV'] |