From 2bef753269e1f756da6a6735d62e304316fc968d Mon Sep 17 00:00:00 2001 From: Neal Gompa Date: Sun, 5 Jan 2020 16:32:04 -0500 Subject: [PATCH] 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. --- create_arm_image.sh | 9 +++++++++ 1 file changed, 9 insertions(+) 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