[bitbake-devel] toaster: add variable description for prefixed/suffixed variables

Submitted by Cristiana Voicu on Oct. 29, 2013, 4:28 p.m.

Details

Message ID 1383064101-15309-1-git-send-email-cristiana.voicu@intel.com
State New
Headers show

Commit Message

Cristiana Voicu Oct. 29, 2013, 4:28 p.m.
In the Configuration table, we need to link prefixed / suffixed
variables to the corresponding variable descriptions in documentation.conf.

[YOCTO #5198]
Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com>
---
 bitbake/lib/bb/ui/buildinfohelper.py |    5 +++++
 1 file changed, 5 insertions(+)

Patch hide | download patch | download mbox

diff --git a/bitbake/lib/bb/ui/buildinfohelper.py b/bitbake/lib/bb/ui/buildinfohelper.py
index 9541d10..303766a 100644
--- a/bitbake/lib/bb/ui/buildinfohelper.py
+++ b/bitbake/lib/bb/ui/buildinfohelper.py
@@ -230,6 +230,11 @@  class ORMWrapper(object):
                     value = ''
                 desc = vardump[k]['doc'];
                 if desc is None:
+                    var_words = [word for word in k.split('_')]
+                    root_var = "_".join([word for word in var_words if word.isupper()])
+                    if root_var and root_var != k and root_var in vardump:
+                        desc = vardump[root_var]['doc']
+                if desc is None:
                     desc = ''
                 variable_obj = Variable.objects.create( build = build_obj,
                     variable_name = k,