Return-Path: Received: by yocto-www.yoctoproject.org (Postfix, from userid 118) id 1A083E00B30; Fri, 11 Mar 2016 08:30:05 -0800 (PST) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on yocto-www.yoctoproject.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham version=3.3.1 X-Spam-HAM-Report: * -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] Received: from mail5.wrs.com (mail5.windriver.com [192.103.53.11]) by yocto-www.yoctoproject.org (Postfix) with ESMTP id 9414BE00AB7 for ; Fri, 11 Mar 2016 08:30:00 -0800 (PST) Received: from ALA-HCB.corp.ad.wrs.com (ala-hcb.corp.ad.wrs.com [147.11.189.41]) by mail5.wrs.com (8.15.2/8.15.2) with ESMTPS id u2BGTwKI014703 (version=TLSv1 cipher=AES128-SHA bits=128 verify=OK); Fri, 11 Mar 2016 08:29:59 -0800 Received: from ord-dlerner-d8.wrs.com (172.25.44.108) by ALA-HCB.corp.ad.wrs.com (147.11.189.41) with Microsoft SMTP Server id 14.3.248.2; Fri, 11 Mar 2016 08:29:58 -0800 From: Dave Lerner To: , , Date: Fri, 11 Mar 2016 10:29:04 -0600 Message-ID: <1457713747-32331-1-git-send-email-dave.lerner@windriver.com> X-Mailer: git-send-email 1.9.1 MIME-Version: 1.0 Subject: Review Request: 9121 Remove direct/indirect dependents of a package X-BeenThere: toaster@yoctoproject.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Web based interface for BitBake List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 Mar 2016 16:30:05 -0000 Content-Type: text/plain 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.