[bitbake-devel] [PATCH] bitbake: parse: allow vars_from_file to consider inc files as recipes
joe at deserted.net
joe at deserted.net
Mon Mar 31 20:44:27 UTC 2014
From: Joe MacDonald <joe at deserted.net>
A side-effect of making vars_from_file return None for non-recipes is that
PV gets 'None' if you have an included file named <recipe>.inc. If there
is a recipe with a version number in the name for a .inc file, it's
probably reasonable to calculate PV based on that file, rather than giving
it 'None' (which becomes 1.0 in most cases).
Signed-off-by: Joe MacDonald <joe at deserted.net>
---
bitbake/lib/bb/parse/__init__.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
I ran into this when building meta-selinux where there's a chain of includes:
refpolicy-mls_2.20130424.bb
-> refpolicy_2.20130424.inc
-> refpolicy_common.inc
refpolicy_2.20130424.inc sets FILESEXTRAPATH to pick up patches out of the
refpolicy-2.20130424 directory, but during the build PV would be 2.20130424 only
until the .inc file was included, then it became 1.0 and the patches were never
found.
diff --git a/bitbake/lib/bb/parse/__init__.py b/bitbake/lib/bb/parse/__init__.py
index e4a44dd..5157d80 100644
--- a/bitbake/lib/bb/parse/__init__.py
+++ b/bitbake/lib/bb/parse/__init__.py
@@ -127,7 +127,7 @@ def resolve_file(fn, d):
# Used by OpenEmbedded metadata
__pkgsplit_cache__={}
def vars_from_file(mypkg, d):
- if not mypkg or not mypkg.endswith((".bb", ".bbappend")):
+ if not mypkg or not mypkg.endswith((".bb", ".bbappend", ".inc")):
return (None, None, None)
if mypkg in __pkgsplit_cache__:
return __pkgsplit_cache__[mypkg]
--
1.7.10.4
More information about the bitbake-devel
mailing list