aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xfunctions.sh12
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;