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

login
register
mail settings
Submitter Paul Eggleton
Date Nov. 1, 2013, 3:58 p.m.
Message ID <56e90fd051efeaa3317bed9e9c699eb28fe1ea2a.1383321482.git.paul.eggleton@linux.intel.com>
Download mbox | patch
Permalink /patch/60991/
State Accepted
Commit 641d9c4fda5fe978154fdfab978c3c09e3906eab
Headers show

Comments

Paul Eggleton - Nov. 1, 2013, 3:58 p.m.
From: Cristiana Voicu <cristiana.voicu@intel.com>

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>
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
---
 lib/bb/ui/buildinfohelper.py | 5 +++++
 1 file changed, 5 insertions(+)

Patch

diff --git a/lib/bb/ui/buildinfohelper.py b/lib/bb/ui/buildinfohelper.py
index 4996b42..2ca0bd3 100644
--- a/lib/bb/ui/buildinfohelper.py
+++ b/lib/bb/ui/buildinfohelper.py
@@ -226,6 +226,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.objects.create( build = build_obj,
                     variable_name = k,