[Toaster] Review Request: 9121 Remove direct/indirect dependents of a package
Dave Lerner
dave.lerner at windriver.com
Fri Mar 11 08:29:04 PST 2016
Target Branch: toaster-next, master
Contrib Branch: poky-contrib/dlerner/9121-delete-dependent-package-tree
Defect: 9121
Summary: Show and remove direct and indirect dependents when removing package
Commit Summary
==============
fb26f22 toaster: get all dependents for pkg for removal
85553c3 toaster: new customise package-remove modal dlg
fc6d99d toaster: show full list of dependents to remove
.../toaster/toastergui/static/js/customrecipe.js | 57 +++++++++++--
.../toaster/toastergui/templates/customrecipe.html | 5 +-
bitbake/lib/toaster/toastergui/views.py | 98 +++++++++++++++++++---
3 files changed, 140 insertions(+), 20 deletions(-)
Comments:
Refactoring on variables in customrecipe.js addRemovePackage suggested by jshint warning.
One comment block in related code in views.py changed per pep8 warning.
===========================
TESTS
===========================
Setup:
------
Start toaster with empty build directory, sstate-cache
Create a new project, 'myproject'
Build core-image-sato
CASE Remove dependent package that was part of original base image
------------------------------------------------------------------
Create new custom image on core-image-sato, named mysato
Remove libcrypto
Verify that "39 packages in your image depend on libcrypto" are reported and that the
39 packages are unique and in listed in alpha order, where 39 was valid at the time of my test.
Verify that the tail of the dialog says "In order to remove libcrypto, you must remove these 39 packges as well."
Verification of total package size value can be done in subsequent test.
Verify that button says "Remove all 40 packages".
Click "Remove all..."
Verify that banner says "You have removed 40 packages from mysato: libcrypto and it's 39 dependents".
Verification of the transition button-label notification to '40 packages removed' is done in subsequent test.
Build mysato
Click on mysato | packages
Verify that there are 40 packages less than clicking on core-image-sato packages (eg 569 vs 609).
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 it, 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 dependent on glib-2.0, libffi, libpcre
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 atk and glib-2.0 will be removed Remove
Build
Verify atk, glib2.0 libffi are removed.
CASE Test button notifications and banner on removal for package w/ dependents
------------------------------------------------------------------------------
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 dependents
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 dependents Verify that buttons transition to Add Package.
More information about the toaster
mailing list