Pamac makes invalid symlink to pacman database if DBPath doen't ands with slash
Pamac --version
Pamac 10.5.1-2 - libpamac 11.5.4-1
Variant in use
Both GUI and CLI are affected
Distribution
Manjaro (custom instllation from CLI)
Desktop environment
KDE
What's not working
I want to exclude var from snapper snapshots but keep pacman database there. So i turn var into btrfs subvolume and add it to fstab, then set DBPath to /usr/lib/pacman in /etc/pacman.conf. I wash happy with my setup, but when i open 'Installed' tab of pamac to my whole surprise i see 'No packages found'. I run pacman -Q
to check it out and my packages are there.
How to reproduce?
- Move pacman database from /var/lib/pacman to somewhere else.
- Uncomment and set DBPath in /etc/pacman.conf pointing to new database location without trailing slash.
- Delete and regenerate /var/tmp/pamac
rm -rf /var/lib/pamac; pamac upgrade --force-refresh
- Run
pamac list --installed | wc -l
(you will see zero packages installed)
More information (optional)
Culprit:
Process.spawn_command_line_sync ("ln -s %slocal %s".printf (dbpath, tmp_dbpath));
Thanks to 'Guillaume Benoit' for helping with troubleshoot.