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

login
register
mail settings
Submitter Cristiana Voicu
Date Oct. 29, 2013, 4:28 p.m.
Message ID <1383064101-15309-1-git-send-email-cristiana.voicu@intel.com>
Download mbox | patch
Permalink /patch/60717/
State New
Headers show

Comments

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

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,