You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Users running immutable system like ostree or even plain BTRFS Snapshots will suffer from inconsistent VCS database state after a system rollback (#1333).
This is caused by the default --devel option persisting data in the STATE DIRECTORY whose location ($XDG_STATE_HOME) is not compatible with common design of cattle/immutable systems.
System's State is typically kept in Variable Data directory (/var) to separate it from Persistent Data (like /home).
STATE DIRECTORY
The state directory is $XDG_STATE_HOME/paru/. If $XDG_STATE_HOME is unset, the state directory will fall back to $HOME/.local/state/paru.
Solutions
Pacman approach
Pacman has solved this elegantly by storing its state (DBPath) in /var/lib/pacman/ system location by default which is analogous to $XDG_STATE_HOME. Providing /var/lib/paru as the state directory would support immutable systems and rollbacks out-of-the box.
Customizable database location
Ability to tweak STATE DIRECTORY through StateDir = /var/lib/paru config option.
Command parameter
Option to bypass cached commits in STATE DIRECTORY through a buildin flag like --develcheck which would mimic the slower pacaur-like devel check but without explicitly forcing re-installation of detected packages (e.g. --norebuild). For reference, see workaround below.
Example
Consider the following flow
User updates the system:
$ paru --sync --refresh --sysupgrade
This causes VCS database to be updated in $XDG_STATE_HOME/paru/ via --devel(provided by default in /etc/paru.conf):
User performs a system rollback, in such scenarios $HOME might be a separate mount to abstract persistent data from system's state /.
This causes ~/.local/state/paru/devel.toml to retain information about currently installed devel packages which do not reflect the current state of / system-rootfs.
Re-attempting to update will cause devel packages to not detect updates.
Workarounds
Symlinks
Considering Paru's state location cannot be customized in v2.0.3, make a symlink to the appropriate location:
If devel.toml is accidentally deleted, it can be re-generated with $ paru --gendb(which injects latest commits and not the currently installed version). Then run manual resolve step from below to make sure that installed packages match the database state.
Manual Resolve
After a rollback, perform slower pacaur-like devel checks which forces VCS packages to be explicitly re-installed:
Problem
Users running immutable system like
ostree
or even plain BTRFS Snapshots will suffer from inconsistent VCS database state after a system rollback (#1333).This is caused by the default
--devel
option persisting data in theSTATE DIRECTORY
whose location ($XDG_STATE_HOME
) is not compatible with common design of cattle/immutable systems.System's State is typically kept in Variable Data directory (
/var
) to separate it from Persistent Data (like/home
).Solutions
Pacman approach
Pacman has solved this elegantly by storing its state (
DBPath
) in/var/lib/pacman/
system location by default which is analogous to$XDG_STATE_HOME
. Providing/var/lib/paru
as the state directory would support immutable systems and rollbacks out-of-the box.Customizable database location
Ability to tweak
STATE DIRECTORY
throughStateDir = /var/lib/paru
config option.Command parameter
Option to bypass cached commits in
STATE DIRECTORY
through a buildin flag like--develcheck
which would mimic theslower pacaur-like devel check
but without explicitly forcing re-installation of detected packages (e.g.--norebuild
). For reference, see workaround below.Example
Consider the following flow
User updates the system:
$ paru --sync --refresh --sysupgrade
This causes VCS database to be updated in
$XDG_STATE_HOME/paru/
via--devel
(provided by default in/etc/paru.conf
):User performs a system rollback, in such scenarios
$HOME
might be a separate mount to abstract persistent data from system's state/
.This causes
~/.local/state/paru/devel.toml
to retain information about currently installeddevel
packages which do not reflect the current state of/
system-rootfs.Re-attempting to update will cause
devel
packages to not detect updates.Workarounds
Symlinks
Considering Paru's state location cannot be customized in
v2.0.3
, make a symlink to the appropriate location:If
devel.toml
is accidentally deleted, it can be re-generated with$ paru --gendb
(which injects latest commits and not the currently installed version). Then runmanual resolve
step from below to make sure that installed packages match the database state.Manual Resolve
After a rollback, perform
slower pacaur-like devel checks
which forces VCS packages to be explicitly re-installed:$ pacman -Qmq | grep -Ee '-(cvs|svn|git|hg|bzr|darcs)$' | paru -Ta - | paru -S --needed -
The text was updated successfully, but these errors were encountered: