From 3bfaf9c01422791435c882ea9120db939de0d6c8 Mon Sep 17 00:00:00 2001 From: Michael Shigorin Date: Mon, 26 Dec 2016 17:19:59 +0300 Subject: [PATCH] repo: harden against missing keydir rpm-4.13 stopped bringing alt-gpgkeys in, and specifying it explicitly for STAGE1_PACKAGES didn't help somehow; don't presume /usr/lib/alt-gpgkeys/ existence anyways. --- features.in/repo/scripts.d/02-pubring | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/features.in/repo/scripts.d/02-pubring b/features.in/repo/scripts.d/02-pubring index b353202e..af1f5478 100755 --- a/features.in/repo/scripts.d/02-pubring +++ b/features.in/repo/scripts.d/02-pubring @@ -1,4 +1,9 @@ #!/bin/sh # generate current plaintext rpm pubring representation +KEYDIR="/usr/lib/alt-gpgkeys" -gpg --export --armor --homedir=/usr/lib/alt-gpgkeys >$WORKDIR/RPM-GPG-KEY +if [ -d "$KEYDIR" ]; then + gpg --export --armor --homedir="$KEYDIR" >$WORKDIR/RPM-GPG-KEY +else + echo "** warning: skipping RPM-GPG-KEY generation, $KEYDIR missing" >&2 +fi