All of lore.kernel.org
 help / color / mirror / Atom feed
* [review-request] remove custom images from Image Recipes page
@ 2016-02-19 22:32 Dave Lerner
  2016-02-19 22:32 ` [PATCH 1/1] toaster: remove custom images from Image Recipes Dave Lerner
  0 siblings, 1 reply; 5+ messages in thread
From: Dave Lerner @ 2016-02-19 22:32 UTC (permalink / raw)
  To: toaster, michael.g.wood, belen.barros.pena


Branch: master
Defect: bz9111
Summary: don't show custom images on Configuration | Image Recipes page

Tests
-----
Create custom image xxxxx based on core-image-minimal and build it.
View Image Recipes page.
Verify that core-image-minimal is in the list and 
    verify that xxxxx is not in the list.




   





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

* [PATCH 1/1] toaster: remove custom images from Image Recipes
  2016-02-19 22:32 [review-request] remove custom images from Image Recipes page Dave Lerner
@ 2016-02-19 22:32 ` Dave Lerner
  2016-02-22 13:48   ` Barros Pena, Belen
  2016-02-22 16:40   ` Michael Wood
  0 siblings, 2 replies; 5+ messages in thread
From: Dave Lerner @ 2016-02-19 22:32 UTC (permalink / raw)
  To: toaster, michael.g.wood, belen.barros.pena

Fix the view of Image Recipes under Configuration to only show image
recipes that are not customised, since custom images have their own
page

Signed-off-by: Dave Lerner <dave.lerner@windriver.com>
---
 bitbake/lib/toaster/toastergui/tables.py | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/bitbake/lib/toaster/toastergui/tables.py b/bitbake/lib/toaster/toastergui/tables.py
index 86d111d..50a18e7 100644
--- a/bitbake/lib/toaster/toastergui/tables.py
+++ b/bitbake/lib/toaster/toastergui/tables.py
@@ -549,7 +549,9 @@ class ImageRecipesTable(RecipesTable):
     def setup_queryset(self, *args, **kwargs):
         super(ImageRecipesTable, self).setup_queryset(*args, **kwargs)
 
-        self.queryset = self.queryset.filter(is_image=True)
+        custom_image_recipes = CustomImageRecipe.objects.all()
+        self.queryset = self.queryset.filter(
+                Q(is_image=True) & ~Q(pk__in=custom_image_recipes))
         self.queryset = self.queryset.order_by(self.default_orderby)
 
 
-- 
1.9.1



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

* Re: [PATCH 1/1] toaster: remove custom images from Image Recipes
  2016-02-19 22:32 ` [PATCH 1/1] toaster: remove custom images from Image Recipes Dave Lerner
@ 2016-02-22 13:48   ` Barros Pena, Belen
  2016-02-22 14:10     ` Barros Pena, Belen
  2016-02-22 16:40   ` Michael Wood
  1 sibling, 1 reply; 5+ messages in thread
From: Barros Pena, Belen @ 2016-02-22 13:48 UTC (permalink / raw)
  To: Lerner, David M (Wind River), toaster@yoctoproject.org,
	Wood, Michael G



On 19/02/2016 23:32, "toaster-bounces@yoctoproject.org on behalf of Dave
Lerner" <toaster-bounces@yoctoproject.org on behalf of
dave.lerner@windriver.com> wrote:

>Fix the view of Image Recipes under Configuration to only show image
>recipes that are not customised, since custom images have their own
>page
>
>Signed-off-by: Dave Lerner <dave.lerner@windriver.com>
>---
> bitbake/lib/toaster/toastergui/tables.py | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
>diff --git a/bitbake/lib/toaster/toastergui/tables.py
>b/bitbake/lib/toaster/toastergui/tables.py
>index 86d111d..50a18e7 100644
>--- a/bitbake/lib/toaster/toastergui/tables.py
>+++ b/bitbake/lib/toaster/toastergui/tables.py
>@@ -549,7 +549,9 @@ class ImageRecipesTable(RecipesTable):
>     def setup_queryset(self, *args, **kwargs):
>         super(ImageRecipesTable, self).setup_queryset(*args, **kwargs)
> 
>-        self.queryset = self.queryset.filter(is_image=True)
>+        custom_image_recipes = CustomImageRecipe.objects.all()
>+        self.queryset = self.queryset.filter(
>+                Q(is_image=True) & ~Q(pk__in=custom_image_recipes))
>         self.queryset = self.queryset.order_by(self.default_orderby)

This patch removes the custom images from the compatible image recipes
list (as requested by issue 9111), but also from the new custom image
page. I think it might be useful to be able to create custom images
selecting a custom image as your base image (for example, I might want to
create a minimal-belen-dev from my minimal-belen custom image).

If this is something we'd like to keep, we would need to modify the patch
to remove the custom images from the compatible image recipes list, but
not from the new custom image page.

Thanks!

Belén

> 
> 
>-- 
>1.9.1
>
>-- 
>_______________________________________________
>toaster mailing list
>toaster@yoctoproject.org
>https://lists.yoctoproject.org/listinfo/toaster



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

* Re: [PATCH 1/1] toaster: remove custom images from Image Recipes
  2016-02-22 13:48   ` Barros Pena, Belen
@ 2016-02-22 14:10     ` Barros Pena, Belen
  0 siblings, 0 replies; 5+ messages in thread
From: Barros Pena, Belen @ 2016-02-22 14:10 UTC (permalink / raw)
  To: Lerner, David M (Wind River), toaster@yoctoproject.org,
	Wood, Michael G



On 22/02/2016 14:48, "Barros Pena, Belen" <belen.barros.pena@intel.com>
wrote:

>
>
>On 19/02/2016 23:32, "toaster-bounces@yoctoproject.org on behalf of Dave
>Lerner" <toaster-bounces@yoctoproject.org on behalf of
>dave.lerner@windriver.com> wrote:
>
>>Fix the view of Image Recipes under Configuration to only show image
>>recipes that are not customised, since custom images have their own
>>page
>>
>>Signed-off-by: Dave Lerner <dave.lerner@windriver.com>
>>---
>> bitbake/lib/toaster/toastergui/tables.py | 4 +++-
>> 1 file changed, 3 insertions(+), 1 deletion(-)
>>
>>diff --git a/bitbake/lib/toaster/toastergui/tables.py
>>b/bitbake/lib/toaster/toastergui/tables.py
>>index 86d111d..50a18e7 100644
>>--- a/bitbake/lib/toaster/toastergui/tables.py
>>+++ b/bitbake/lib/toaster/toastergui/tables.py
>>@@ -549,7 +549,9 @@ class ImageRecipesTable(RecipesTable):
>>     def setup_queryset(self, *args, **kwargs):
>>         super(ImageRecipesTable, self).setup_queryset(*args, **kwargs)
>> 
>>-        self.queryset = self.queryset.filter(is_image=True)
>>+        custom_image_recipes = CustomImageRecipe.objects.all()
>>+        self.queryset = self.queryset.filter(
>>+                Q(is_image=True) & ~Q(pk__in=custom_image_recipes))
>>         self.queryset = self.queryset.order_by(self.default_orderby)
>
>This patch removes the custom images from the compatible image recipes
>list (as requested by issue 9111), but also from the new custom image
>page. 

Sorry, my mistake: the custom images do appear in the new custom image
page. Mondays ...

Belén

>I think it might be useful to be able to create custom images
>selecting a custom image as your base image (for example, I might want to
>create a minimal-belen-dev from my minimal-belen custom image).
>
>If this is something we'd like to keep, we would need to modify the patch
>to remove the custom images from the compatible image recipes list, but
>not from the new custom image page.
>
>Thanks!
>
>Belén
>
>> 
>> 
>>-- 
>>1.9.1
>>
>>-- 
>>_______________________________________________
>>toaster mailing list
>>toaster@yoctoproject.org
>>https://lists.yoctoproject.org/listinfo/toaster
>



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

* Re: [PATCH 1/1] toaster: remove custom images from Image Recipes
  2016-02-19 22:32 ` [PATCH 1/1] toaster: remove custom images from Image Recipes Dave Lerner
  2016-02-22 13:48   ` Barros Pena, Belen
@ 2016-02-22 16:40   ` Michael Wood
  1 sibling, 0 replies; 5+ messages in thread
From: Michael Wood @ 2016-02-22 16:40 UTC (permalink / raw)
  To: Dave Lerner, toaster, belen.barros.pena

On 19/02/16 22:32, Dave Lerner wrote:
> Fix the view of Image Recipes under Configuration to only show image
> recipes that are not customised, since custom images have their own
> page
>
> Signed-off-by: Dave Lerner <dave.lerner@windriver.com>
> ---
>   bitbake/lib/toaster/toastergui/tables.py | 4 +++-
>   1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/bitbake/lib/toaster/toastergui/tables.py b/bitbake/lib/toaster/toastergui/tables.py
> index 86d111d..50a18e7 100644
> --- a/bitbake/lib/toaster/toastergui/tables.py
> +++ b/bitbake/lib/toaster/toastergui/tables.py
> @@ -549,7 +549,9 @@ class ImageRecipesTable(RecipesTable):
>       def setup_queryset(self, *args, **kwargs):
>           super(ImageRecipesTable, self).setup_queryset(*args, **kwargs)
>   
> -        self.queryset = self.queryset.filter(is_image=True)
> +        custom_image_recipes = CustomImageRecipe.objects.all()

One minor thing, we can make this QuerySet a bit more lightweight by 
using the project field e.g. 
CustomImageRecipe.objects.filter(project=kwargs['pid']) so that we're 
only doing a query of all in the current project.


> +        self.queryset = self.queryset.filter(
> +                Q(is_image=True) & ~Q(pk__in=custom_image_recipes))
>           self.queryset = self.queryset.order_by(self.default_orderby)
>   
>   






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

end of thread, other threads:[~2016-02-22 16:40 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-02-19 22:32 [review-request] remove custom images from Image Recipes page Dave Lerner
2016-02-19 22:32 ` [PATCH 1/1] toaster: remove custom images from Image Recipes Dave Lerner
2016-02-22 13:48   ` Barros Pena, Belen
2016-02-22 14:10     ` Barros Pena, Belen
2016-02-22 16:40   ` Michael Wood

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.