Bug 453250 - Restart after update is applied even if the update fails
Summary: Restart after update is applied even if the update fails
Status: RESOLVED FIXED
Alias: None
Product: Discover
Classification: Applications
Component: Updates (offline) (show other bugs)
Version: master
Platform: Neon Other
: NOR normal
Target Milestone: ---
Assignee: Dan Leinir Turthra Jensen
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-05-01 05:53 UTC by Kishore Gopalakrishnan
Modified: 2022-05-09 13:28 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In: 5.24.6


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Kishore Gopalakrishnan 2022-05-01 05:53:43 UTC
SUMMARY
When updating software, there is a 'restart after applying updates' checkbox. This shuts down the computer even if the update fails (so that the user can't even read the error message). 

STEPS TO REPRODUCE
1. Open Discover
2. Go to the updates page
3. Start an update by clicking the 'update all' button at the top right.
4. Check the 'restart after applying updates' (not sure what the exact English text is, but it appears on the bottom left of the bar under the page that shows the list of updates) box at the bottom of the page that appears after the update has started
5. Before the update finishes downloading, disconnect from the internet

OBSERVED RESULTS
After some time, an error message is shown (title: Error applying updates; message: "There was an error applying the following updates. Please try again later") and the computer shuts down.

EXPECTED RESULTS
Computer should restart only if the update was successful.

SOFTWARE VERSIONS
Operating System: KDE neon Unstable Edition
KDE Plasma Version: 5.24.80
KDE Frameworks Version: 5.94.0
Qt Version: 5.15.3
Kernel Version: 5.13.0-39-generic (64-bit)
Graphics Platform: X11
Processors: 2 × AMD EPYC-Rome Processor
Memory: 1.9 GiB of RAM
Graphics Processor: virgl
Manufacturer: QEMU
Product Name: Standard PC (Q35 + ICH9, 2009)
System Version: pc-q35-5.0
Comment 1 Nate Graham 2022-05-03 15:22:29 UTC
lol oops
Comment 2 Nate Graham 2022-05-09 13:18:43 UTC
Git commit e6db01be70f6ce161aa3d7c525503f9db42954c6 by Aleix Pol Gonzalez, on behalf of Aleix Pol.
Committed on 09/05/2022 at 11:40.
Pushed by apol into branch 'master'.

updates: Do not reboot if one of the update transactions failed

It gives the user the chance to see what went down.

M  +1    -1    discover/qml/UpdatesPage.qml
M  +1    -0    libdiscover/backends/PackageKitBackend/PackageKitUpdater.cpp
M  +10   -0    libdiscover/resources/AbstractBackendUpdater.cpp
M  +3    -0    libdiscover/resources/AbstractBackendUpdater.h
M  +7    -0    libdiscover/resources/ResourcesUpdatesModel.cpp
M  +2    -0    libdiscover/resources/ResourcesUpdatesModel.h
M  +4    -0    libdiscover/resources/StandardBackendUpdater.cpp
M  +1    -0    libdiscover/resources/StandardBackendUpdater.h

https://invent.kde.org/plasma/discover/commit/e6db01be70f6ce161aa3d7c525503f9db42954c6
Comment 3 Nate Graham 2022-05-09 13:28:06 UTC
Git commit 58b0b9ee2e619a5f2f0ca8dc42b1e413b253c6d5 by Nate Graham, on behalf of Aleix Pol.
Committed on 09/05/2022 at 13:27.
Pushed by ngraham into branch 'Plasma/5.24'.

updates: Do not reboot if one of the update transactions failed

It gives the user the chance to see what went down.
(cherry picked from commit e6db01be70f6ce161aa3d7c525503f9db42954c6)

M  +1    -1    discover/qml/UpdatesPage.qml
M  +1    -0    libdiscover/backends/PackageKitBackend/PackageKitUpdater.cpp
M  +10   -0    libdiscover/resources/AbstractBackendUpdater.cpp
M  +3    -0    libdiscover/resources/AbstractBackendUpdater.h
M  +7    -0    libdiscover/resources/ResourcesUpdatesModel.cpp
M  +2    -0    libdiscover/resources/ResourcesUpdatesModel.h
M  +4    -0    libdiscover/resources/StandardBackendUpdater.cpp
M  +1    -0    libdiscover/resources/StandardBackendUpdater.h

https://invent.kde.org/plasma/discover/commit/58b0b9ee2e619a5f2f0ca8dc42b1e413b253c6d5