All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] bitbake: parse: allow vars_from_file to consider inc files as recipes
@ 2014-03-31 20:44 joe
  2014-04-01  8:58 ` Richard Purdie
  0 siblings, 1 reply; 5+ messages in thread
From: joe @ 2014-03-31 20:44 UTC (permalink / raw)
  To: bitbake-devel

From: Joe MacDonald <joe@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@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



^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2014-04-01 14:07 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-03-31 20:44 [PATCH] bitbake: parse: allow vars_from_file to consider inc files as recipes joe
2014-04-01  8:58 ` Richard Purdie
2014-04-01 13:50   ` Joe MacDonald
2014-04-01 13:56     ` Richard Purdie
2014-04-01 14:07       ` Joe MacDonald

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.