summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/toaster/orm/models.py
diff options
context:
space:
mode:
authorPaul Eggleton <paul.eggleton@linux.intel.com>2014-04-03 11:16:23 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2014-04-04 11:53:52 +0100
commit432505d5636a0303dfe3db26db15055d98624dc8 (patch)
treef841e4d190a1a6e11cb29f4fd11e95e9983f2d5c /bitbake/lib/toaster/orm/models.py
parentfee85f01bb1d8b2019fea17afba36ad1846c42a7 (diff)
downloadpoky-432505d5636a0303dfe3db26db15055d98624dc8.tar.gz
bitbake: toaster: fix help texts not showing for most tasks
These were not being collected properly because we were explicitly excluding variables defined as functions from being stored in the database. We don't want these to be shown in the variables list, and in any case it makes sense for these to be stored elsewhere, so create a separate model to store these. Fixes [YOCTO #6050]. (Bitbake rev: 0d76a5461ce4bd554ff70a465064969e53edf0a4) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/toaster/orm/models.py')
-rw-r--r--bitbake/lib/toaster/orm/models.py13
1 files changed, 11 insertions, 2 deletions
diff --git a/bitbake/lib/toaster/orm/models.py b/bitbake/lib/toaster/orm/models.py
index 9c15ebf12b..658e1d2cc7 100644
--- a/bitbake/lib/toaster/orm/models.py
+++ b/bitbake/lib/toaster/orm/models.py
@@ -175,9 +175,9 @@ class Task(models.Model):
175 return "Not Executed" 175 return "Not Executed"
176 176
177 def get_description(self): 177 def get_description(self):
178 variable = Variable.objects.filter(variable_name=self.task_name, build = self.build) 178 helptext = HelpText.objects.filter(key=self.task_name, area=HelpText.VARIABLE, build=self.build)
179 try: 179 try:
180 return variable[0].description 180 return helptext[0].text
181 except IndexError: 181 except IndexError:
182 return '' 182 return ''
183 183
@@ -343,6 +343,15 @@ class VariableHistory(models.Model):
343 line_number = models.IntegerField(null=True) 343 line_number = models.IntegerField(null=True)
344 operation = models.CharField(max_length=16) 344 operation = models.CharField(max_length=16)
345 345
346class HelpText(models.Model):
347 VARIABLE = 0
348 HELPTEXT_AREA = ((VARIABLE, 'variable'), )
349
350 build = models.ForeignKey(Build, related_name='helptext_build')
351 area = models.IntegerField(choices=HELPTEXT_AREA)
352 key = models.CharField(max_length=100)
353 text = models.TextField()
354
346class LogMessage(models.Model): 355class LogMessage(models.Model):
347 INFO = 0 356 INFO = 0
348 WARNING = 1 357 WARNING = 1