All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
* [review-request] fixup dependency excludes_set for custom image
@ 2016-02-29 21:26 Dave Lerner
  2016-02-29 21:26 ` [PATCH 1/1] toaster: fixup dependency excludes for customimage Dave Lerner
  2016-03-01 16:46 ` [review-request] fixup dependency excludes_set for custom image Barros Pena, Belen
  0 siblings, 2 replies; 4+ messages in thread
From: Dave Lerner @ 2016-02-29 21:26 UTC (permalink / raw
  To: toaster, belen.barros.pena, michael.g.wood


Branch: master
Defect: 9156
Summary: toaster: fixup dependency excludes for customimage

commit b234dae9f3023af71814d9bb8f7052013b9400e8
Author: Dave Lerner <dave.lerner@windriver.com>
Date:   Mon Feb 29 14:58:35 2016 -0600

    toaster: fixup dependency excludes for customimage
    
    [YOCTO #9156]
    
    For a customized image when adding a dependent package X that depends on
    dependency package Y, in addition to adding X to appends_set and Y to
    includes_set, make sure that Y is no longer in the excludes_set. Y may
    have been added to the excludes_set by a prior package removal.
    
    Signed-off-by: Dave Lerner <dave.lerner@windriver.com>


Test setup
----------
Build core-image-sato.
Create a new project 'myproject' on master.
Create a custom image 'myimage' based on core-image-minimal.
Build core-image-minimal.
Customize myimage.

Test steps and expected results
-------------------------------
Search for atk, add the package accept the additional packages.
for each of the following verify that buttons switch to Remove Package:
    glib-2.0, libpcre, libffi, bash
Search for atk, click the remove package button.
for each of the following verify that buttons switch to Add Package:
    glib-2.0, libpcre, libffi, bash

Exit browser then re-enter browser
Pick All-Projects, pick 'myproject', click on Custom image, then select 'myimage'.
Search again for 'atk' and add the package.
for each of the following verify that buttons switch to Remove Package:
    glib-2.0, libpcre, libffi, bash



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

* [PATCH 1/1] toaster: fixup dependency excludes for customimage
  2016-02-29 21:26 [review-request] fixup dependency excludes_set for custom image Dave Lerner
@ 2016-02-29 21:26 ` Dave Lerner
  2016-03-03 15:10   ` Michael Wood
  2016-03-01 16:46 ` [review-request] fixup dependency excludes_set for custom image Barros Pena, Belen
  1 sibling, 1 reply; 4+ messages in thread
From: Dave Lerner @ 2016-02-29 21:26 UTC (permalink / raw
  To: toaster, belen.barros.pena, michael.g.wood

[YOCTO #9156]

For a customized image when adding a dependent package X that depends on
dependency package Y, in addition to adding X to appends_set and Y to
includes_set, make sure that Y is no longer in the excludes_set. Y may
have been added to the excludes_set by a prior package removal.

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

diff --git a/bitbake/lib/toaster/toastergui/views.py b/bitbake/lib/toaster/toastergui/views.py
index 28b03d3..4670139 100755
--- a/bitbake/lib/toaster/toastergui/views.py
+++ b/bitbake/lib/toaster/toastergui/views.py
@@ -2653,6 +2653,13 @@ if True:
                                            name=dep.depends_on.name)
 
                         recipe.includes_set.add(cust_package)
+                        try:
+                            # when adding the pre-requisite package make sure it's not in the
+                            #   excluded list from a prior removal.
+                            recipe.excludes_set.remove(cust_package)
+                        except Package.DoesNotExist:
+                            #   Don't care if the package had never been excluded
+                            return {"error": "ok"}
                     except:
                         logger.warning("Could not add package's suggested"
                                        "dependencies to the list")
-- 
1.9.1



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

* Re: [review-request] fixup dependency excludes_set for custom image
  2016-02-29 21:26 [review-request] fixup dependency excludes_set for custom image Dave Lerner
  2016-02-29 21:26 ` [PATCH 1/1] toaster: fixup dependency excludes for customimage Dave Lerner
@ 2016-03-01 16:46 ` Barros Pena, Belen
  1 sibling, 0 replies; 4+ messages in thread
From: Barros Pena, Belen @ 2016-03-01 16:46 UTC (permalink / raw
  To: Lerner, David M (Wind River), toaster@yoctoproject.org



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

>
>Branch: master
>Defect: 9156
>Summary: toaster: fixup dependency excludes for customimage
>
>commit b234dae9f3023af71814d9bb8f7052013b9400e8
>Author: Dave Lerner <dave.lerner@windriver.com>
>Date:   Mon Feb 29 14:58:35 2016 -0600
>
>    toaster: fixup dependency excludes for customimage
>    
>    [YOCTO #9156]
>    
>    For a customized image when adding a dependent package X that depends
>on
>    dependency package Y, in addition to adding X to appends_set and Y to
>    includes_set, make sure that Y is no longer in the excludes_set. Y may
>    have been added to the excludes_set by a prior package removal.
>    
>    Signed-off-by: Dave Lerner <dave.lerner@windriver.com>
>
>
>Test setup
>----------
>Build core-image-sato.
>Create a new project 'myproject' on master.
>Create a custom image 'myimage' based on core-image-minimal.
>Build core-image-minimal.
>Customize myimage.
>
>Test steps and expected results
>-------------------------------
>Search for atk, add the package accept the additional packages.
>for each of the following verify that buttons switch to Remove Package:
>    glib-2.0, libpcre, libffi, bash
>Search for atk, click the remove package button.
>for each of the following verify that buttons switch to Add Package:
>    glib-2.0, libpcre, libffi, bash

After this step, the buttons are still showing as 'remove package', which
is the expected behaviour at the moment and until
https://bugzilla.yoctoproject.org/show_bug.cgi?id=9121 is fixed.

Apart from that, this seems to be working properly for me.

Thanks!

Belén

>
>Exit browser then re-enter browser
>Pick All-Projects, pick 'myproject', click on Custom image, then select
>'myimage'.
>Search again for 'atk' and add the package.
>for each of the following verify that buttons switch to Remove Package:
>    glib-2.0, libpcre, libffi, bash
>
>-- 
>_______________________________________________
>toaster mailing list
>toaster@yoctoproject.org
>https://lists.yoctoproject.org/listinfo/toaster



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

* Re: [PATCH 1/1] toaster: fixup dependency excludes for customimage
  2016-02-29 21:26 ` [PATCH 1/1] toaster: fixup dependency excludes for customimage Dave Lerner
@ 2016-03-03 15:10   ` Michael Wood
  0 siblings, 0 replies; 4+ messages in thread
From: Michael Wood @ 2016-03-03 15:10 UTC (permalink / raw
  To: Dave Lerner, toaster, belen.barros.pena

Thanks for the patch. Just a small fix needed here.

On 29/02/16 21:26, Dave Lerner wrote:
> [YOCTO #9156]
>
> For a customized image when adding a dependent package X that depends on
> dependency package Y, in addition to adding X to appends_set and Y to
> includes_set, make sure that Y is no longer in the excludes_set. Y may
> have been added to the excludes_set by a prior package removal.
>
> Signed-off-by: Dave Lerner <dave.lerner@windriver.com>
> ---
>   bitbake/lib/toaster/toastergui/views.py | 7 +++++++
>   1 file changed, 7 insertions(+)
>
> diff --git a/bitbake/lib/toaster/toastergui/views.py b/bitbake/lib/toaster/toastergui/views.py
> index 28b03d3..4670139 100755
> --- a/bitbake/lib/toaster/toastergui/views.py
> +++ b/bitbake/lib/toaster/toastergui/views.py
> @@ -2653,6 +2653,13 @@ if True:
>                                              name=dep.depends_on.name)
>   
>                           recipe.includes_set.add(cust_package)
> +                        try:
> +                            # when adding the pre-requisite package make sure it's not in the
> +                            #   excluded list from a prior removal.
> +                            recipe.excludes_set.remove(cust_package)
> +                        except Package.DoesNotExist:
> +                            #   Don't care if the package had never been excluded
> +                            return {"error": "ok"}

We don't want to /return/ as we would end up exiting the loop on the 
first package that causes the DoesNotExist exception a /pass/ would be 
fine here.

>                       except:
>                           logger.warning("Could not add package's suggested"
>                                          "dependencies to the list")



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

end of thread, other threads:[~2016-03-03 15:10 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-02-29 21:26 [review-request] fixup dependency excludes_set for custom image Dave Lerner
2016-02-29 21:26 ` [PATCH 1/1] toaster: fixup dependency excludes for customimage Dave Lerner
2016-03-03 15:10   ` Michael Wood
2016-03-01 16:46 ` [review-request] fixup dependency excludes_set for custom image Barros Pena, Belen

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.