From 3e4f2fa598a5061215315f53dc2086718cce295d Mon Sep 17 00:00:00 2001 From: Paul Eggleton Date: Fri, 21 Apr 2017 14:48:46 +1200 Subject: 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 --- scripts/lib/recipetool/create_buildsys.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'scripts/lib/recipetool') 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'] -- cgit 1.2.3-korg n value='dora-next'>dora-next Collection of OpenEmbedded layersGrokmirror user
aboutsummaryrefslogtreecommitdiffstats
blob: ae9077147d6ef7cca359657049424b628f4a10b6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50