diff options
author | Ming Liu <ming.liu@toradex.com> | 2020-05-11 19:49:31 +0200 |
---|---|---|
committer | Ming Liu <ming.liu@toradex.com> | 2020-05-11 19:53:55 +0200 |
commit | a7189aae28cf3181daebc89c0bc609f4ef8ea5fb (patch) | |
tree | 35f5703a8b721e8d6726ac4e7eb17e9e4806fff5 /recipes-sota | |
parent | 82d7e04924f847bccba3136d1602d5646486a926 (diff) | |
download | meta-updater-a7189aae28cf3181daebc89c0bc609f4ef8ea5fb.tar.gz |
sota_sanity.bbclass: introduce sota_check_boolean_variable
The current sanity check are too strict for some boolean variables,
introduce sota_check_boolean_variable to allow a boolean value to be
set like yes/y/true/t/1 or no/n/false/f/0.
Also change to use oe.types.boolean to check their values.
Signed-off-by: Ming Liu <ming.liu@toradex.com>
Diffstat (limited to 'recipes-sota')
-rw-r--r-- | recipes-sota/aktualizr/aktualizr-shared-prov.bb | 2 | ||||
-rw-r--r-- | recipes-sota/aktualizr/aktualizr_git.bb | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/recipes-sota/aktualizr/aktualizr-shared-prov.bb b/recipes-sota/aktualizr/aktualizr-shared-prov.bb index 2ee47a1..0f712df 100644 --- a/recipes-sota/aktualizr/aktualizr-shared-prov.bb +++ b/recipes-sota/aktualizr/aktualizr-shared-prov.bb | |||
@@ -10,7 +10,7 @@ inherit allarch | |||
10 | # We need to get the config files from the aktualizr-host-tools package built by | 10 | # We need to get the config files from the aktualizr-host-tools package built by |
11 | # the aktualizr (target) recipe. | 11 | # the aktualizr (target) recipe. |
12 | DEPENDS = "aktualizr" | 12 | DEPENDS = "aktualizr" |
13 | RDEPENDS_${PN}_append = "${@' aktualizr-shared-prov-creds' if d.getVar('SOTA_DEPLOY_CREDENTIALS') == '1' else ''}" | 13 | RDEPENDS_${PN}_append = "${@' aktualizr-shared-prov-creds' if oe.types.boolean(d.getVar('SOTA_DEPLOY_CREDENTIALS')) else ''}" |
14 | 14 | ||
15 | # If the config file from aktualizr used here is changed, you will need to bump | 15 | # If the config file from aktualizr used here is changed, you will need to bump |
16 | # the version here because of SIGGEN_EXCLUDE_SAFE_RECIPE_DEPS! | 16 | # the version here because of SIGGEN_EXCLUDE_SAFE_RECIPE_DEPS! |
diff --git a/recipes-sota/aktualizr/aktualizr_git.bb b/recipes-sota/aktualizr/aktualizr_git.bb index b1bee82..50f0c34 100644 --- a/recipes-sota/aktualizr/aktualizr_git.bb +++ b/recipes-sota/aktualizr/aktualizr_git.bb | |||
@@ -26,7 +26,7 @@ SRC_URI = " \ | |||
26 | file://aktualizr-secondary.service \ | 26 | file://aktualizr-secondary.service \ |
27 | file://aktualizr-serialcan.service \ | 27 | file://aktualizr-serialcan.service \ |
28 | file://10-resource-control.conf \ | 28 | file://10-resource-control.conf \ |
29 | ${@ d.expand("https://tuf-cli-releases.ota.here.com/cli-${GARAGE_SIGN_PV}.tgz;unpack=0;name=garagesign") if d.getVar('GARAGE_SIGN_AUTOVERSION') != '1' else ''} \ | 29 | ${@ d.expand("https://tuf-cli-releases.ota.here.com/cli-${GARAGE_SIGN_PV}.tgz;unpack=0;name=garagesign") if not oe.types.boolean(d.getVar('GARAGE_SIGN_AUTOVERSION')) else ''} \ |
30 | " | 30 | " |
31 | 31 | ||
32 | SRC_URI[garagesign.md5sum] = "febc186527b324b23c5be3affcf90e54" | 32 | SRC_URI[garagesign.md5sum] = "febc186527b324b23c5be3affcf90e54" |
@@ -49,7 +49,7 @@ SYSTEMD_SERVICE_${PN}-secondary = "aktualizr-secondary.service" | |||
49 | 49 | ||
50 | EXTRA_OECMAKE = "-DCMAKE_BUILD_TYPE=Release ${@bb.utils.contains('PTEST_ENABLED', '1', '-DTESTSUITE_VALGRIND=on', '', d)}" | 50 | EXTRA_OECMAKE = "-DCMAKE_BUILD_TYPE=Release ${@bb.utils.contains('PTEST_ENABLED', '1', '-DTESTSUITE_VALGRIND=on', '', d)}" |
51 | 51 | ||
52 | GARAGE_SIGN_OPS = "${@ d.expand('-DGARAGE_SIGN_ARCHIVE=${WORKDIR}/cli-${GARAGE_SIGN_PV}.tgz') if d.getVar('GARAGE_SIGN_AUTOVERSION') != '1' else ''}" | 52 | GARAGE_SIGN_OPS = "${@ d.expand('-DGARAGE_SIGN_ARCHIVE=${WORKDIR}/cli-${GARAGE_SIGN_PV}.tgz') if not oe.types.boolean(d.getVar('GARAGE_SIGN_AUTOVERSION')) else ''}" |
53 | PKCS11_ENGINE_PATH = "${libdir}/engines-1.1/pkcs11.so" | 53 | PKCS11_ENGINE_PATH = "${libdir}/engines-1.1/pkcs11.so" |
54 | 54 | ||
55 | PACKAGECONFIG ?= "ostree ${@bb.utils.filter('SOTA_CLIENT_FEATURES', 'hsm serialcan ubootenv', d)}" | 55 | PACKAGECONFIG ?= "ostree ${@bb.utils.filter('SOTA_CLIENT_FEATURES', 'hsm serialcan ubootenv', d)}" |