Check existence of rhel rpm key

The key 'RPM-GPG-KEY-redhat-release' may not exist in image
e.g. when you use non-default image (for example, if you build CentOS
image using rhel element).

Fixes bug #1252697

Change-Id: Iae642abb7a7f76c5528750dafedd4fd4bda56fe2
This commit is contained in:
iberezovskiy 2013-11-19 15:13:48 +04:00
parent 808735872d
commit 41caf597a5

View File

@ -33,6 +33,8 @@ do
fi
done
if [ -n "$WHITELIST" ]; then
rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
if [ -f /etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release ]; then
rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
fi
yum -y install $(map-packages $WHITELIST)
fi