summaryrefslogtreecommitdiffstats
path: root/bitbake
diff options
context:
space:
mode:
authorEd Bartosh <ed.bartosh@linux.intel.com>2015-10-01 14:19:56 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-10-12 14:38:56 +0100
commitfa3e82d9527aa8c2ac4249d35d28515d471a3bb5 (patch)
treeaf0a91a86ea2783c0221d267576b9b5ed24a8221 /bitbake
parent82675fc4ed13834e3fc7112dcf15b65c056904c2 (diff)
downloadpoky-fa3e82d9527aa8c2ac4249d35d28515d471a3bb5.tar.gz
bitbake: toaster: delete recipe if it can't be saved
Due to Recipe model constraints some recipes can't be saved. However, they still can create incomplete records in the database. This causes all sorts of errors when Toaster operates with those objects. Removing them should fix those issues. [YOCTO #7969] (Bitbake rev: 4d76a9e418fd98a7882aa29f974a7389f9689314) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: brian avery <avery.brian@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake')
-rw-r--r--bitbake/lib/toaster/orm/models.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/bitbake/lib/toaster/orm/models.py b/bitbake/lib/toaster/orm/models.py
index 6c28726bd9..567732518a 100644
--- a/bitbake/lib/toaster/orm/models.py
+++ b/bitbake/lib/toaster/orm/models.py
@@ -1011,6 +1011,7 @@ class LayerIndexLayerSource(LayerSource):
1011 ro.save() 1011 ro.save()
1012 except IntegrityError as e: 1012 except IntegrityError as e:
1013 logger.debug("Failed saving recipe, ignoring: %s (%s:%s)" % (e, ro.layer_version, ri['filepath']+"/"+ri['filename'])) 1013 logger.debug("Failed saving recipe, ignoring: %s (%s:%s)" % (e, ro.layer_version, ri['filepath']+"/"+ri['filename']))
1014 ro.delete()
1014 if not connection.features.autocommits_when_autocommit_is_off: 1015 if not connection.features.autocommits_when_autocommit_is_off:
1015 transaction.set_autocommit(True) 1016 transaction.set_autocommit(True)
1016 1017