Invalid or corrupted package (PGP signature) --- Why

The other day while updating one of my machines, the power plug fell out while downloading the packages to be updated (unplugging a deceased rodent was the final straw but it must have worked loose over time).

After removing the database lock file, I was and to rerun pacman -Syu but all of the packages then reported an invalid PGP signature!

I was able to correct the problem by following the instructions in this thread.

I am however mystified as to why a power interrupt should cause such a problem, especially during the download phase. It might make sense if the fail was in the install phase, or for a single package (the one being downloaded).

Any ideas?

If you provide some logs you might stand a better chance of a useful response.

journalctl --boot=-1 --priority=3 --catalog --no-pager

Cheers.

Cache is a plausible explanation - but one cannot know for sure.

The kernel agressively caches everything and going cold with a lot of data cached - yes possible.

1 Like

And it may also depend on the filesystem used.

The file systems all have some protection against problems after a power failure.
However, this protection varies depending on the file system.

FAT has next to no protection. :wink:
Other file systems use log files and/or checksums. Sometimes this helps to restore a previous good situation. (but not always)
Some file systems can create snapshots. Then a rollback to ā€œbefore the updateā€ is possible

Something like this works, for example, with Timeshift / snapper and btrfs.

You find good Information about Btrfs in the wiki

:footprints:

2 Likes

Thanks for the ideas.
I was really only wondering if there was an obvious reason, rather than asking anyone for a deep dive into the issue, thatā€™s why I didnā€™t put any details.

FWIW: journalctl for the relevant boot had only one line ā€“ a complaint about unable to enumerate a USB device (i.e. the dead rodent). And the FS is EXT4.

Perhaps this helps:

Logs and other information are what we generally rely on to find the likely cause of an issue, obvious or not; as is said ā€˜the devil is in the detailsā€™. Without that, weā€™re mostly peeing into the wind.

If interrupted during the download phase, an update can usually be recovered without any great issue; you obviously realize that. However, itā€™s always possible a loss of power will affect something else in your system. Just what may have been affected, is a little harder to guess.

A cache issue as suggested by @linux-aarhus is as plausible as anything else. The following links may be helpful in that regard:

According to my understanding is that it happens when you donā€™t keep your system updated.

Mainly from what Iā€™ve seen here, but also due to the fact that I update religiously and have never seen itā€¦