kas-container: Run enable_isar_mode only once

If both --isar is provide and build_system is set, enable_isar_mode will
be called twice that leads to KAS_CONTAINER_COMMAND gaining two "sudo" -
harmless but unneeded.

Reported-by: Florian Bezdeka <florian.bezdeka@siemens.com>
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
This commit is contained in:
Jan Kiszka 2022-01-27 12:03:03 +01:00
parent 3318a5c79c
commit 6abf837eab

View File

@ -2,7 +2,7 @@
#
# kas - setup tool for bitbake based projects
#
# Copyright (c) Siemens AG, 2018-2021
# Copyright (c) Siemens AG, 2018-2022
#
# Authors:
# Jan Kiszka <jan.kiszka@siemens.com>
@ -83,6 +83,11 @@ trace()
}
enable_isar_mode() {
if [ -n "${ISAR_MODE}" ]; then
return
fi
ISAR_MODE=1
KAS_CONTAINER_IMAGE_NAME_DEFAULT="kas-isar"
KAS_ISAR_ARGS="--privileged"