Project

General

Profile

action #62705

Updated by riafarov about 4 years ago

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