From f654c9d5f7391783e341723b8e276f09c636e9f7 Mon Sep 17 00:00:00 2001 From: hygienic-books Date: Sat, 6 May 2023 19:53:27 +0200 Subject: [PATCH] docs(script): User will want to remove pacman's stale db.lck after rollback (#1) --- README.md | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/README.md b/README.md index 08b211c..7fc128b 100644 --- a/README.md +++ b/README.md @@ -74,6 +74,27 @@ Severity based on affected packages, here trivial ───────┘ Have a look at `pacman-zfs-snapshot.conf` as well, its comments should be clear enough to get you going. +# Rollback + +After a rollback for example via the excellent [ZFSBootMenu](https://docs.zfsbootmenu.org/) `pacman` and all AUR helpers you may be using will consider the `pacman` database to be locked. No `pacman` transactions can start, you will for example see: + +- In `pacman` + ``` + # pacman -Syu + :: Synchronizing package databases... + error: failed to synchronize all databases (unable to lock database) + ``` +- In `paru` + ``` + $ paru + :: Pacman is currently in use, please wait... + ``` + +The moment a snapshot was created `pacman` was already in a transaction so it had already written its lock file to `/var/lib/pacman/db.lck`. After a clean finish `pacman` would have deleted that lock itself but since you rolled back to a point mid-transaction it's still there. Just delete the file and you're good to go: +``` +sudo rm /var/lib/pacman/db.lck +``` + # Development ## Conventional commits