aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNeal Gompa <ngompa13@gmail.com>2020-01-05 16:32:04 -0500
committerNeal Gompa <ngompa13@gmail.com>2020-01-05 16:32:41 -0500
commit2bef753269e1f756da6a6735d62e304316fc968d (patch)
tree6387d08b6131d5ba7b2a9f1bc2306b41d99c126e
parentc5531c36c3dbab601c44ed0171e7cedcafc0b9e9 (diff)
downloadmageia4arm-2bef753269e1f756da6a6735d62e304316fc968d.tar
mageia4arm-2bef753269e1f756da6a6735d62e304316fc968d.tar.gz
mageia4arm-2bef753269e1f756da6a6735d62e304316fc968d.tar.bz2
mageia4arm-2bef753269e1f756da6a6735d62e304316fc968d.tar.xz
mageia4arm-2bef753269e1f756da6a6735d62e304316fc968d.zip
Install distribution-gpg-keys if it is not already installed
We need distribution-gpg-keys to provide us the Mageia GPG key file in the distribution-agnostic location. As this package is available on virtually every distribution that also has DNF, it's easily relied upon.
-rwxr-xr-xcreate_arm_image.sh9
1 files changed, 9 insertions, 0 deletions
diff --git a/create_arm_image.sh b/create_arm_image.sh
index 2479390..7b8e941 100755
--- a/create_arm_image.sh
+++ b/create_arm_image.sh
@@ -85,6 +85,15 @@ function verify_disk_space()
function createchroot()
{
title "Making chroot"
+ if ! [ -f /usr/share/distribution-gpg-keys/mageia/RPM-GPG-KEY-Mageia ]; then
+ title "distribution-gpg-keys package not present : installing distribution-gpg-keys"
+ /usr/bin/dnf --assumeyes --setopt=install_weak_deps=False install distribution-gpg-keys
+ if [ ${?} -ne 0 ]; then
+ error "line ${LINENO} can't install distribution-gpg-keys : exiting"
+ exit ${ERR_1}
+ fi
+ fi
+
if ! [ -f /bin/qemu-arm-static ]; then
title "Qemu package not present : installing qemu packages"
/usr/bin/dnf --assumeyes --setopt=install_weak_deps=False install qemu-user-static