Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle Retracted Packages (Qt part) #82

merged 16 commits into from Jan 21, 2020

Handle Retracted Packages (Qt part) #82

merged 16 commits into from Jan 21, 2020


Copy link

@shundhammer shundhammer commented Jan 8, 2020





Add the new retracted status to the package selector in the YaST Qt UI.

Related PR

libyui/libyui-ncurses-pkg#34 (NCurses part)

Background: Retracted

If a maintenance update is released for any of our supported products, it may happen that after its release we realize that it introduces new problems, so we have to unpublish (retract) it.

So far, our maintenance team always managed to find other solutions, but sooner or later it will happen that it takes too long to realize that an update was broken, so users will install it.

So patches can now have a new special attribute retracted that indicates that a patch exists, but should not be installed. Since a patch can consist of multiple update packages, that status trickles down to each of those packages (in that exact version). libsolv (used by libzypp) handles this.

Package Versions View

Now retracted versions of the current package are displayed in red and with a text [RETRACTED] :


If a retracted version is already installed, the installed version is also marked in the same way:


New Classification Filter: Retracted Packages

Added two new filters:

  • Retracted Packages
  • Retracted Installed Packages

(the latter still suffers from a bug in libzypp that is being fixed on the libzypp side right now).


Why Both Filters? Why Retracted AND Retracted Installed?

When experimenting with retracted packages, I always found it quite disconcerting to know that there were some retracted packages somewhere, but the filter did not show anything (because I did not have any of them installed).

This view will very rarely contain anything anyway. It is there mostly to reassure users that their system is not in danger, that they don't have anything installed that we consider potentially harmful (so we had to retract that version).

But a view that is always empty might as well just be broken; so it gives some more reassurance to be able to see all retracted packages, even those that you don't have installed. This view will normally also be empty, but as soon as our maintenance team starts using that feature, users will hear about it and wonder if their systems are affected. When they see retracted packages in that view, but not in the "retracted installed" view, they can feel safe.

Switch to Retracted Installed Packages View if any Installed

When entering the package selector in normal mode (i.e. not showing patterns, patches, upgrade problems etc.), check if any retracted package versions are installed. If there are any, switch to the "Package Classification" filter view and activate the "Retracted Installed Packages" filter.

Why no Warning Popup?

Even though we could also show a warning popup in that situation, that could become very problematic quite easily: If it was a conscious decision by the user to install those package versions, he would still get that warning every time he enters the package selection.

Adding a "Don't show this again" checkbox would not work well there: We'd have to save that for every combination of retracted installed package versions because that can and will change over time whenever newer versions (that are not retracted) of those packages are released and available for update. This would become very annoying quite quickly.

Also, this should only happen very rarely.

Preventing Auto-Selecting Retracted Package Versions

Libzypp already takes care about that. Libzypp will not voluntarily take a retracted package version into consideration as a candidate. And if dependencies would make that necessary, this would become a (pretty complex) dependency problem that needs more sophisticated handling, very much like other dependency problems.

Other Fixes

Dramatic Package List Destructor Performance Improvement

When switching away from the "All Packages" filter (or any other that has a lot of items in the package list), there was a long lag of 10-20 seconds until the list was cleared.

This was due to excessive duplicate bookkeeping which apparently made the underlying Qt widget remove individual items and do heavy recalculations (column widths? Widget total height for scrollbar length/position when adding up individual item heights?).

The YQPkgObjList used to keep track of excluded items in a separate map, but that turned out to be completely redundant: When switching exclude rules like show/don't show -devel or -debuginfo etc. packages, it uses the underlying QTreeWidgetItem's hidden flag. When iterating over all items, it includes those hidden items by default, so the exclude rules were applied twice for items that were previously excluded.

When clearing the list, it would iterate over the excluded items separately, deleting one by one, which in turn causes the underlying QTreeItemWidget to do recalculations which are completely unneccessary anyway when right after that the widget is cleared.

Removing all that redundant code got rid of that 10-20 seconds delay. It still takes some seconds to fill the list when there are many items (naturally), but clearing it now happens instantly.

Notes for Viewing the Diff

The diff is best viewed with whitespace changes suppressed.

Our mandatory C++ coding style was applied including indentation and fixing trailing whitespace, so there are many whitespace-only changes.

src/YQPkgClassFilterView.h Outdated Show resolved Hide resolved
wfeldt approved these changes Jan 21, 2020
Copy link

@wfeldt wfeldt left a comment


@shundhammer shundhammer merged commit 96a1c6b into libyui:master Jan 21, 2020
1 check was pending
@shundhammer shundhammer deleted the huha-retracted-01 branch Jan 21, 2020
@shundhammer shundhammer changed the title WIP: Handle Retracted Packages (Qt part) Handle Retracted Packages (Qt part) Jan 21, 2020
mvidner pushed a commit to mvidner/libyui-combined-alpha-3 that referenced this issue Jan 15, 2021

WIP: Handle Retracted Packages (Qt part)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
None yet

Successfully merging this pull request may close these issues.

None yet

2 participants