[gpunk@kili ~]$ sudo pacman -Syu
:: Synchronisation des bases de données de paquets…
core est à jour
extra est à jour
community est à jour
multilib est à jour
erreur : l’ouverture du fichier /var/lib/pacman/sync/core.db a échoué : Unrecognized archive format
erreur : l’ouverture du fichier /var/lib/pacman/sync/extra.db a échoué : Unrecognized archive format
erreur : l’ouverture du fichier /var/lib/pacman/sync/community.db a échoué : Unrecognized archive format
erreur : l’ouverture du fichier /var/lib/pacman/sync/multilib.db a échoué : Unrecognized archive format
erreur : la base de données « core » n’est pas valide (base de données non valide ou corrompue (signature PGP))
erreur : la base de données « extra » n’est pas valide (base de données non valide ou corrompue (signature PGP))
erreur : la base de données « community » n’est pas valide (base de données non valide ou corrompue (signature PGP))
erreur : la base de données « multilib » n’est pas valide (base de données non valide ou corrompue (signature PGP))
:: Début de la mise à jour complète du système…
il n’y a rien à faire
[gpunk@kili ~]$ ls -ltr /var/lib/pacman/sync/
total 42756
-rw-r–r-- 1 root root 15141 9 janv. 13:32 mhwd.db
-rw-r–r-- 1 root root 268404 20 févr. 20:02 multilib.files
-rw-r–r-- 1 root root 1615945 20 févr. 20:02 core.files
-rw-r–r-- 1 root root 9923793 21 févr. 22:57 extra.files
-rw-r–r-- 1 root root 31147846 21 févr. 22:57 community.files
-rw-r–r-- 1 root root 200673 27 févr. 10:10 core.db
-rw-r–r-- 1 root root 200673 27 févr. 10:10 extra.db
-rw-r–r-- 1 root root 200673 27 févr. 10:10 community.db
-rw-r–r-- 1 root root 200673 27 févr. 10:10 multilib.db
[gpunk@kili ~]$
I fix the issue each time by forcing the complete refresh of the db,
That has been done, on the top of it, I use my mirror, which is fine for the last 5 years
So there is no way, the .db files got corrupted because of a bad mirror.
I have been troubleshooting on my uex.dk mirror and in the process I learned something about pacman.
When you get the message that a db file - actually any file required by pacman - is in unrecognized format it could be because the actual file is a html file.
As pacman uses curl or wget to fetch the file - pacman only knows of the file fetched and if the content is html text - usually because an error occurred on the server - in my case the word 404 was missing from the response and thus pacman didn’t know better than the files was corrupted.
You can verify if this is the case by listing the content of the file using e.g. cat or use a terminal filemanager like mc to view the content of the file.
I suspect something like that could happen if octopi parses a file as an archive but get a html document instead.
pacman does not download any data - it requests the data from server using curl or wget - any means really.
After the data is downloaded - before they are used for anything - they are validated and verified and that verification fails - there is no way it is possible to verify data before they are downloaded.
When the package manager expects a package and a signature but then get something that doesn’t match it refuses to use it.
What happens within octopi I have no idea - my experience and learning was regarding pacman and possibly libalpm which octopi may be using as well.