You are not logged in.
Oh, I think now I understand what happened, it's my fault. In order to save my internet traffic (now it's not an issue, but one month ago it was) I upgraded ArchLinux on one machine, and transferred downloaded files from /var/cache/pacman to another one. Probably once I decided to save even more traffic and transferred also content of /var/lib/pacman, and this caused duplicated entries and the incorrect state of pacman's db.
Thanks again for your time, shining, I think the issue is resolved and it doesn't make sense to file bug report.
Offline
Oh that could make sense indeed. Good to know it's probably not pacman's fault
/var/lib/pacman/ contains 2 things : the local database in local/ and the sync databases in the other directories.
You can safely transfer the sync dbs from one box to another, but never the first one. But the sync dbs are downloaded again on pacman -Sy , so there is little gain in doing this.
Now, pacman could maybe handle better the case of duplicate entries, but that's quite low priority, since there are many more important things to deal with first.
pacman roulette : pacman -S $(pacman -Slq | LANG=C sort -R | head -n $((RANDOM % 10)))
Offline
/var/lib/pacman/ contains 2 things : the local database in local/ and the sync databases in the other directories.
You can safely transfer the sync dbs from one box to another, but never the first one. But the sync dbs are downloaded again on pacman -Sy , so there is little gain in doing this.
I think I did "pacman -Su" to avoid downloading of the sync databases. Can this work for a box without internet connection? I think such a task makes sense: to install the lastest ArchLinux ISO and to upgrade all packages with the newest versions without having internet connection. Solution: copy /var/cache/packman and /var/lib/pacman/ without local/, run "pacman -Su". Right?
Offline
Good morning,
I'm a new user on Arch.
I have a question, in some way related to what is told in this thread.
If the content of /var/lib/pacman/local is erased, the database of the installed packages is lost?
And, if it is, is there a way to repair it?
Thank you,
MJ
Offline
I think I did "pacman -Su" to avoid downloading of the sync databases. Can this work for a box without internet connection? I think such a task makes sense: to install the lastest ArchLinux ISO and to upgrade all packages with the newest versions without having internet connection. Solution: copy /var/cache/packman and /var/lib/pacman/ without local/, run "pacman -Su". Right?
Yes I think that could work.
pacman roulette : pacman -S $(pacman -Slq | LANG=C sort -R | head -n $((RANDOM % 10)))
Offline
If the content of /var/lib/pacman/local is erased, the database of the installed packages is lost?
Yes.
And, if it is, is there a way to repair it?
Not really, or at least no good way.
There are some scripts (at least one) somewhere in this forum that try parsing /var/log/pacman.log to reinstall all installed packages.
But not sure how well they work.
pacman roulette : pacman -S $(pacman -Slq | LANG=C sort -R | head -n $((RANDOM % 10)))
Offline