All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] remove empty recipe names #7969
@ 2015-10-01 21:19 brian avery
  2015-10-01 21:19 ` [PATCH 1/2] toaster: delete recipe if it can't be saved brian avery
  2015-10-01 21:19 ` [PATCH 2/2] toaster: exclude recipes with empty names brian avery
  0 siblings, 2 replies; 3+ messages in thread
From: brian avery @ 2015-10-01 21:19 UTC (permalink / raw)
  To: bitbake-devel

This removes the receipes with empty names from toaster.

The following changes since commit 7b10ae122d46891c734e786358ea5f36760e8d5e:

  toaster: Fix broken test case (2015-10-01 10:42:16 +0100)

are available in the git repository at:

  git://git.yoctoproject.org/poky-contrib bavery/submit/ed/2015-10-1_nameless-recipes-7969
  http://git.yoctoproject.org/cgit.cgi/poky-contrib/log/?h=bavery/submit/ed/2015-10-1_nameless-recipes-7969

Ed Bartosh (2):
  toaster: delete recipe if it can't be saved
  toaster: exclude recipes with empty names

 lib/toaster/orm/models.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

-- 
1.9.1



^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH 1/2] toaster: delete recipe if it can't be saved
  2015-10-01 21:19 [PATCH 0/2] remove empty recipe names #7969 brian avery
@ 2015-10-01 21:19 ` brian avery
  2015-10-01 21:19 ` [PATCH 2/2] toaster: exclude recipes with empty names brian avery
  1 sibling, 0 replies; 3+ messages in thread
From: brian avery @ 2015-10-01 21:19 UTC (permalink / raw)
  To: bitbake-devel

From: Ed Bartosh <ed.bartosh@linux.intel.com>

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@linux.intel.com>
Signed-off-by: brian avery <avery.brian@gmail.com>
---
 lib/toaster/orm/models.py | 1 +
 1 file changed, 1 insertion(+)

diff --git a/lib/toaster/orm/models.py b/lib/toaster/orm/models.py
index 5aed158..89343f2 100644
--- a/lib/toaster/orm/models.py
+++ b/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)
 
-- 
1.9.1



^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [PATCH 2/2] toaster: exclude recipes with empty names
  2015-10-01 21:19 [PATCH 0/2] remove empty recipe names #7969 brian avery
  2015-10-01 21:19 ` [PATCH 1/2] toaster: delete recipe if it can't be saved brian avery
@ 2015-10-01 21:19 ` brian avery
  1 sibling, 0 replies; 3+ messages in thread
From: brian avery @ 2015-10-01 21:19 UTC (permalink / raw)
  To: bitbake-devel

From: Ed Bartosh <ed.bartosh@linux.intel.com>

Modified get_all_compatible_recipes function to exclude recipes
with empty names from the result queryset. This should stop UI
to show recipes with empty names in compatible recipes page.

[YOCTO #7969]

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: brian avery <avery.brian@gmail.com>
---
 lib/toaster/orm/models.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/toaster/orm/models.py b/lib/toaster/orm/models.py
index 89343f2..ad12dd4 100644
--- a/lib/toaster/orm/models.py
+++ b/lib/toaster/orm/models.py
@@ -253,7 +253,7 @@ class Project(models.Model):
         """ Returns QuerySet of all the compatible Recipes available to the
         project including ones from Layers not currently added """
         queryset = Recipe.objects.filter(
-            layer_version__in=self.get_all_compatible_layer_versions())
+            layer_version__in=self.get_all_compatible_layer_versions()).exclude(name__exact='')
 
         return queryset
 
-- 
1.9.1



^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-10-01 21:18 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-10-01 21:19 [PATCH 0/2] remove empty recipe names #7969 brian avery
2015-10-01 21:19 ` [PATCH 1/2] toaster: delete recipe if it can't be saved brian avery
2015-10-01 21:19 ` [PATCH 2/2] toaster: exclude recipes with empty names brian avery

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.