Files
MSYS2-packages/msys2-keyring/msys2-keyring.install
Christoph Reiter 62f08f4fbc filesystem, gnupg, msys2-keyring: avoid keeping gpg-agent/dirmngr around
They get started in the background and stay around which comes with various problems:
* The files can't be deleted until they are stopped
* Some CI systems wait until all programs are stopped
* On a cygwin update we have to restart everything or forking will be broken
  (though pacman takes care of that now by killing everything cygwin-like on a core update)

Ideally though they would just exit in a controlled way after we no longer need them.

The reason this uses GNUPGHOME instead of passing --home to gpgconf is that dirmngr started by
"pacman-key --refresh-keys" somehow couldn't be killed that way.
Maybe because gpg doesn't forward --homedir in that case. Setting GNUPGHOME helped.
2021-04-18 21:14:38 +02:00

14 lines
272 B
Plaintext

post_upgrade() {
if usr/bin/pacman-key -l >/dev/null 2>&1; then
export GNUPGHOME="$(pacman-conf.exe gpgdir)"
usr/bin/pacman-key --populate msys2
usr/bin/gpgconf --kill all
fi
}
post_install() {
if [ -x usr/bin/pacman-key ]; then
post_upgrade
fi
}