[bitbake-devel,1/2] parse: make vars_from_file return None for non-recipes

Submitted by Paul Eggleton on Feb. 17, 2014, 2:07 p.m. | Patch ID: 66835


Message ID 9e29923158076b802b7659fe3018b14d1c0341a6.1392645935.git.paul.eggleton@linux.intel.com
State Accepted, archived
Headers show

Commit Message

Paul Eggleton Feb. 17, 2014, 2:07 p.m.
It doesn't really make sense to set PN from .conf files, for example.
More concretely, this avoids the config hash changing unnecessarily
within Hob due to PN effectively changing (since bblayers.conf is
parsed first and then .hob.conf).

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
 lib/bb/parse/__init__.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Patch hide | download patch | download mbox

diff --git a/lib/bb/parse/__init__.py b/lib/bb/parse/__init__.py
index 97983c9..e4a44dd 100644
--- a/lib/bb/parse/__init__.py
+++ b/lib/bb/parse/__init__.py
@@ -127,7 +127,7 @@  def resolve_file(fn, d):
 # Used by OpenEmbedded metadata
 def vars_from_file(mypkg, d):
-    if not mypkg:
+    if not mypkg or not mypkg.endswith((".bb", ".bbappend")):
         return (None, None, None)
     if mypkg in __pkgsplit_cache__:
         return __pkgsplit_cache__[mypkg]