SUMMARY If the hard disk becomes full during an offline update, the update seems to fail halfway, and then various bad things happen (e.g. kernel panic on boot if the newest kernel could not be installed properly). If an offline update would make the disk full, Discover should refuse to do an offline update, and instead ask the user to free up enough space first. STEPS TO REPRODUCE 1. Perform an offline update when the root partition is very close to full OBSERVED RESULTS I left my machine at the screen that said 'preparing updates'. After some time, I noticed a kernel panic screen (something about being unable to mount root). Booting from an older kernel (in grub) worked, and then I found out that my root partition was full, which probably made the installation fail halfway, leaving the system in a broken state. EXPECTED RESULTS If the free space is too low to perform an update successfully, the system should refuse to perform an offline update (at least with an online update, you have the option to free up space and fix things before rebooting). SOFTWARE VERSIONS (This is in a virtual machine) Operating System: KDE neon Unstable Edition KDE Plasma Version: 5.25.80 KDE Frameworks Version: 5.97.0 Qt Version: 5.15.5 Kernel Version: 5.15.0-46-generic (64-bit) Graphics Platform: X11 Processors: 2 × AMD EPYC Processor (with IBPB) Memory: 1.9 GiB of RAM Graphics Processor: virgl Manufacturer: QEMU ADDITIONAL INFORMATION May be related to https://bugs.kde.org/show_bug.cgi?id=436285 (see https://bugs.kde.org/show_bug.cgi?id=436285#c7) Not sure if this is a bug in Discover or packagekit
> Not sure if this is a bug in Discover or packagekit Discover should handle this case regardless.
How would we know if there's enough space to perform an update? we check if the free space is bigger than the download size?
Yeah.
A possibly relevant merge request was started @ https://invent.kde.org/plasma/discover/-/merge_requests/361
Git commit b3d8fbef0788144ad7385247bb3b615b6ae6e808 by Aleix Pol Gonzalez, on behalf of Aleix Pol i Gonzalez. Committed on 30/08/2022 at 23:08. Pushed by apol into branch 'master'. pk: Include an error message when there is not enough space for an update It can prevent users getting in an unfortunate situation. There are some cases where this error might not apply, so there's a button to dismiss the message. M +38 -1 discover/qml/UpdatesPage.qml M +1 -0 libdiscover/backends/DummyBackend/DummyBackend.cpp M +9 -0 libdiscover/backends/PackageKitBackend/PackageKitUpdater.cpp M +9 -0 libdiscover/resources/AbstractBackendUpdater.cpp M +11 -0 libdiscover/resources/AbstractBackendUpdater.h M +16 -0 libdiscover/resources/ResourcesUpdatesModel.cpp M +4 -0 libdiscover/resources/ResourcesUpdatesModel.h https://invent.kde.org/plasma/discover/commit/b3d8fbef0788144ad7385247bb3b615b6ae6e808
*** Bug 436285 has been marked as a duplicate of this bug. ***