summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Eggleton <paul.eggleton@linux.intel.com>2017-05-15 09:59:52 +1200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-05-23 17:45:36 +0100
commit4f152bdce98854531006587aa0638e3cc68c2dad (patch)
treea503002668d9a7c67ac402fdc71d2d799bf2f4cd
parentd40f0c916fb68056ab0d5d07cfc5df366d9045e0 (diff)
downloadpoky-4f152bdce98854531006587aa0638e3cc68c2dad.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 (From OE-Core rev: eee56a19cda051da6267f808cd3a04a4c644acb3) 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>
-rw-r--r--scripts/lib/recipetool/create_buildsys.py4
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):
863 break 863 break
864 if len(foundvalues) == len(valuemap): 864 if len(foundvalues) == len(valuemap):
865 break 865 break
866 # Drop values containing unexpanded RPM macros
867 for k in list(foundvalues.keys()):
868 if '%' in foundvalues[k]:
869 del foundvalues[k]
866 if 'PV' in foundvalues: 870 if 'PV' in foundvalues:
867 if not validate_pv(foundvalues['PV']): 871 if not validate_pv(foundvalues['PV']):
868 del foundvalues['PV'] 872 del foundvalues['PV']