You are not logged in.
Sometimes I forget to log in to our company's wifi hotspot, so its captive portal is redirecting every http request to the login page. When I run "pacman -Syu" in this situation, /var/lib/pacman/sync/core.db etc. get filled with the portal's html code, not the expected db content.
As a result, the upgrade fails with
:: Starting full system upgrade...
error: could not open file /var/lib/pacman/sync/core.db: Unrecognized archive format
error: could not open file /var/lib/pacman/sync/core.db: Unrecognized archive format
error: could not open file /var/lib/pacman/sync/extra.db: Unrecognized archive format
error: could not open file /var/lib/pacman/sync/extra.db: Unrecognized archive format
[...]
Even after a login to the portal (with an active transparent internet connection), a subsequent "pacman -Syu" fails.
Of course one can easily recover by deleting everything in /var/lib/pacman/sync/, but when I saw this for the first time, it looked quite alarming.
I wonder if pacman could do some basic checks before overwriting the database files (or if there is an option I should know..)
Offline
Offline
IIRC from having the same problem, the subsequent `pacman -Syu` fails because the "database" is more recent on account of actually being a brand-new HTML page. So adding another `y` should fix things.
If you have to login often, you could create a curl script which automatically logs you in.
Managing AUR repos The Right Way -- aurpublish (now a standalone tool)
Offline