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.
This commit is contained in:
Michael Shigorin 2016-12-26 17:19:59 +03:00
parent 524d38b0f4
commit 3bfaf9c014

View File

@ -1,4 +1,9 @@
#!/bin/sh #!/bin/sh
# generate current plaintext rpm pubring representation # 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