Skip to contentSkip to conversation

Added new variable BBINCLUDED

PATCH New Lianhao Lu 1 participant 2 messages Feb 28, 2012

lore
Share & tools
lore

Lianhao Lu

author
#0 lore raw

v2 cover Added new variable BBINCLUDED

Added a new variable BBINCLUDES to show the file dependency information. This kind of information could be used by others, i.e. recipe editor to decide when to reparse the recipes to reflect the user changes.

The following changes since commit 927bec5f72230be4f2452d9ef5a747b2c00cb781:
Dongxiao Xu (1):
bitbake.conf: Create a new filter variable BB_HASHCONFIG_WHITELIST

are available in the git repository at:

git://git.pokylinux.org/poky-contrib llu/bbincluded
http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=llu/bbincluded

Lianhao Lu (1):
bitbake: Added BBINCLUDED variable.

 bitbake/lib/bb/cooker.py         |    1 +
 bitbake/lib/bb/parse/__init__.py |    9 +++++++++
 bitbake/lib/bb/parse/ast.py      |    2 ++
 3 files changed, 12 insertions(+), 0 deletions(-)
author
#1 lore raw

PATCH v2 1/1 bitbake: Added BBINCLUDED variable.

Added new variable BBINCLUDED indicating the file dependency information. It exposes the internal variable '__base_depends' and '__depends'.

---
 bitbake/lib/bb/cooker.py         |    1 +
 bitbake/lib/bb/parse/__init__.py |    9 +++++++++
 bitbake/lib/bb/parse/ast.py      |    2 ++
 3 files changed, 12 insertions(+), 0 deletions(-)
bitbake/lib/bb/cooker.py +1 -0
index 12b526b..6ddd960 100644
@@ -893,6 +893,7 @@ class BBCooker:
         bb.codeparser.parser_cache_init(data)
         bb.event.fire(bb.event.ConfigParsed(), data)
         bb.parse.init_parser(data)
+        data.setVar('BBINCLUDED',bb.parse.get_file_depends(data))
         self.configuration.data = data
         self.configuration.data_hash = data.get_hash()
 
bitbake/lib/bb/parse/__init__.py +9 -0
index 8b7ec73..7b9c47e 100644
@@ -131,4 +131,13 @@ def vars_from_file(mypkg, d):
     parts.extend(tmplist)
     return parts
 
+def get_file_depends(d):
+    '''Return the dependent files'''
+    dep_files = []
+    depends = d.getVar('__depends', True) or set()
+    depends = depends.union(d.getVar('__base_depends', True) or set())
+    for (fn, _) in depends:
+        dep_files.append(os.path.abspath(fn))
+    return " ".join(dep_files)
+
 from bb.parse.parse_py import __version__, ConfHandler, BBHandler
bitbake/lib/bb/parse/ast.py +2 -0
index 94fa175..7cef3d0 100644
@@ -328,6 +328,8 @@ def finalize(fn, d, variant = None):
 
     bb.parse.siggen.finalise(fn, d, variant)
 
+    d.setVar('BBINCLUDED', bb.parse.get_file_depends(d))
+
     bb.event.fire(bb.event.RecipeParsed(fn), d)
 
 def _create_variants(datastores, names, function):
Signature · 1 line
1.7.0.4