I just noticed that pamac database (s) have moved from /var/tmp/pamac/dbs/local/
to /tmp/pamac-user_name
Can somebody shed light on the reason (s) for this change. It seems that on reboot the database is gone as it is in the /tmp folder and has to be re-downloaded each time the databases are refreshed.
/tmp/pamac-user/dbs/local/ is only a symlink to /var/lib/pacman/local/, so the package list is not re-downloaded by Pamac every time you reboot:
ls -la /tmp/pamac-scotty/dbs/
total 0
drwxr-xr-x 3 scotty scotty 80 Mar 19 08:02 .
drwxr-xr-x 3 scotty scotty 60 Mar 19 08:02 ..
lrwxrwxrwx 1 scotty scotty 21 Mar 19 08:02 local -> /var/lib/pacman/local
drwxr-xr-x 2 scotty scotty 160 Mar 19 08:02 sync
Also, /var/lib/pacman/local/ is not downloaded every update; it contains the information for installed packages, so entries are only added/removed when packages are installed/uninstalled.
(I typed the bit below before I re-read your post & realised you were talking about the local directory where package info is stored, not the sync directory which contains the mirror databases)
Not sure for the exact reason for the change to Pamac now using the /tmp/pamac-user/ directory, but it may be to prevent pacman’s databases in /var/lib/pacman/sync/ from being corrupted or becoming unreadable if there are any issues with Pamac (for example, using pamac with sudo).
I just rebooted after a minor update & ran pamac update. It didn’t re-download the Manjaro repo databases again (apart from the AUR, which is always changing). I think pamac checks what is in the /var/lib/pacman/sync/ databases against the mirrors first. Any up-to-date ones are just copied across to the /tmp/pamac-user/dbs/sync/ directory, and any that are not up-to-date are synced, which writes the updated data to both Pamac’s directory in /tmp/pamac-user/dbs/sync/ & /var/lib/pacman/sync/.