[Toaster] [PATCH 1/2] toaster: delete recipe if it can't be saved
Ed Bartosh
ed.bartosh at linux.intel.com
Thu Oct 1 10:08:17 PDT 2015
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]
Signed-off-by: Ed Bartosh <ed.bartosh at linux.intel.com>
---
bitbake/lib/toaster/orm/models.py | 1 +
1 file changed, 1 insertion(+)
diff --git a/bitbake/lib/toaster/orm/models.py b/bitbake/lib/toaster/orm/models.py
index 5aed158..89343f2 100644
--- a/bitbake/lib/toaster/orm/models.py
+++ b/bitbake/lib/toaster/orm/models.py
@@ -1011,6 +1011,7 @@ class LayerIndexLayerSource(LayerSource):
ro.save()
except IntegrityError as e:
logger.debug("Failed saving recipe, ignoring: %s (%s:%s)" % (e, ro.layer_version, ri['filepath']+"/"+ri['filename']))
+ ro.delete()
if not connection.features.autocommits_when_autocommit_is_off:
transaction.set_autocommit(True)
--
2.1.4
More information about the toaster
mailing list