Bug 445226 - Replace "this will remove some packages" dialog with a check for the transaction removing system-critical packages like plasma-workspace or kwin
Summary: Replace "this will remove some packages" dialog with a check for the transact...
Status: RESOLVED FIXED
Alias: None
Product: Discover
Classification: Applications
Component: discover (show other bugs)
Version: unspecified
Platform: Other Linux
: HI grave
Target Milestone: ---
Assignee: Dan Leinir Turthra Jensen
URL:
Keywords: usability
Depends on:
Blocks:
 
Reported: 2021-11-09 19:39 UTC by Nate Graham
Modified: 2022-01-27 15:34 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In: 5.24


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Nate Graham 2021-11-09 19:39:42 UTC
Right now, anytime an update transaction in Discover will remove packages, we show a dialog asking, "Are you sure?" and showing you the packages that will be removed, as well as the packages that will be updated.

This was done to provide a warning to users when an update or app removal would do something bad like delete necessary Plasma packages. However in retrospect, it is a fairly crude and ineffective way to accomplish this, for several reasons:
- It shows the user technical data that they are unlikely to understand
- Some OSs that regularly remove packages as part of updates (e.g. to replace a package named kernel-5-14-6 with a different package named kernel-5-14-7). This causes the user to stop seeing the warning as a potentially dangerous thing, and they will learn to ignore it
- When an update removes a small number if packages and updates a large number of packages, the key data about what's being removed can get hidden

For these reasons, this dialog is unlikely to actually save the user if they try to do something that wants to remove Plasma.

We should consider replacing this with a more narrow check that sees whether a transaction is proposing to delete plasma-workspace, kwin, and any other packages deemed critical to the system's operation. Only in this case should we display a warning, and it should be a big scary warning. Perhaps it should even outright prevent the user from proceeding.

The warning should have some blame-shifting text in it, saying something like,

"If you believe this is an error, please report it as a bug to your distribution's packagers."

With a button that says "Report bug" which takes the user to the distro bug reporting page, just like we do for general update issues.
Comment 1 Bug Janitor Service 2021-11-10 02:28:19 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/discover/-/merge_requests/202
Comment 2 Aleix Pol 2021-11-19 03:04:03 UTC
Git commit 0cd9956adb0086c3587569ece14a1384c1ee23fd by Aleix Pol.
Committed on 19/11/2021 at 00:22.
Pushed by ngraham into branch 'master'.

pk: Create a mechanism to detect important packages getting removed

Do not uninstall packages that are marked as compulsory for our current
desktop.

M  +44   -1    discover/qml/DiscoverWindow.qml
M  +6    -0    libdiscover/Transaction/Transaction.h
M  +5    -0    libdiscover/backends/PackageKitBackend/AppPackageKitResource.cpp
M  +1    -0    libdiscover/backends/PackageKitBackend/AppPackageKitResource.h
M  +19   -9    libdiscover/backends/PackageKitBackend/PKTransaction.cpp
M  +5    -0    libdiscover/backends/PackageKitBackend/PackageKitResource.cpp
M  +5    -0    libdiscover/backends/PackageKitBackend/PackageKitResource.h
M  +28   -4    libdiscover/backends/PackageKitBackend/PackageKitUpdater.cpp
M  +6    -0    libdiscover/resources/AbstractBackendUpdater.h
M  +1    -0    libdiscover/resources/ResourcesUpdatesModel.cpp

https://invent.kde.org/plasma/discover/commit/0cd9956adb0086c3587569ece14a1384c1ee23fd
Comment 3 WS 2022-01-27 06:22:45 UTC
I've been instructed to discuss my requests under this bug report rather than filing multiples:

I beg that important packages shouldn't even show up on the installed page, or at the very least not show a "Remove Button": A warning after clicking remove is a last ditched effort to block a stupid idea, it shouldn't be the first line of defense.

If the user knows a application on the installed page is important and shouldn't be removed, he will not click the remove button to see if there's any warning. The mere presence of a "remove" button will creates a false sense of danger, it implies Discover is dumb and dangerous, that any application that has a remove button could potentially be a system application that shouldn't be removed. This is currently me right now.

I also beg that there should be a separate page where "System" applications should reside, not under the main "Installed" page. Android does something similar. It should have Dolphin, Konsole and everything else that could be removed, but really shouldn't unless you know what you're doing.

Add Discover to the list of applications that shouldn't even show up inside Discover. Letting the user nuke a tool with the tool itself is asking for disaster
Comment 4 Nate Graham 2022-01-27 15:34:59 UTC
Those should in fact be filed as separate bug reports. They're not duplicates; they are separate (legitimate) issues.