aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorScott Murray <scott.murray@konsulko.com>2024-01-04 19:56:30 -0500
committerScott Murray <scott.murray@konsulko.com>2024-01-05 16:40:12 +0000
commit608d983bdfb90929689bd0eb31e4bc5ca11f8881 (patch)
tree281dce70b1217806cd392a33445202fd3169d8f3
parentae1ebd3ab2b5c3d5ea8ed8fc55915c070e629743 (diff)
ondemandnavi-config: Enable Mapbox if MAPBOX_ACCESS_TOKEN is set
To avoid needing manual modifications to enable Mapbox support, rework the ondemandnavi-config recipe to update the configuration file to enable it if the MAPBOX_ACCESS_TOKEN variable is set, and remove the placeholder value for MAPBOX_ACCESS_TOKEN. Bug-AGL: SPEC-5041 Change-Id: Ia6490363b2de6ddf862f25f1c1e0b5eea21c3107 Signed-off-by: Naoto Yamaguchi <naoto.yamaguchi@aisin.co.jp> Signed-off-by: Scott Murray <scott.murray@konsulko.com> Reviewed-on: https://gerrit.automotivelinux.org/gerrit/c/AGL/meta-agl-demo/+/29572 ci-image-build: Jenkins Job builder account ci-image-boot-test: Jenkins Job builder account Tested-by: Jenkins Job builder account
-rw-r--r--recipes-demo/navigation/ondemandnavi-config_1.0.bb7
1 files changed, 5 insertions, 2 deletions
diff --git a/recipes-demo/navigation/ondemandnavi-config_1.0.bb b/recipes-demo/navigation/ondemandnavi-config_1.0.bb
index 212971f26..644102ed3 100644
--- a/recipes-demo/navigation/ondemandnavi-config_1.0.bb
+++ b/recipes-demo/navigation/ondemandnavi-config_1.0.bb
@@ -11,11 +11,14 @@ SRC_URI = "file://naviconfig.ini \
inherit allarch
-MAPBOX_ACCESS_TOKEN ?= "Please set mapbox access token"
+MAPBOX_ACCESS_TOKEN ?= ""
do_compile[noexec] = "1"
do_install () {
install -D -m 644 ${WORKDIR}/naviconfig.ini ${D}${sysconfdir}/naviconfig.ini
- sed -i -e 's/MAPBOX_ACCESS_TOKEN/${MAPBOX_ACCESS_TOKEN}/' ${D}${sysconfdir}/naviconfig.ini
+ if [ -n "${MAPBOX_ACCESS_TOKEN}" ]; then
+ sed -i -e 's/MAPBOX_ACCESS_TOKEN/${MAPBOX_ACCESS_TOKEN}/;s/\("enableOSM":\)true/\1false/' \
+ ${D}${sysconfdir}/naviconfig.ini
+ fi
}