All of lore.kernel.org
 help / color / mirror / Atom feed
* [V2 review-request] show and delete recursive list of reverse dependencies
@ 2016-03-17 22:01 Dave Lerner
  2016-03-17 22:01 ` [V2 PATCH 1/3] toaster: show full list of dependents to remove Dave Lerner
                   ` (3 more replies)
  0 siblings, 4 replies; 9+ messages in thread
From: Dave Lerner @ 2016-03-17 22:01 UTC (permalink / raw)
  To: toaster, belen.barros.pena, elliot.smith


Target Branch: toaster-next master
Contrib Branch: poky-contrib/dlerner/9121-delete-dependant-package-tree
Defect: 9121
Summary: Show and delete recurive list of reverse dependencies

Comment: Version 2 patch set per comments from Belen and Elliot.
         Only 1/3 and 3/3 patches are changed, but 2/3 is included.

Commit
------
c801079 toaster: get all dependants for pkg for removal
327ada3 toaster: new customise package-remove modal dlg
7542b8a toaster: show full list of dependants to remove
 
 .../toaster/toastergui/static/js/customrecipe.js   | 72 +++++++++++++++--
 .../toaster/toastergui/templates/customrecipe.html |  5 +-
 bitbake/lib/toaster/toastergui/views.py            | 91 +++++++++++++++++++---
 3 files changed, 148 insertions(+), 20 deletions(-)


Test Cases:
[V2] denotes additional test for version 2, changes per Belen's comments.

SETUP:
-----
Start toaster with empty build directory, sstate-cache
Create a new project, 'myproject'
Build core-image-sato

CASE Remove dependant package that was part of original base image
------------------------------------------------------------------
Create new custom image on core-image-sato, named mysato
Remove libcrypto
    Verify that "39 packages will be removed" are reported and that the 
    packages are unique and in alpha order
    [V2] Verify that the notification shows
"You have removed libcrypto and its 39 reverse dependencies: gst-player-bin, gstreamer1.0-plugins-bad-dtls, gstreamer1.0-plugins-bad-meta, gstreamer1.0-plugins-bad-opengl, libegl-mesa and 34 more"

Build  mysato
Click on the All Builds mysato:
    Verify Images : Packages included field shows 40 packages less than if
        you look at All Builds | core-image-sato (eg 567 vs 607)

CASE Add back a root dependency (Issue sent in email Mar9)
----------------------------------------------------------
Open custom image mysato
Add libcrypto back
Build 
Click All Projects | Custom Images | mysato
    Verify libcrypto 'looks' added: that the entry shows "remove package"

CASE Test no interference removing from a 2nd custom image in project
----------------------------------------------------------------------
New custom-image based on core-image-sato 'myminimal'
Build it
Add atk which is dependant on glib-2.0, libffi, libpcre (bash appears but this
is busybox system, so don't think that dependency will apply - maybe bug unrelated to this work).
Build myminimal again.
Verify that atk, libffi, libpcre, glib-2.0 have files in the file system
For custom image myminimal, enter libpcre, remove package
    Verify modal dlg notes libpcre atk and glib-2.0 will be removed Remove
Build
    Verify atk, glib2.0 and libpcre are removed.

CASE Test button notifications and banner on removal for package w/ dependants
------------------------------------------------------------------------------
To minimal, add openssl-staticdev which indirectly will bring in libssl
Build
Verify that libssl, openssl, openssl-dev are added
On minimal, enter "openssl" to see a set of matching packages.
REmove libssl
    Verify modal dialog reports both the direct and indirect dependants
        openssl, openssl-dev, and openssl-staticdev, will be removed.
Click Remove all
    Verify the buttons for openssl (an others that you see on screen) report:
        "4 packages removed"
    Verify that the banner says:
        "You have removed 4 packages from minimal: libssl and it's 3 dependantso    Verify that buttons transition to Add Package.

[V2] CASE Remove package that has only has 1 dependant
------------------------------------------------------
To minimal, add back openssl-staticdev
Build
Select openssl-dev and remove the package.  
    Verify that syntax for 1 rev-dep is appropriate on modal dlg.
    Remove the 2 packages
    Verify that syntax for 1 reverse dependency on main page notifiation.



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

* [V2 PATCH 1/3] toaster: show full list of dependents to remove
  2016-03-17 22:01 [V2 review-request] show and delete recursive list of reverse dependencies Dave Lerner
@ 2016-03-17 22:01 ` Dave Lerner
  2016-03-17 22:01 ` [PATCH 2/3] toaster: new customise package-remove modal dlg Dave Lerner
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 9+ messages in thread
From: Dave Lerner @ 2016-03-17 22:01 UTC (permalink / raw)
  To: toaster, belen.barros.pena, elliot.smith

When a package is to be removed, show the full list of packages that are
dependent on that package, telling user that these packages will also be
removed.

[YOCTO #9121]

Signed-off-by: Dave Lerner <dave.lerner@windriver.com>
---
 .../toaster/toastergui/static/js/customrecipe.js   | 72 ++++++++++++++++++++--
 1 file changed, 66 insertions(+), 6 deletions(-)

diff --git a/bitbake/lib/toaster/toastergui/static/js/customrecipe.js b/bitbake/lib/toaster/toastergui/static/js/customrecipe.js
index 3c57899..f1b8afb 100644
--- a/bitbake/lib/toaster/toastergui/static/js/customrecipe.js
+++ b/bitbake/lib/toaster/toastergui/static/js/customrecipe.js
@@ -89,7 +89,21 @@ function customRecipePageInit(ctx) {
     var depsList = modal.find("#package-reverse-dep-list");
     var deps = pkgData.reverse_dependencies;
 
+    var depsCount = deps.length;
+    var vDepends = "depends";
+    var vPackage = "package";
+    var vThis = "this";
+    if (depsCount > 1) {
+      vDepends = "depend";
+      vPackage = "packages";
+      vThis = "these";
+    }
     modal.find(".package-to-rm-name").text(targetPkg.name);
+    modal.find(".reverse-deps-count").text(depsCount);
+    modal.find(".reverse-deps-count-plus1").text((depsCount+1) + " packages");
+    modal.find(".reverse-deps-depends").text(vDepends);
+    modal.find(".reverse-deps-package").text(vPackage);
+    modal.find(".reverse-deps-this").text(vThis);
 
     depsList.text("");
 
@@ -103,6 +117,8 @@ function customRecipePageInit(ctx) {
     modal.find("#package-reverse-deps-total-size").text(
       pkgData.reverse_dependencies_size_formatted);
 
+    targetPkg.depsRemoved = deps;
+
     rmdPkgReverseDepsModalBtn.data(targetPkg);
     modal.modal('show');
   }
@@ -121,6 +137,10 @@ function customRecipePageInit(ctx) {
     var btnCell = $("#package-btn-cell-" + targetPkg.id);
     var inlineNotify = btnCell.children(".inline-notification");
 
+    var i;
+    var dep;
+    var depBtnCell;
+
     if (targetPkg.directive === 'add') {
       method = 'PUT';
       /* If the package had dependencies also notify that they were added */
@@ -132,15 +152,15 @@ function customRecipePageInit(ctx) {
         msg += " packages to " + ctx.recipe.name + ": ";
         msg += "<strong>" + targetPkg.name + "</strong> and its dependencies";
 
-        for (var i in targetPkg.depsAdded){
-          var dep = targetPkg.depsAdded[i];
+        for (i in targetPkg.depsAdded){
+          dep = targetPkg.depsAdded[i];
 
           msg += " <strong>" + dep.name + "</strong>";
 
           /* Add any cells currently in view to the list of cells which get
            * an inline notification inside them and which change add/rm state
            */
-          var depBtnCell = $("#package-btn-cell-" + dep.pk);
+          depBtnCell = $("#package-btn-cell-" + dep.pk);
           btnCell = btnCell.add(depBtnCell);
 
           inlineNotify = inlineNotify.add(
@@ -159,9 +179,49 @@ function customRecipePageInit(ctx) {
 
     } else if (targetPkg.directive === 'remove') {
       method = 'DELETE';
-      msg += "removed 1 package from "+ctx.recipe.name+":";
-      msg += ' <strong>' + targetPkg.name + '<strong>';
-      inlineNotify.text("1 package removed");
+      var numPackageString = "1 package ";
+      var revDepList = "";
+      if (targetPkg.hasOwnProperty('depsRemoved') &&
+              targetPkg.depsRemoved.length > 0) {
+        var depsRemovedLength = targetPkg.depsRemoved.length;
+        var ending = "y: ";
+        var maxRevDepsDisplayed  = 5;
+        var d = 0;
+        if (depsRemovedLength > 1) {
+            ending = "ies: ";
+        }
+        numPackageString = (depsRemovedLength + 1) + " packages";
+        revDepList = " and its " + depsRemovedLength + " reverse dependenc" + ending;
+        for (i in targetPkg.depsRemoved){
+          /* include up to maxRevDepsDisplayed rev deps on the page notification */
+          var notShownCount = depsRemovedLength - maxRevDepsDisplayed;
+          dep = targetPkg.depsRemoved[i];
+          if (d < maxRevDepsDisplayed) {
+            if (d > 0) {
+                revDepList += ", ";
+            }
+            revDepList += dep.name;
+            d++;
+            if ((d === maxRevDepsDisplayed) && (notShownCount > 0)) {
+                revDepList += " and " + notShownCount + " more";
+            }
+          }
+
+          /* Add any cells currently in view to the list of cells which get
+           * an inline notification inside them and which change add/rm state
+           */
+          depBtnCell = $("#package-btn-cell-" + dep.pk);
+          btnCell = btnCell.add(depBtnCell);
+
+          inlineNotify = inlineNotify.add(
+            depBtnCell.children(".inline-notification"));
+        }
+      }
+      msg+= "removed " + numPackageString + " from " + ctx.recipe.name + ":";
+      msg += " <strong>" + targetPkg.name + "</strong>";
+      msg += revDepList;
+
+      inlineNotify.text(numPackageString + " removed");
     } else {
       throw("Unknown package directive: should be add or remove");
     }
-- 
1.9.1



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

* [PATCH 2/3] toaster: new customise package-remove modal dlg
  2016-03-17 22:01 [V2 review-request] show and delete recursive list of reverse dependencies Dave Lerner
  2016-03-17 22:01 ` [V2 PATCH 1/3] toaster: show full list of dependents to remove Dave Lerner
@ 2016-03-17 22:01 ` Dave Lerner
  2016-03-17 22:02 ` [V2 PATCH 3/3] toaster: get all dependents for pkg for removal Dave Lerner
  2016-03-21 16:52 ` [V2 review-request] show and delete recursive list of reverse dependencies Barros Pena, Belen
  3 siblings, 0 replies; 9+ messages in thread
From: Dave Lerner @ 2016-03-17 22:01 UTC (permalink / raw)
  To: toaster, belen.barros.pena, elliot.smith

For customised image package removal, show a different modal dialog that
lists ALL of the packages dependent on this package, with a Remove All
button - implying that all of the dependents will be removed.

[YOCTO #9121]

Signed-off-by: Dave Lerner <dave.lerner@windriver.com>
---
 bitbake/lib/toaster/toastergui/templates/customrecipe.html | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/bitbake/lib/toaster/toastergui/templates/customrecipe.html b/bitbake/lib/toaster/toastergui/templates/customrecipe.html
index 8cce919..4b58992 100644
--- a/bitbake/lib/toaster/toastergui/templates/customrecipe.html
+++ b/bitbake/lib/toaster/toastergui/templates/customrecipe.html
@@ -66,13 +66,14 @@
     <h3><span class="package-to-rm-name"></span> reverse dependencies</h3>
   </div>
   <div class="modal-body">
-    <p>Based on information from a previous build it is likely that <strong class="package-to-rm-name"></strong> may be added again as the following packages directly depend on it for your custom image:</p>
+    <p> <strong class="reverse-deps-count"></strong> <span class="reverse-deps-package"></span> in your image <span class="reverse-deps-depends"></span> on <strong class="package-to-rm-name"></strong>:</p>
     <ul id="package-reverse-dep-list">
     </ul>
+    <p>In order to remove <strong class="package-to-rm-name"></strong>, you must remove <span class="reverse-deps-this"></span> <strong class="reverse-deps-count"></strong> <span class="reverse-deps-package"></span> as well.</p>
   </div>
   <div class="modal-footer">
     <p class="help-block text-left">Total package size: <strong id="package-reverse-deps-total-size"></strong></p>
-    <button id="rm-package-reverse-deps-modal-btn" type="submit" class="btn btn-primary" data-dismiss="modal">Remove package</button>
+    <button id="rm-package-reverse-deps-modal-btn" type="submit" class="btn btn-primary" data-dismiss="modal">Remove all <span class="reverse-deps-count-plus1"></button>
     <button class="btn" data-dismiss="modal">Cancel</button>
   </div>
 </div>
-- 
1.9.1



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

* [V2 PATCH 3/3] toaster: get all dependents for pkg for removal
  2016-03-17 22:01 [V2 review-request] show and delete recursive list of reverse dependencies Dave Lerner
  2016-03-17 22:01 ` [V2 PATCH 1/3] toaster: show full list of dependents to remove Dave Lerner
  2016-03-17 22:01 ` [PATCH 2/3] toaster: new customise package-remove modal dlg Dave Lerner
@ 2016-03-17 22:02 ` Dave Lerner
  2016-03-21 16:52 ` [V2 review-request] show and delete recursive list of reverse dependencies Barros Pena, Belen
  3 siblings, 0 replies; 9+ messages in thread
From: Dave Lerner @ 2016-03-17 22:02 UTC (permalink / raw)
  To: toaster, belen.barros.pena, elliot.smith

For customised image package removal change behavior.
From:
    Only display the immediate dependents of the requested package
    to remove, not the full dependent list, that is dependents of
    dependents ...
    Do not remove the displayed dependents, just notify the user
    of the list.
To:
    Display the complete dependent tree, traversing all reverse
    dependencies starting from the package to be removed and then it's
    dependents.
    Change the modal dialog to note that all of these dependents will
    be removed automatically.

[YOCTO #9121]

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

diff --git a/bitbake/lib/toaster/toastergui/views.py b/bitbake/lib/toaster/toastergui/views.py
index 85ca9be..9944c8d 100755
--- a/bitbake/lib/toaster/toastergui/views.py
+++ b/bitbake/lib/toaster/toastergui/views.py
@@ -2538,6 +2538,60 @@ if True:
 
         return response
 
+    def _traverse_dependents(next_package_id, rev_deps, all_current_packages, tree_level=0):
+        """
+        Recurse through reverse dependency tree for next_package_id.
+        Limit the reverse dependency search to packages not already scanned,
+        that is, not already in rev_deps.
+        Limit the scan to a depth (tree_level) not exceeding the count of
+        all packages in the custom image, and if that depth is exceeded
+        return False, pop out of the recursion, and write a warning
+        to the log, but this is unlikely, suggesting a dependency loop
+        not caught by bitbake.
+        On return, the input/output arg rev_deps is appended with queryset
+        dictionary elements, annotated for use in the customimage template.
+        The list has unsorted, but unique elements.
+        """
+        max_dependency_tree_depth = all_current_packages.count()
+        if tree_level >= max_dependency_tree_depth:
+            logger.warning(
+                "The number of reverse dependencies " 
+                "for this package exceeds " + max_dependency_tree_depth +
+                " and the remaining reverse dependencies will not be removed")
+            return True
+
+        package = CustomImagePackage.objects.get(id=next_package_id)
+        dependents = \
+            package.package_dependencies_target.annotate(
+                name=F('package__name'),
+                pk=F('package__pk'),
+                size=F('package__size'),
+            ).values("name", "pk", "size").exclude(
+                ~Q(pk__in=all_current_packages)
+            )
+
+        for pkg in dependents:
+            if pkg in rev_deps:
+                # already seen, skip dependent search
+                continue
+
+            rev_deps.append(pkg)
+            if (_traverse_dependents(
+                pkg["pk"], rev_deps, all_current_packages, tree_level+1)):
+                return True
+
+        return False
+
+    def _get_all_dependents(package_id, all_current_packages):
+        """
+        Returns sorted list of recursive reverse dependencies for package_id,
+        as a list of dictionary items, by recursing through dependency
+        relationships.
+        """
+        rev_deps = []
+        _traverse_dependents(package_id, rev_deps, all_current_packages)
+        rev_deps = sorted(rev_deps, key=lambda x: x["name"])
+        return rev_deps
 
     @xhr_response
     def xhr_customrecipe_packages(request, recipe_id, package_id):
@@ -2606,15 +2660,9 @@ if True:
                 )
 
                 # Reverse dependencies which are needed by packages that are
-                # in the image
-                reverse_deps = package.package_dependencies_target.annotate(
-                    name=F('package__name'),
-                    pk=F('package__pk'),
-                    size=F('package__size'),
-                ).values("name", "pk", "size").exclude(
-                    ~Q(pk__in=all_current_packages)
-                )
-
+                # in the image. Recursive search providing all dependents,
+                # not just immediate dependents.
+                reverse_deps = _get_all_dependents(package_id, all_current_packages)
                 total_size_deps = 0
                 total_size_reverse_deps = 0
 
@@ -2658,6 +2706,11 @@ if True:
 
             else:
                 recipe.appends_set.add(package)
+                # Make sure that package is not in the excludes set
+                try:
+                    recipe.excludes_set.remove(package)
+                except:
+                    pass
                 # Add the dependencies we think will be added to the recipe
                 # as a result of appending this package.
                 # TODO this should recurse down the entire deps tree
@@ -2668,11 +2721,12 @@ if True:
 
                         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.
+                            # 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
+                            # Don't care if the package had never been excluded
                             pass
                     except:
                         logger.warning("Could not add package's suggested"
@@ -2688,6 +2742,19 @@ if True:
                     recipe.excludes_set.add(package)
                 else:
                     recipe.appends_set.remove(package)
+                all_current_packages = recipe.get_all_packages()
+                reverse_deps_dictlist = _get_all_dependents(package.pk, all_current_packages)
+                ids = [entry['pk'] for entry in reverse_deps_dictlist]
+                reverse_deps = CustomImagePackage.objects.filter(id__in=ids)
+                for r in reverse_deps:
+                    try:
+                        if r.id in included_packages:
+                            recipe.excludes_set.add(r)
+                        else:
+                            recipe.appends_set.remove(r)
+                    except:
+                        pass
+
                 return {"error": "ok"}
             except CustomImageRecipe.DoesNotExist:
                 return {"error": "Tried to remove package that wasn't present"}
-- 
1.9.1



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

* Re: [V2 review-request] show and delete recursive list of reverse dependencies
  2016-03-17 22:01 [V2 review-request] show and delete recursive list of reverse dependencies Dave Lerner
                   ` (2 preceding siblings ...)
  2016-03-17 22:02 ` [V2 PATCH 3/3] toaster: get all dependents for pkg for removal Dave Lerner
@ 2016-03-21 16:52 ` Barros Pena, Belen
  2016-03-21 19:37   ` Lerner, Dave
  3 siblings, 1 reply; 9+ messages in thread
From: Barros Pena, Belen @ 2016-03-21 16:52 UTC (permalink / raw)
  To: Lerner, David M (Wind River), toaster, Smith, Elliot

[-- Attachment #1: Type: text/plain, Size: 5891 bytes --]



On 17/03/2016 22:01, "toaster-bounces@yoctoproject.org on behalf of Dave
Lerner" <toaster-bounces@yoctoproject.org on behalf of
dave.lerner@windriver.com> wrote:

>
>Target Branch: toaster-next master
>Contrib Branch: poky-contrib/dlerner/9121-delete-dependant-package-tree
>Defect: 9121
>Summary: Show and delete recurive list of reverse dependencies

In this version the text of the reverse dependencies dialog seems to be
cut. The first sentence before the list of packages says: "in your image
on libcrypto". The last sentence after the list of packages says: "In
order to remove libcrypto, you must remove as well". So there seems to be
some text missing.


>
>Comment: Version 2 patch set per comments from Belen and Elliot.
>         Only 1/3 and 3/3 patches are changed, but 2/3 is included.
>
>Commit
>------
>c801079 toaster: get all dependants for pkg for removal
>327ada3 toaster: new customise package-remove modal dlg
>7542b8a toaster: show full list of dependants to remove
> 
> .../toaster/toastergui/static/js/customrecipe.js   | 72 +++++++++++++++--
> .../toaster/toastergui/templates/customrecipe.html |  5 +-
> bitbake/lib/toaster/toastergui/views.py            | 91
>+++++++++++++++++++---
> 3 files changed, 148 insertions(+), 20 deletions(-)
>
>
>Test Cases:
>[V2] denotes additional test for version 2, changes per Belen's comments.
>
>SETUP:
>-----
>Start toaster with empty build directory, sstate-cache
>Create a new project, 'myproject'
>Build core-image-sato
>
>CASE Remove dependant package that was part of original base image
>------------------------------------------------------------------
>Create new custom image on core-image-sato, named mysato
>Remove libcrypto
>    Verify that "39 packages will be removed" are reported and that the
>    packages are unique and in alpha order
>    [V2] Verify that the notification shows
>"You have removed libcrypto and its 39 reverse dependencies:
>gst-player-bin, gstreamer1.0-plugins-bad-dtls,
>gstreamer1.0-plugins-bad-meta, gstreamer1.0-plugins-bad-opengl,
>libegl-mesa and 34 more"

When I remove libcrypto, the notification is missing the dependency
information. It says only: "You have removed 1 packages from sato-belen:
libcrypto". The reverse dependencies seem to have been removed though
(they show the 'add package' button and the new number of packages
installed has been reduced by the number of packages removed). I've
attached a screenshot.

>
>Build  mysato
>Click on the All Builds mysato:
>    Verify Images : Packages included field shows 40 packages less than if
>        you look at All Builds | core-image-sato (eg 567 vs 607)
>
>CASE Add back a root dependency (Issue sent in email Mar9)
>----------------------------------------------------------
>Open custom image mysato
>Add libcrypto back
>Build 
>Click All Projects | Custom Images | mysato
>    Verify libcrypto 'looks' added: that the entry shows "remove package"
>
>CASE Test no interference removing from a 2nd custom image in project
>----------------------------------------------------------------------
>New custom-image based on core-image-sato 'myminimal'
>Build it
>Add atk which is dependant on glib-2.0, libffi, libpcre (bash appears but
>this
>is busybox system, so don't think that dependency will apply - maybe bug
>unrelated to this work).
>Build myminimal again.
>Verify that atk, libffi, libpcre, glib-2.0 have files in the file system
>For custom image myminimal, enter libpcre, remove package
>    Verify modal dlg notes libpcre atk and glib-2.0 will be removed Remove
>Build
>    Verify atk, glib2.0 and libpcre are removed.
>
>CASE Test button notifications and banner on removal for package w/
>dependants
>--------------------------------------------------------------------------
>----
>To minimal, add openssl-staticdev which indirectly will bring in libssl
>Build
>Verify that libssl, openssl, openssl-dev are added
>On minimal, enter "openssl" to see a set of matching packages.
>REmove libssl
>    Verify modal dialog reports both the direct and indirect dependants
>        openssl, openssl-dev, and openssl-staticdev, will be removed.


I tested this with openssl (openssl-staticdev was missing from my list).
Adding openssl brought in libssl. When you click remove package for libssl
you get the dialog saying that openssl will be removed as well, but when
you click 'remove all', openssl is not removed: it still shows the 'remove
package' button. However, when I filter the list to show only the packages
added, openssl is not on the list. This was a bit strange, so I've
recorded it so that you will believe me ;) The video is here

https://drive.google.com/file/d/0B1KD45-8S-9FRF8td29abHNrbHc/view?usp=shari
ng

>Click Remove all
>    Verify the buttons for openssl (an others that you see on screen)
>report:
>        "4 packages removed"
>    Verify that the banner says:
>        "You have removed 4 packages from minimal: libssl and it's 3
>dependantso    Verify that buttons transition to Add Package.
>
>[V2] CASE Remove package that has only has 1 dependant
>------------------------------------------------------
>To minimal, add back openssl-staticdev
>Build
>Select openssl-dev and remove the package.
>    Verify that syntax for 1 rev-dep is appropriate on modal dlg.
>    Remove the 2 packages
>    Verify that syntax for 1 reverse dependency on main page notifiation.

Same problem with this one: removing openssl-dev doesn't seem to remove
openssl-staticdev. But when I search again for openssl-staticdev, the
button has been updated and changed 'add package'.

Cheers

Belén

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


[-- Attachment #2: incomplete-msg.png --]
[-- Type: image/png, Size: 126776 bytes --]

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

* Re: [V2 review-request] show and delete recursive list of reverse dependencies
  2016-03-21 16:52 ` [V2 review-request] show and delete recursive list of reverse dependencies Barros Pena, Belen
@ 2016-03-21 19:37   ` Lerner, Dave
  2016-03-21 20:06     ` Smith, Elliot
  0 siblings, 1 reply; 9+ messages in thread
From: Lerner, Dave @ 2016-03-21 19:37 UTC (permalink / raw)
  To: BARROS PENA, BELEN, toaster, SMITH, ELLIOT

[-- Attachment #1: Type: text/plain, Size: 7907 bytes --]

Hi Belen,
Sorry you had problems.  Are you certain that you applied all 3 patches?  Your results indicate that the customrecipe.js was not replaced with the new v2 patch that was part of the 4-part email (3 patches and  the v2 of the review request).

As the attached 3 jpgs indicate,  I get the expected results, verified just now  by doing the following:
- checked-out my local dlerner/9121-delete-dependent-package-tree branch again, 
 - wiped out the build and poky/_toaster* poky/_meta* directories, 
- rebuilt core-image-sato and customized it 
- looked at openssl on a remove package and it looked fine, jpg attched
- customised core-image-minimal 
- added atk
- looked at remove libprce and it looks fine, jpg attached.

Here is how I verified that the email and the poky-contrib branch are correct.
- I saved the patches 0001,2,3 from the emails that I sent
- then I diff'd those against a new set of formatted patches and the diffs matched (except for manual insertions of the V2)
- then, just to make sure that the format-patch command wasn't goofed up (in my script) I ran 'patch -R --dry-run -p1 ' on each of the patches and they applied cleanly.

My poky-contrib branch was force-updated and I get this today:
toaster> git status
On branch dlerner/9121-delete-dependent-package-tree
Your branch is up-to-date with 'poky-contrib/dlerner/9121-delete-dependent-package-tree'.

It's been sufficiently long since my original commits that I may need to rebase against toaster-next. I was reluctant to rebase to toaster-next last week after  I heard at the Wednesday conference call that toaster-next hung on a build. That seems to have been fixed so if you want a V3 rebased, let me know.
- Dave

________________________________________
From: Barros Pena, Belen [belen.barros.pena@intel.com]
Sent: Monday, March 21, 2016 11:52 AM
To: Lerner, Dave; toaster@yoctoproject.org; SMITH, ELLIOT
Subject: Re: [Toaster] [V2 review-request] show and delete recursive list of reverse dependencies

On 17/03/2016 22:01, "toaster-bounces@yoctoproject.org on behalf of Dave
Lerner" <toaster-bounces@yoctoproject.org on behalf of
dave.lerner@windriver.com> wrote:

>
>Target Branch: toaster-next master
>Contrib Branch: poky-contrib/dlerner/9121-delete-dependant-package-tree
>Defect: 9121
>Summary: Show and delete recurive list of reverse dependencies

In this version the text of the reverse dependencies dialog seems to be
cut. The first sentence before the list of packages says: "in your image
on libcrypto". The last sentence after the list of packages says: "In
order to remove libcrypto, you must remove as well". So there seems to be
some text missing.
>
>Comment: Version 2 patch set per comments from Belen and Elliot.
>         Only 1/3 and 3/3 patches are changed, but 2/3 is included.
>
>Commit
>------
>c801079 toaster: get all dependants for pkg for removal
>327ada3 toaster: new customise package-remove modal dlg
>7542b8a toaster: show full list of dependants to remove
>
> .../toaster/toastergui/static/js/customrecipe.js   | 72 +++++++++++++++--
> .../toaster/toastergui/templates/customrecipe.html |  5 +-
> bitbake/lib/toaster/toastergui/views.py            | 91
>+++++++++++++++++++---
> 3 files changed, 148 insertions(+), 20 deletions(-)
>
>
>Test Cases:
>[V2] denotes additional test for version 2, changes per Belen's comments.
>
>SETUP:
>-----
>Start toaster with empty build directory, sstate-cache
>Create a new project, 'myproject'
>Build core-image-sato
>
>CASE Remove dependant package that was part of original base image
>------------------------------------------------------------------
>Create new custom image on core-image-sato, named mysato
>Remove libcrypto
>    Verify that "39 packages will be removed" are reported and that the
>    packages are unique and in alpha order
>    [V2] Verify that the notification shows
>"You have removed libcrypto and its 39 reverse dependencies:
>gst-player-bin, gstreamer1.0-plugins-bad-dtls,
>gstreamer1.0-plugins-bad-meta, gstreamer1.0-plugins-bad-opengl,
>libegl-mesa and 34 more"

When I remove libcrypto, the notification is missing the dependency
information. It says only: "You have removed 1 packages from sato-belen:
libcrypto". The reverse dependencies seem to have been removed though
(they show the 'add package' button and the new number of packages
installed has been reduced by the number of packages removed). I've
attached a screenshot.

>
>Build  mysato
>Click on the All Builds mysato:
>    Verify Images : Packages included field shows 40 packages less than if
>        you look at All Builds | core-image-sato (eg 567 vs 607)
>
>CASE Add back a root dependency (Issue sent in email Mar9)
>----------------------------------------------------------
>Open custom image mysato
>Add libcrypto back
>Build
>Click All Projects | Custom Images | mysato
>    Verify libcrypto 'looks' added: that the entry shows "remove package"
>
>CASE Test no interference removing from a 2nd custom image in project
>----------------------------------------------------------------------
>New custom-image based on core-image-sato 'myminimal'
>Build it
>Add atk which is dependant on glib-2.0, libffi, libpcre (bash appears but
>this
>is busybox system, so don't think that dependency will apply - maybe bug
>unrelated to this work).
>Build myminimal again.
>Verify that atk, libffi, libpcre, glib-2.0 have files in the file system
>For custom image myminimal, enter libpcre, remove package
>    Verify modal dlg notes libpcre atk and glib-2.0 will be removed Remove
>Build
>    Verify atk, glib2.0 and libpcre are removed.
>
>CASE Test button notifications and banner on removal for package w/
>dependants
>--------------------------------------------------------------------------
>----
>To minimal, add openssl-staticdev which indirectly will bring in libssl
>Build
>Verify that libssl, openssl, openssl-dev are added
>On minimal, enter "openssl" to see a set of matching packages.
>REmove libssl
>    Verify modal dialog reports both the direct and indirect dependants
>        openssl, openssl-dev, and openssl-staticdev, will be removed.


I tested this with openssl (openssl-staticdev was missing from my list).
Adding openssl brought in libssl. When you click remove package for libssl
you get the dialog saying that openssl will be removed as well, but when
you click 'remove all', openssl is not removed: it still shows the 'remove
package' button. However, when I filter the list to show only the packages
added, openssl is not on the list. This was a bit strange, so I've
recorded it so that you will believe me ;) The video is here

https://drive.google.com/file/d/0B1KD45-8S-9FRF8td29abHNrbHc/view?usp=shari
ng

>Click Remove all
>    Verify the buttons for openssl (an others that you see on screen)
>report:
>        "4 packages removed"
>    Verify that the banner says:
>        "You have removed 4 packages from minimal: libssl and it's 3
>dependantso    Verify that buttons transition to Add Package.
>
>[V2] CASE Remove package that has only has 1 dependant
>------------------------------------------------------
>To minimal, add back openssl-staticdev
>Build
>Select openssl-dev and remove the package.
>    Verify that syntax for 1 rev-dep is appropriate on modal dlg.
>    Remove the 2 packages
>    Verify that syntax for 1 reverse dependency on main page notifiation.

Same problem with this one: removing openssl-dev doesn't seem to remove
openssl-staticdev. But when I search again for openssl-staticdev, the
button has been updated and changed 'add package'.

Cheers

Belén

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


[-- Attachment #2: sato-removing-openssl.png --]
[-- Type: image/png, Size: 49400 bytes --]

[-- Attachment #3: libpcre.png --]
[-- Type: image/png, Size: 29185 bytes --]

[-- Attachment #4: banner.png --]
[-- Type: image/png, Size: 18375 bytes --]

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

* Re: [V2 review-request] show and delete recursive list of reverse dependencies
  2016-03-21 19:37   ` Lerner, Dave
@ 2016-03-21 20:06     ` Smith, Elliot
  2016-03-21 20:19       ` Lerner, Dave
  0 siblings, 1 reply; 9+ messages in thread
From: Smith, Elliot @ 2016-03-21 20:06 UTC (permalink / raw)
  To: Lerner, David M (Wind River); +Cc: toaster

[-- Attachment #1: Type: text/plain, Size: 9140 bytes --]

Hi Dave.

On 21 March 2016 at 19:37, Lerner, David M (Wind River) <
dave.lerner@windriver.com> wrote:

> Sorry you had problems.  Are you certain that you applied all 3 patches?
> Your results indicate that the customrecipe.js was not replaced with the
> new v2 patch that was part of the 4-part email (3 patches and  the v2 of
> the review request).
>

I checked out your branch and used that, rather than putting the patches on
top of toaster-next. (As you pointed out, it needs rebasing, but I didn't
do that.)

I managed to follow the instructions in your cover letter and got the
results you outlined (though for some reason my sato has 608 packages, not
607, and mysato has 568).

So it does seem to work correctly for me.

Belen, if you are putting Dave's patches on top of toaster-next, that might
be causing your problem (I don't think you mentioned how you were testing).

Dave, if you rebase on toaster-next, I am happy to give it another try
tomorrow and do another code review.

Thanks.
Elliot



>
> As the attached 3 jpgs indicate,  I get the expected results, verified
> just now  by doing the following:
> - checked-out my local dlerner/9121-delete-dependent-package-tree branch
> again,
>  - wiped out the build and poky/_toaster* poky/_meta* directories,
> - rebuilt core-image-sato and customized it
> - looked at openssl on a remove package and it looked fine, jpg attched
> - customised core-image-minimal
> - added atk
> - looked at remove libprce and it looks fine, jpg attached.
>
> Here is how I verified that the email and the poky-contrib branch are
> correct.
> - I saved the patches 0001,2,3 from the emails that I sent
> - then I diff'd those against a new set of formatted patches and the diffs
> matched (except for manual insertions of the V2)
> - then, just to make sure that the format-patch command wasn't goofed up
> (in my script) I ran 'patch -R --dry-run -p1 ' on each of the patches and
> they applied cleanly.
>
> My poky-contrib branch was force-updated and I get this today:
> toaster> git status
> On branch dlerner/9121-delete-dependent-package-tree
> Your branch is up-to-date with
> 'poky-contrib/dlerner/9121-delete-dependent-package-tree'.
>
> It's been sufficiently long since my original commits that I may need to
> rebase against toaster-next. I was reluctant to rebase to toaster-next last
> week after  I heard at the Wednesday conference call that toaster-next hung
> on a build. That seems to have been fixed so if you want a V3 rebased, let
> me know.
> - Dave
>
> ________________________________________
> From: Barros Pena, Belen [belen.barros.pena@intel.com]
> Sent: Monday, March 21, 2016 11:52 AM
> To: Lerner, Dave; toaster@yoctoproject.org; SMITH, ELLIOT
> Subject: Re: [Toaster] [V2 review-request] show and delete recursive list
> of reverse dependencies
>
> On 17/03/2016 22:01, "toaster-bounces@yoctoproject.org on behalf of Dave
> Lerner" <toaster-bounces@yoctoproject.org on behalf of
> dave.lerner@windriver.com> wrote:
>
> >
> >Target Branch: toaster-next master
> >Contrib Branch: poky-contrib/dlerner/9121-delete-dependant-package-tree
> >Defect: 9121
> >Summary: Show and delete recurive list of reverse dependencies
>
> In this version the text of the reverse dependencies dialog seems to be
> cut. The first sentence before the list of packages says: "in your image
> on libcrypto". The last sentence after the list of packages says: "In
> order to remove libcrypto, you must remove as well". So there seems to be
> some text missing.
> >
> >Comment: Version 2 patch set per comments from Belen and Elliot.
> >         Only 1/3 and 3/3 patches are changed, but 2/3 is included.
> >
> >Commit
> >------
> >c801079 toaster: get all dependants for pkg for removal
> >327ada3 toaster: new customise package-remove modal dlg
> >7542b8a toaster: show full list of dependants to remove
> >
> > .../toaster/toastergui/static/js/customrecipe.js   | 72 +++++++++++++++--
> > .../toaster/toastergui/templates/customrecipe.html |  5 +-
> > bitbake/lib/toaster/toastergui/views.py            | 91
> >+++++++++++++++++++---
> > 3 files changed, 148 insertions(+), 20 deletions(-)
> >
> >
> >Test Cases:
> >[V2] denotes additional test for version 2, changes per Belen's comments.
> >
> >SETUP:
> >-----
> >Start toaster with empty build directory, sstate-cache
> >Create a new project, 'myproject'
> >Build core-image-sato
> >
> >CASE Remove dependant package that was part of original base image
> >------------------------------------------------------------------
> >Create new custom image on core-image-sato, named mysato
> >Remove libcrypto
> >    Verify that "39 packages will be removed" are reported and that the
> >    packages are unique and in alpha order
> >    [V2] Verify that the notification shows
> >"You have removed libcrypto and its 39 reverse dependencies:
> >gst-player-bin, gstreamer1.0-plugins-bad-dtls,
> >gstreamer1.0-plugins-bad-meta, gstreamer1.0-plugins-bad-opengl,
> >libegl-mesa and 34 more"
>
> When I remove libcrypto, the notification is missing the dependency
> information. It says only: "You have removed 1 packages from sato-belen:
> libcrypto". The reverse dependencies seem to have been removed though
> (they show the 'add package' button and the new number of packages
> installed has been reduced by the number of packages removed). I've
> attached a screenshot.
>
> >
> >Build  mysato
> >Click on the All Builds mysato:
> >    Verify Images : Packages included field shows 40 packages less than if
> >        you look at All Builds | core-image-sato (eg 567 vs 607)
> >
> >CASE Add back a root dependency (Issue sent in email Mar9)
> >----------------------------------------------------------
> >Open custom image mysato
> >Add libcrypto back
> >Build
> >Click All Projects | Custom Images | mysato
> >    Verify libcrypto 'looks' added: that the entry shows "remove package"
> >
> >CASE Test no interference removing from a 2nd custom image in project
> >----------------------------------------------------------------------
> >New custom-image based on core-image-sato 'myminimal'
> >Build it
> >Add atk which is dependant on glib-2.0, libffi, libpcre (bash appears but
> >this
> >is busybox system, so don't think that dependency will apply - maybe bug
> >unrelated to this work).
> >Build myminimal again.
> >Verify that atk, libffi, libpcre, glib-2.0 have files in the file system
> >For custom image myminimal, enter libpcre, remove package
> >    Verify modal dlg notes libpcre atk and glib-2.0 will be removed Remove
> >Build
> >    Verify atk, glib2.0 and libpcre are removed.
> >
> >CASE Test button notifications and banner on removal for package w/
> >dependants
> >--------------------------------------------------------------------------
> >----
> >To minimal, add openssl-staticdev which indirectly will bring in libssl
> >Build
> >Verify that libssl, openssl, openssl-dev are added
> >On minimal, enter "openssl" to see a set of matching packages.
> >REmove libssl
> >    Verify modal dialog reports both the direct and indirect dependants
> >        openssl, openssl-dev, and openssl-staticdev, will be removed.
>
>
> I tested this with openssl (openssl-staticdev was missing from my list).
> Adding openssl brought in libssl. When you click remove package for libssl
> you get the dialog saying that openssl will be removed as well, but when
> you click 'remove all', openssl is not removed: it still shows the 'remove
> package' button. However, when I filter the list to show only the packages
> added, openssl is not on the list. This was a bit strange, so I've
> recorded it so that you will believe me ;) The video is here
>
> https://drive.google.com/file/d/0B1KD45-8S-9FRF8td29abHNrbHc/view?usp=shari
> ng
>
> >Click Remove all
> >    Verify the buttons for openssl (an others that you see on screen)
> >report:
> >        "4 packages removed"
> >    Verify that the banner says:
> >        "You have removed 4 packages from minimal: libssl and it's 3
> >dependantso    Verify that buttons transition to Add Package.
> >
> >[V2] CASE Remove package that has only has 1 dependant
> >------------------------------------------------------
> >To minimal, add back openssl-staticdev
> >Build
> >Select openssl-dev and remove the package.
> >    Verify that syntax for 1 rev-dep is appropriate on modal dlg.
> >    Remove the 2 packages
> >    Verify that syntax for 1 reverse dependency on main page notifiation.
>
> Same problem with this one: removing openssl-dev doesn't seem to remove
> openssl-staticdev. But when I search again for openssl-staticdev, the
> button has been updated and changed 'add package'.
>
> Cheers
>
> Belén
>
> >
> >--
> >_______________________________________________
> >toaster mailing list
> >toaster@yoctoproject.org
> >https://lists.yoctoproject.org/listinfo/toaster
>
>


-- 
Elliot Smith
Software Engineer
Intel Open Source Technology Centre

[-- Attachment #2: Type: text/html, Size: 11293 bytes --]

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

* Re: [V2 review-request] show and delete recursive list of reverse dependencies
  2016-03-21 20:06     ` Smith, Elliot
@ 2016-03-21 20:19       ` Lerner, Dave
  2016-03-22 10:27         ` Barros Pena, Belen
  0 siblings, 1 reply; 9+ messages in thread
From: Lerner, Dave @ 2016-03-21 20:19 UTC (permalink / raw)
  To: SMITH, ELLIOT; +Cc: toaster

Belen, Elliot,
I will rebase on toaster-next and send out a V3 set.
All patches will be marked V3.  
-Dave

> -----Original Message-----
> From: Smith, Elliot [mailto:elliot.smith@intel.com]
> Sent: Monday, March 21, 2016 3:07 PM
> To: Lerner, Dave
> Cc: BARROS PENA, BELEN; toaster@yoctoproject.org
> Subject: Re: [Toaster] [V2 review-request] show and delete recursive list of reverse
> dependencies
> 
> Hi Dave.
> 
> 
> On 21 March 2016 at 19:37, Lerner, David M (Wind River) <dave.lerner@windriver.com>
> wrote:
> 
> 
> 	Sorry you had problems.  Are you certain that you applied all 3 patches?  Your
> results indicate that the customrecipe.js was not replaced with the new v2 patch that
> was part of the 4-part email (3 patches and  the v2 of the review request).
> 
> 
> 
> I checked out your branch and used that, rather than putting the patches on top of
> toaster-next. (As you pointed out, it needs rebasing, but I didn't do that.)
> 
> I managed to follow the instructions in your cover letter and got the results you
> outlined (though for some reason my sato has 608 packages, not 607, and mysato has 568).
> 
> So it does seem to work correctly for me.
> 
> Belen, if you are putting Dave's patches on top of toaster-next, that might be causing
> your problem (I don't think you mentioned how you were testing).
> 
> Dave, if you rebase on toaster-next, I am happy to give it another try tomorrow and do
> another code review.
> 
> Thanks.
> Elliot
> 
> 
> 
> 
> 	As the attached 3 jpgs indicate,  I get the expected results, verified just now  by
> doing the following:
> 	- checked-out my local dlerner/9121-delete-dependent-package-tree branch again,
> 	 - wiped out the build and poky/_toaster* poky/_meta* directories,
> 	- rebuilt core-image-sato and customized it
> 	- looked at openssl on a remove package and it looked fine, jpg attched
> 	- customised core-image-minimal
> 	- added atk
> 	- looked at remove libprce and it looks fine, jpg attached.
> 
> 	Here is how I verified that the email and the poky-contrib branch are correct.
> 	- I saved the patches 0001,2,3 from the emails that I sent
> 	- then I diff'd those against a new set of formatted patches and the diffs matched
> (except for manual insertions of the V2)
> 	- then, just to make sure that the format-patch command wasn't goofed up (in my
> script) I ran 'patch -R --dry-run -p1 ' on each of the patches and they applied cleanly.
> 
> 	My poky-contrib branch was force-updated and I get this today:
> 	toaster> git status
> 	On branch dlerner/9121-delete-dependent-package-tree
> 	Your branch is up-to-date with 'poky-contrib/dlerner/9121-delete-dependent-package-
> tree'.
> 
> 	It's been sufficiently long since my original commits that I may need to rebase
> against toaster-next. I was reluctant to rebase to toaster-next last week after  I heard
> at the Wednesday conference call that toaster-next hung on a build. That seems to have
> been fixed so if you want a V3 rebased, let me know.
> 	- Dave
> 
> 	________________________________________
> 	From: Barros Pena, Belen [belen.barros.pena@intel.com]
> 	Sent: Monday, March 21, 2016 11:52 AM
> 	To: Lerner, Dave; toaster@yoctoproject.org; SMITH, ELLIOT
> 	Subject: Re: [Toaster] [V2 review-request] show and delete recursive list of
> reverse dependencies
> 
> 
> 	On 17/03/2016 22:01, "toaster-bounces@yoctoproject.org on behalf of Dave
> 	Lerner" <toaster-bounces@yoctoproject.org on behalf of
> 	dave.lerner@windriver.com> wrote:
> 
> 	>
> 	>Target Branch: toaster-next master
> 	>Contrib Branch: poky-contrib/dlerner/9121-delete-dependant-package-tree
> 	>Defect: 9121
> 	>Summary: Show and delete recurive list of reverse dependencies
> 
> 	In this version the text of the reverse dependencies dialog seems to be
> 	cut. The first sentence before the list of packages says: "in your image
> 	on libcrypto". The last sentence after the list of packages says: "In
> 	order to remove libcrypto, you must remove as well". So there seems to be
> 	some text missing.
> 	>
> 	>Comment: Version 2 patch set per comments from Belen and Elliot.
> 	>         Only 1/3 and 3/3 patches are changed, but 2/3 is included.
> 	>
> 	>Commit
> 	>------
> 	>c801079 toaster: get all dependants for pkg for removal
> 	>327ada3 toaster: new customise package-remove modal dlg
> 	>7542b8a toaster: show full list of dependants to remove
> 	>
> 	> .../toaster/toastergui/static/js/customrecipe.js   | 72 +++++++++++++++--
> 	> .../toaster/toastergui/templates/customrecipe.html |  5 +-
> 	> bitbake/lib/toaster/toastergui/views.py            | 91
> 	>+++++++++++++++++++---
> 	> 3 files changed, 148 insertions(+), 20 deletions(-)
> 	>
> 	>
> 	>Test Cases:
> 	>[V2] denotes additional test for version 2, changes per Belen's comments.
> 	>
> 	>SETUP:
> 	>-----
> 	>Start toaster with empty build directory, sstate-cache
> 	>Create a new project, 'myproject'
> 	>Build core-image-sato
> 	>
> 	>CASE Remove dependant package that was part of original base image
> 	>------------------------------------------------------------------
> 	>Create new custom image on core-image-sato, named mysato
> 	>Remove libcrypto
> 	>    Verify that "39 packages will be removed" are reported and that the
> 	>    packages are unique and in alpha order
> 	>    [V2] Verify that the notification shows
> 	>"You have removed libcrypto and its 39 reverse dependencies:
> 	>gst-player-bin, gstreamer1.0-plugins-bad-dtls,
> 	>gstreamer1.0-plugins-bad-meta, gstreamer1.0-plugins-bad-opengl,
> 	>libegl-mesa and 34 more"
> 
> 	When I remove libcrypto, the notification is missing the dependency
> 	information. It says only: "You have removed 1 packages from sato-belen:
> 	libcrypto". The reverse dependencies seem to have been removed though
> 	(they show the 'add package' button and the new number of packages
> 	installed has been reduced by the number of packages removed). I've
> 	attached a screenshot.
> 
> 	>
> 	>Build  mysato
> 	>Click on the All Builds mysato:
> 	>    Verify Images : Packages included field shows 40 packages less than if
> 	>        you look at All Builds | core-image-sato (eg 567 vs 607)
> 	>
> 	>CASE Add back a root dependency (Issue sent in email Mar9)
> 	>----------------------------------------------------------
> 	>Open custom image mysato
> 	>Add libcrypto back
> 	>Build
> 	>Click All Projects | Custom Images | mysato
> 	>    Verify libcrypto 'looks' added: that the entry shows "remove package"
> 	>
> 	>CASE Test no interference removing from a 2nd custom image in project
> 	>----------------------------------------------------------------------
> 	>New custom-image based on core-image-sato 'myminimal'
> 	>Build it
> 	>Add atk which is dependant on glib-2.0, libffi, libpcre (bash appears but
> 	>this
> 	>is busybox system, so don't think that dependency will apply - maybe bug
> 	>unrelated to this work).
> 	>Build myminimal again.
> 	>Verify that atk, libffi, libpcre, glib-2.0 have files in the file system
> 	>For custom image myminimal, enter libpcre, remove package
> 	>    Verify modal dlg notes libpcre atk and glib-2.0 will be removed Remove
> 	>Build
> 	>    Verify atk, glib2.0 and libpcre are removed.
> 	>
> 	>CASE Test button notifications and banner on removal for package w/
> 	>dependants
> 	>--------------------------------------------------------------------------
> 	>----
> 	>To minimal, add openssl-staticdev which indirectly will bring in libssl
> 	>Build
> 	>Verify that libssl, openssl, openssl-dev are added
> 	>On minimal, enter "openssl" to see a set of matching packages.
> 	>REmove libssl
> 	>    Verify modal dialog reports both the direct and indirect dependants
> 	>        openssl, openssl-dev, and openssl-staticdev, will be removed.
> 
> 
> 	I tested this with openssl (openssl-staticdev was missing from my list).
> 	Adding openssl brought in libssl. When you click remove package for libssl
> 	you get the dialog saying that openssl will be removed as well, but when
> 	you click 'remove all', openssl is not removed: it still shows the 'remove
> 	package' button. However, when I filter the list to show only the packages
> 	added, openssl is not on the list. This was a bit strange, so I've
> 	recorded it so that you will believe me ;) The video is here
> 
> 	https://drive.google.com/file/d/0B1KD45-8S-9FRF8td29abHNrbHc/view?usp=shari
> 	ng
> 
> 	>Click Remove all
> 	>    Verify the buttons for openssl (an others that you see on screen)
> 	>report:
> 	>        "4 packages removed"
> 	>    Verify that the banner says:
> 	>        "You have removed 4 packages from minimal: libssl and it's 3
> 	>dependantso    Verify that buttons transition to Add Package.
> 	>
> 	>[V2] CASE Remove package that has only has 1 dependant
> 	>------------------------------------------------------
> 	>To minimal, add back openssl-staticdev
> 	>Build
> 	>Select openssl-dev and remove the package.
> 	>    Verify that syntax for 1 rev-dep is appropriate on modal dlg.
> 	>    Remove the 2 packages
> 	>    Verify that syntax for 1 reverse dependency on main page notifiation.
> 
> 	Same problem with this one: removing openssl-dev doesn't seem to remove
> 	openssl-staticdev. But when I search again for openssl-staticdev, the
> 	button has been updated and changed 'add package'.
> 
> 	Cheers
> 
> 	Belén
> 
> 	>
> 	>--
> 	>_______________________________________________
> 	>toaster mailing list
> 	>toaster@yoctoproject.org
> 	>https://lists.yoctoproject.org/listinfo/toaster
> 
> 
> 
> 
> 
> 
> --
> 
> Elliot Smith
> Software Engineer
> Intel Open Source Technology Centre

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

* Re: [V2 review-request] show and delete recursive list of reverse dependencies
  2016-03-21 20:19       ` Lerner, Dave
@ 2016-03-22 10:27         ` Barros Pena, Belen
  0 siblings, 0 replies; 9+ messages in thread
From: Barros Pena, Belen @ 2016-03-22 10:27 UTC (permalink / raw)
  To: Lerner, David M (Wind River), Smith, Elliot; +Cc: toaster



On 21/03/2016 20:19, "Lerner, Dave" <dave.lerner@windriver.com> wrote:

>Belen, Elliot,
>I will rebase on toaster-next and send out a V3 set.
>All patches will be marked V3.

Thanks, Dave. Just for the record, to test I checked out this branch

dlerner/9121-delete-dependent-package-tree


Now, I must have done something wrong, since it's working for the 2 of
you. I'll try again when v3 comes.

Cheers

Belén

>-Dave
>
>> -----Original Message-----
>> From: Smith, Elliot [mailto:elliot.smith@intel.com]
>> Sent: Monday, March 21, 2016 3:07 PM
>> To: Lerner, Dave
>> Cc: BARROS PENA, BELEN; toaster@yoctoproject.org
>> Subject: Re: [Toaster] [V2 review-request] show and delete recursive
>>list of reverse
>> dependencies
>>
>> Hi Dave.
>>
>>
>> On 21 March 2016 at 19:37, Lerner, David M (Wind River)
>><dave.lerner@windriver.com>
>> wrote:
>>
>>
>>       Sorry you had problems.  Are you certain that you applied all 3
>>patches?  Your
>> results indicate that the customrecipe.js was not replaced with the new
>>v2 patch that
>> was part of the 4-part email (3 patches and  the v2 of the review
>>request).
>>
>>
>>
>> I checked out your branch and used that, rather than putting the
>>patches on top of
>> toaster-next. (As you pointed out, it needs rebasing, but I didn't do
>>that.)
>>
>> I managed to follow the instructions in your cover letter and got the
>>results you
>> outlined (though for some reason my sato has 608 packages, not 607, and
>>mysato has 568).
>>
>> So it does seem to work correctly for me.
>>
>> Belen, if you are putting Dave's patches on top of toaster-next, that
>>might be causing
>> your problem (I don't think you mentioned how you were testing).
>>
>> Dave, if you rebase on toaster-next, I am happy to give it another try
>>tomorrow and do
>> another code review.
>>
>> Thanks.
>> Elliot
>>
>>
>>
>>
>>       As the attached 3 jpgs indicate,  I get the expected results,
>>verified just now  by
>> doing the following:
>>       - checked-out my local dlerner/9121-delete-dependent-package-tree
>>branch again,
>>        - wiped out the build and poky/_toaster* poky/_meta* directories,
>>       - rebuilt core-image-sato and customized it
>>       - looked at openssl on a remove package and it looked fine, jpg
>>attched
>>       - customised core-image-minimal
>>       - added atk
>>       - looked at remove libprce and it looks fine, jpg attached.
>>
>>       Here is how I verified that the email and the poky-contrib branch
>>are correct.
>>       - I saved the patches 0001,2,3 from the emails that I sent
>>       - then I diff'd those against a new set of formatted patches and
>>the diffs matched
>> (except for manual insertions of the V2)
>>       - then, just to make sure that the format-patch command wasn't
>>goofed up (in my
>> script) I ran 'patch -R --dry-run -p1 ' on each of the patches and they
>>applied cleanly.
>>
>>       My poky-contrib branch was force-updated and I get this today:
>>       toaster> git status
>>       On branch dlerner/9121-delete-dependent-package-tree
>>       Your branch is up-to-date with
>>'poky-contrib/dlerner/9121-delete-dependent-package-
>> tree'.
>>
>>       It's been sufficiently long since my original commits that I may
>>need to rebase
>> against toaster-next. I was reluctant to rebase to toaster-next last
>>week after  I heard
>> at the Wednesday conference call that toaster-next hung on a build.
>>That seems to have
>> been fixed so if you want a V3 rebased, let me know.
>>       - Dave
>>
>>       ________________________________________
>>       From: Barros Pena, Belen [belen.barros.pena@intel.com]
>>       Sent: Monday, March 21, 2016 11:52 AM
>>       To: Lerner, Dave; toaster@yoctoproject.org; SMITH, ELLIOT
>>       Subject: Re: [Toaster] [V2 review-request] show and delete
>>recursive list of
>> reverse dependencies
>>
>>
>>       On 17/03/2016 22:01, "toaster-bounces@yoctoproject.org on behalf
>>of Dave
>>       Lerner" <toaster-bounces@yoctoproject.org on behalf of
>>       dave.lerner@windriver.com> wrote:
>>
>>       >
>>       >Target Branch: toaster-next master
>>       >Contrib Branch:
>>poky-contrib/dlerner/9121-delete-dependant-package-tree
>>       >Defect: 9121
>>       >Summary: Show and delete recurive list of reverse dependencies
>>
>>       In this version the text of the reverse dependencies dialog seems
>>to be
>>       cut. The first sentence before the list of packages says: "in
>>your image
>>       on libcrypto". The last sentence after the list of packages says:
>>"In
>>       order to remove libcrypto, you must remove as well". So there
>>seems to be
>>       some text missing.
>>       >
>>       >Comment: Version 2 patch set per comments from Belen and Elliot.
>>       >         Only 1/3 and 3/3 patches are changed, but 2/3 is
>>included.
>>       >
>>       >Commit
>>       >------
>>       >c801079 toaster: get all dependants for pkg for removal
>>       >327ada3 toaster: new customise package-remove modal dlg
>>       >7542b8a toaster: show full list of dependants to remove
>>       >
>>       > .../toaster/toastergui/static/js/customrecipe.js   | 72
>>+++++++++++++++--
>>       > .../toaster/toastergui/templates/customrecipe.html |  5 +-
>>       > bitbake/lib/toaster/toastergui/views.py            | 91
>>       >+++++++++++++++++++---
>>       > 3 files changed, 148 insertions(+), 20 deletions(-)
>>       >
>>       >
>>       >Test Cases:
>>       >[V2] denotes additional test for version 2, changes per Belen's
>>comments.
>>       >
>>       >SETUP:
>>       >-----
>>       >Start toaster with empty build directory, sstate-cache
>>       >Create a new project, 'myproject'
>>       >Build core-image-sato
>>       >
>>       >CASE Remove dependant package that was part of original base
>>image
>>       
>>>------------------------------------------------------------------
>>       >Create new custom image on core-image-sato, named mysato
>>       >Remove libcrypto
>>       >    Verify that "39 packages will be removed" are reported and
>>that the
>>       >    packages are unique and in alpha order
>>       >    [V2] Verify that the notification shows
>>       >"You have removed libcrypto and its 39 reverse dependencies:
>>       >gst-player-bin, gstreamer1.0-plugins-bad-dtls,
>>       >gstreamer1.0-plugins-bad-meta, gstreamer1.0-plugins-bad-opengl,
>>       >libegl-mesa and 34 more"
>>
>>       When I remove libcrypto, the notification is missing the
>>dependency
>>       information. It says only: "You have removed 1 packages from
>>sato-belen:
>>       libcrypto". The reverse dependencies seem to have been removed
>>though
>>       (they show the 'add package' button and the new number of packages
>>       installed has been reduced by the number of packages removed).
>>I've
>>       attached a screenshot.
>>
>>       >
>>       >Build  mysato
>>       >Click on the All Builds mysato:
>>       >    Verify Images : Packages included field shows 40 packages
>>less than if
>>       >        you look at All Builds | core-image-sato (eg 567 vs 607)
>>       >
>>       >CASE Add back a root dependency (Issue sent in email Mar9)
>>       >----------------------------------------------------------
>>       >Open custom image mysato
>>       >Add libcrypto back
>>       >Build
>>       >Click All Projects | Custom Images | mysato
>>       >    Verify libcrypto 'looks' added: that the entry shows "remove
>>package"
>>       >
>>       >CASE Test no interference removing from a 2nd custom image in
>>project
>>       
>>>----------------------------------------------------------------------
>>       >New custom-image based on core-image-sato 'myminimal'
>>       >Build it
>>       >Add atk which is dependant on glib-2.0, libffi, libpcre (bash
>>appears but
>>       >this
>>       >is busybox system, so don't think that dependency will apply -
>>maybe bug
>>       >unrelated to this work).
>>       >Build myminimal again.
>>       >Verify that atk, libffi, libpcre, glib-2.0 have files in the
>>file system
>>       >For custom image myminimal, enter libpcre, remove package
>>       >    Verify modal dlg notes libpcre atk and glib-2.0 will be
>>removed Remove
>>       >Build
>>       >    Verify atk, glib2.0 and libpcre are removed.
>>       >
>>       >CASE Test button notifications and banner on removal for package
>>w/
>>       >dependants
>>       
>>>------------------------------------------------------------------------
>>>--
>>       >----
>>       >To minimal, add openssl-staticdev which indirectly will bring in
>>libssl
>>       >Build
>>       >Verify that libssl, openssl, openssl-dev are added
>>       >On minimal, enter "openssl" to see a set of matching packages.
>>       >REmove libssl
>>       >    Verify modal dialog reports both the direct and indirect
>>dependants
>>       >        openssl, openssl-dev, and openssl-staticdev, will be
>>removed.
>>
>>
>>       I tested this with openssl (openssl-staticdev was missing from my
>>list).
>>       Adding openssl brought in libssl. When you click remove package
>>for libssl
>>       you get the dialog saying that openssl will be removed as well,
>>but when
>>       you click 'remove all', openssl is not removed: it still shows
>>the 'remove
>>       package' button. However, when I filter the list to show only the
>>packages
>>       added, openssl is not on the list. This was a bit strange, so I've
>>       recorded it so that you will believe me ;) The video is here
>>
>>       
>>https://drive.google.com/file/d/0B1KD45-8S-9FRF8td29abHNrbHc/view?usp=sha
>>ri
>>       ng
>>
>>       >Click Remove all
>>       >    Verify the buttons for openssl (an others that you see on
>>screen)
>>       >report:
>>       >        "4 packages removed"
>>       >    Verify that the banner says:
>>       >        "You have removed 4 packages from minimal: libssl and
>>it's 3
>>       >dependantso    Verify that buttons transition to Add Package.
>>       >
>>       >[V2] CASE Remove package that has only has 1 dependant
>>       >------------------------------------------------------
>>       >To minimal, add back openssl-staticdev
>>       >Build
>>       >Select openssl-dev and remove the package.
>>       >    Verify that syntax for 1 rev-dep is appropriate on modal dlg.
>>       >    Remove the 2 packages
>>       >    Verify that syntax for 1 reverse dependency on main page
>>notifiation.
>>
>>       Same problem with this one: removing openssl-dev doesn't seem to
>>remove
>>       openssl-staticdev. But when I search again for openssl-staticdev,
>>the
>>       button has been updated and changed 'add package'.
>>
>>       Cheers
>>
>>       Belén
>>
>>       >
>>       >--
>>       >_______________________________________________
>>       >toaster mailing list
>>       >toaster@yoctoproject.org
>>       >https://lists.yoctoproject.org/listinfo/toaster
>>
>>
>>
>>
>>
>>
>> --
>>
>> Elliot Smith
>> Software Engineer
>> Intel Open Source Technology Centre



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

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

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-03-17 22:01 [V2 review-request] show and delete recursive list of reverse dependencies Dave Lerner
2016-03-17 22:01 ` [V2 PATCH 1/3] toaster: show full list of dependents to remove Dave Lerner
2016-03-17 22:01 ` [PATCH 2/3] toaster: new customise package-remove modal dlg Dave Lerner
2016-03-17 22:02 ` [V2 PATCH 3/3] toaster: get all dependents for pkg for removal Dave Lerner
2016-03-21 16:52 ` [V2 review-request] show and delete recursive list of reverse dependencies Barros Pena, Belen
2016-03-21 19:37   ` Lerner, Dave
2016-03-21 20:06     ` Smith, Elliot
2016-03-21 20:19       ` Lerner, Dave
2016-03-22 10:27         ` 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.