diff options
author | Paul Eggleton <paul.eggleton@linux.intel.com> | 2017-04-21 14:48:46 +1200 |
---|---|---|
committer | Paul Eggleton <paul.eggleton@linux.intel.com> | 2017-05-15 09:58:31 +1200 |
commit | 3e4f2fa598a5061215315f53dc2086718cce295d (patch) | |
tree | 4903cc3585244d521e966cc60a0b4c3ac8200a88 | |
parent | c59fa3bd71b42410bf032846ee8fdb6e6eb1b95c (diff) | |
download | openembedded-core-contrib-3e4f2fa598a5061215315f53dc2086718cce295d.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>
-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 e914e53aab..4743c740cf 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'] |