CachyOS / CachyOS/distribution
[Bug]: Cachy-update is not checking available disk space before an update and failing to recover after interrupted update.
- Dominant language
- No language data
- Stars
- 27
- Forks
- 2
- PR merge metrics
- No merged PRs in 30d
Description
### Kernel
7.1.1-2
### Desktop Environment / Window Manager
KDE Plasma
### CPU
na
### GPU / Driver
na
### Description
Updating ChachyOS with cachy-update after a month since my last system update
and not having enough disk space (provably less than 1GB).
cachy-update did not seem to have checked if the pending update would require more disk space
than what I had and it just continued with the update,
which failed with an error and left my system in an inconsistent state
where pacman was locked with invalid signatures,
and KDE Plasma stopped showing the list of running/pinned apps in the task bar.
```console
sudo pacman -Syyu
[sudo] password for xxxxxx:
error: cachyos-core-znver4: signature from "CachyOS " is invalid
error: cachyos-extra-znver4: signature from "CachyOS " is invalid
error: cachyos: signature from "CachyOS " is invalid
:: Synchronizing package databases ...
error: failed to synchronize all databases (unable to lock database)
```
Re-running cachy-update would just kept throwing errors even after I expanded and assigned the OS disk partition.
To fix this I had to investigate the problem and run some commands like:
```console
sudo rm /var/lib/pacman/db.lck
sudo pacman -Sy cachyos-keyring archlinux-keyring
sudo pacman -Syyu
sudo pacman -S plasma-desktop plasma-workspace
```
And restart the system.
Then I was able to try running cachy-update again, but got yet another error:
```console
:: Proceed with installation? [Y/n] y
(159/159) checking keys in keyring
(159/159) checking package integrity
(159/159) loading package files
(159/159) checking for file conflicts
error: failed to commit transaction (conflicting files)
lib32-openssl: /usr/lib32/cmake/OpenSSL/OpenSSLConfig.cmake exists in filesystem
lib32-openssl: /usr/lib32/cmake/OpenSSL/OpenSSLConfigVersion.cmake exists in filesystem
lib32-openssl: /usr/lib32/engines-3/afalg.so exists in filesystem
lib32-openssl: /usr/lib32/engines-3/capi.so exists in filesystem
lib32-openssl: /usr/lib32/engines-3/loader_attic.so exists in filesystem
lib32-openssl: /usr/lib32/engines-3/padlock.so exists in filesystem
lib32-openssl: /usr/lib32/libcrypto.so exists in filesystem
lib32-openssl: /usr/lib32/libcrypto.so.3 exists in filesystem
lib32-openssl: /usr/lib32/libssl.so exists in filesystem
lib32-openssl: /usr/lib32/libssl.so.3 exists in filesystem
lib32-openssl: /usr/lib32/ossl-modules/legacy.so exists in filesystem
lib32-openssl: /usr/lib32/pkgconfig/libcrypto.pc exists in filesystem
lib32-openssl: /usr/lib32/pkgconfig/libssl.pc exists in filesystem
lib32-openssl: /usr/lib32/pkgconfig/openssl.pc exists in filesystem Errors occurred, no packages were upgraded.
== > ERROR: An error has occurred during the update process
```
Which means that pacman wants to install `lib32-openssl`
but those files already exist on disk
and they don't belong to any package according to pacman's db.
Probably due to the interrupted installation due to the lack of disk space.
So I had to fix it manually with these commands:
```bash
pacman -Qo /usr/lib32/libssl.so
error: No package owns ...
sudo pacman -S lib32-openssl --overwrite '*'
sudo cachy-update
```
### Steps to Reproduce
Run cachy-update without enough space on disk for the updates,
in my case after some time without updating (like a month).
### Expected Behavior
Who would have thought a system updater would have to check for available disk space,
and be able to recover from failed/interrupted installs.
### Actual Behavior
the updater gets stuck with invalid keys, and KDE Plasma stops showing the list of running/pinned apps in the task bar (even after restarting).
### Logs / Error Messages
-
### Additional Context
_No response_
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by locating cachy-update's update flow and reviewing the pacman commands and failure output shown in the issue. Reproduce an update with insufficient disk space, then inspect how interrupted transactions, database locks, signatures, and file conflicts are handled. Done means the updater detects insufficient space before updating and leaves a recoverable system after an interrupted update.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- arch-linux, linux
- Domain
- operating-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100