summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/toaster/orm/models.py
diff options
context:
space:
mode:
authorEd Bartosh <ed.bartosh@linux.intel.com>2015-07-28 15:24:45 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-08-01 11:29:35 +0100
commit7f4eb55d704716ca95db22f85367db8bdfec456b (patch)
tree042293bcc8b565459b90889c346788aea2a7d70d /bitbake/lib/toaster/orm/models.py
parent9be8ea632c2bdd9acc4d9212c7f2871f8c2575a8 (diff)
downloadpoky-7f4eb55d704716ca95db22f85367db8bdfec456b.tar.gz
bitbake: bitbake: toaster: Add is_image field to the Recipe model
Added new field is_image to the Recipe model. Made sure is_image is populated when layer sources are imported. Made sure the change doesn't break loading old style layer sources. Tested by loading data from layers.pythonanywhere.com and from layers.openembedded.org. [YOCTO: #7571] (Bitbake rev: 3ac0ba73790b8f68567daa2de313c78053411fbb) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Alexandru DAMIAN <alexandru.damian@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.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/bitbake/lib/toaster/orm/models.py b/bitbake/lib/toaster/orm/models.py
index 2b1a5b7905..2d7ef09bb1 100644
--- a/bitbake/lib/toaster/orm/models.py
+++ b/bitbake/lib/toaster/orm/models.py
@@ -586,6 +586,7 @@ class Recipe(models.Model):
586 bugtracker = models.URLField(blank=True) 586 bugtracker = models.URLField(blank=True)
587 file_path = models.FilePathField(max_length=255) 587 file_path = models.FilePathField(max_length=255)
588 pathflags = models.CharField(max_length=200, blank=True) 588 pathflags = models.CharField(max_length=200, blank=True)
589 is_image = models.BooleanField(default=False)
589 590
590 def get_layersource_view_url(self): 591 def get_layersource_view_url(self):
591 if self.layer_source is None: 592 if self.layer_source is None:
@@ -938,6 +939,8 @@ class LayerIndexLayerSource(LayerSource):
938 ro.homepage = ri['homepage'] 939 ro.homepage = ri['homepage']
939 ro.bugtracker = ri['bugtracker'] 940 ro.bugtracker = ri['bugtracker']
940 ro.file_path = ri['filepath'] + "/" + ri['filename'] 941 ro.file_path = ri['filepath'] + "/" + ri['filename']
942 if 'inherits' in ri:
943 ro.is_image = 'image' in ri['inherits'].split()
941 ro.save() 944 ro.save()
942 except: 945 except:
943 #print "Duplicate Recipe, ignoring: ", vars(ro) 946 #print "Duplicate Recipe, ignoring: ", vars(ro)