Project

General

Profile

action #62834

Updated by riafarov about 4 years ago

## Description 

 So we have covered following scenarios on TW: 
 1. Check that retracted packages are marked as such 
 2. Update doesn't install retracted packages unless explicitly forced to do so 
 3. Message is translated (this is missing as of now in TW) 
 4. Update/installation of package which has other retracted package as dependency (hello-lang has hello as dependency in the repo we can use for testing) 

 This was covered only in the installed system as for openSUSE custom repos can be added to the installer only by modifying control.xml 
 Retracted packages got as patches, so in the installer, those should not be visible, but we need to check this. 

 So in SLES we need to cover mentioned scenarios in the installed system. For that, we should use provided repo (http://download.opensuse.org/repositories/openSUSE:/Maintenance:/11749/openSUSE_Leap_15.1_Update/) 
 Which I've also published as http://w3.nue.suse.com/~riafarov/retracted/ in case that repo gets removed. There is package "hello" which has retracted status. 

 



 Following bugs were discovered in TW (2 won't (which will be fixed and one in SLES, once package is fixed): there): 
 * https://bugzilla.suse.com/show_bug.cgi?id=1162241 
 * https://bugzilla.suse.com/show_bug.cgi?id=1162145 
 * https://bugzilla.suse.com/show_bug.cgi?id=1162143 


 ## Acceptance criteria 
 1. Scope of changes is learned 
 2. Exploratory testing is conducted for the parts which are not covered by the automated tests 
 3. Follow-up tickets for automated tests are created with detailed description in case are considered to be useful (efforts vs profit) 
 4. jira ticket is updated accordingly 


 





 Content from the #62705 
 See https://jira.suse.com/browse/SLE-8907 and https://jira.suse.com/browse/SLE-8770 


 https://trello.com/c/lRisXHUt/1556-8-package-selector-improvements-for-sle-8770-new-status-retracted 


 For testing purposes, adding a repo with a package that Provides: retracted-patch-package() should simulate a retracted package. 

 Test repo kindly provided by Marcus Meissner: 

 http://download.opensuse.org/repositories/openSUSE:/Maintenance:/11749/openSUSE_Leap_15.1_Update/ 

 Content from trello: 
 *Note: It seems that it is not possible to create a new task for an evaluated Epic. This should not block the development, though.* 

 https://jira.suse.com/browse/SLE-8770 

 *Update: The team task meanwhile created* 

 https://jira.suse.com/browse/SLE-11211 

 ## Explanation in short 

 From time to time we happen to **release a broken package**. If we retract it from the repo, it appears as an orphaned version, but without any information that it is a **retracted update**. Therefore, instead we will **mark it as retracted** in the metadata. libzypp will take care of most of tasks (e.g. not to install it unless explicitly forced by specifying version), but - similarly to zypper - YaST should visualize this information. 

 ## Task 

 Enable the Package selector (both Qt and NCurses) to inform user about the retracted package. 

 There are following ways to inform user (in the order of importance): 

 - **Versions view** in the package selector. For this, put the retracted packages to the end of the list and clearly mark the respective version as `(retracted)`; this way user - when choosing the version - knows about the retracted status 

 - Add another `Retracted Packages` view similar to Orphaned packages; this way user will get an overview of all retracted package versions, which are installed on their system, and can act accordingly; The behavior should be consistent with Orphaned Packages & Friends 

 - Inform user about `retracted packages` *being installed* when starting the package selector (or the sw_single module); in this case, when some are installed, **open** in that **new view by default** 

 - (optional) use a different **status icon** or **font color** when retracted version of a package is installed; red is preferred 

 ## Implementation Hints 

 Since libzypp-17.18.0 pool items offer `bool isRetracted() const`. This should be true for retracted packages and for the package versions they mention. In the next version the `zypp::ui::Selectable` (mostly used in yast) will be adapted. Retracted packages will be sorted to the end of the available packages list (indication they are not desired to be selected). Helper methods like `updateCandidateObj` will avoid to return a retracted item. 

 For implementing additional methods in libzypp, please, contact Michael Andres directly. 

 ## Testing 

 For testing purposes, adding a repo with a package that `Provides: retracted-patch-package()` should simulate a retracted package. 

 Test repo kindly provided by Marcus Meissner: 

 http://download.opensuse.org/repositories/openSUSE:/Maintenance:/11749/openSUSE_Leap_15.1_Update/ 


 ## Review 

 - PR for the Qt UI: https://github.com/libyui/libyui-qt-pkg/pull/82?w=1 

 - Presented to feature requester Thomas Göttlicher live: 
 He says it looks good to him. 

 - PRs for the NCurses UI: 
   - https://github.com/libyui/libyui-ncurses-pkg/pull/34?w=1 
   - https://github.com/libyui/libyui-ncurses-pkg/pull/36

Back