File: debian-archive-keyring.postinst

package info (click to toggle)
debian-archive-keyring 2021.1.1%2Bdeb11u1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 444 kB
  • sloc: makefile: 64; sh: 23
file content (19 lines) | stat: -rw-r--r-- 645 bytes parent folder | download | duplicates (11)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#!/bin/sh

set -e

if [ "$1" = 'configure' -a -n "$2" ]; then
	# remove keys from the trusted.gpg file as they are now shipped in fragment files in trusted.gpg.d
	if dpkg --compare-versions "$2" 'lt' "2012.1" && which gpg > /dev/null && which apt-key > /dev/null; then
		TRUSTEDFILE='/etc/apt/trusted.gpg'
		eval $(apt-config shell TRUSTEDFILE Apt::GPGV::TrustedKeyring)
		eval $(apt-config shell TRUSTEDFILE Dir::Etc::Trusted/f)
		if [ -e "$TRUSTEDFILE" ]; then
			for KEY in F42584E6 55BE302B 6D849617 B98321F9 473041FA 46925553 65FFB764; do
				apt-key --keyring "$TRUSTEDFILE" del $KEY > /dev/null 2>&1 || :
			done
		fi
	fi
fi

#DEBHELPER#