diff options
author | Pascal Terjan <pterjan@mageia.org> | 2020-11-27 21:10:07 +0000 |
---|---|---|
committer | Pascal Terjan <pterjan@mageia.org> | 2020-12-19 15:02:13 +0000 |
commit | 65e8d86e885d8b6757248ea33ac0bb9ee2698cbf (patch) | |
tree | e5590728d13e054ddd797f297e765b92f2e461fd /functions.sh | |
parent | c94369576f770688a905f562419d683e70e36870 (diff) | |
download | mageia4arm-65e8d86e885d8b6757248ea33ac0bb9ee2698cbf.tar mageia4arm-65e8d86e885d8b6757248ea33ac0bb9ee2698cbf.tar.gz mageia4arm-65e8d86e885d8b6757248ea33ac0bb9ee2698cbf.tar.bz2 mageia4arm-65e8d86e885d8b6757248ea33ac0bb9ee2698cbf.tar.xz mageia4arm-65e8d86e885d8b6757248ea33ac0bb9ee2698cbf.zip |
Install distribution-gpg-keys and qemu-user-static outside the chroot
Diffstat (limited to 'functions.sh')
-rwxr-xr-x | functions.sh | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/functions.sh b/functions.sh index c33f55e..549c627 100755 --- a/functions.sh +++ b/functions.sh @@ -93,7 +93,7 @@ function createchroot() { 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 - installpkg "distribution-gpg-keys" "--setopt=install_weak_deps=False" + installhostpkg "distribution-gpg-keys" "--setopt=install_weak_deps=False" if [ ${?} -ne 0 ]; then error "line ${LINENO} can't install distribution-gpg-keys : exiting" cleanExit ${ERR_1} @@ -103,7 +103,7 @@ function createchroot() { if ! [ -f /usr/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 - installpkg "qemu-user-static" "--setopt=install_weak_deps=False" + installhostpkg "qemu-user-static" "--setopt=install_weak_deps=False" if [ ${?} -ne 0 ]; then error "line ${LINENO} can't install qemu-user-static : exiting" cleanExit ${ERR_1} @@ -298,6 +298,14 @@ function installbasesystem() { return 0 } +function installhostpkg() { + if [ ${INSTALL_METHOD} = "urpmi" ]; then + /usr/sbin/urpmi --auto $3 $1; + else + /usr/bin/dnf $2 ${DNF_MIRROROPTS} --assumeyes install $1; + fi +} + function installpkg() { if [ ${INSTALL_METHOD} = "urpmi" ]; then /usr/sbin/urpmi --urpmi-root "${BUILD_PATH}" --root "${BUILD_PATH}" --ignorearch --no-verify-rpm --auto --split-level 200 --split-length 200 $3 $1; |