summaryrefslogtreecommitdiffstats
path: root/classes/sota_sanity.bbclass
diff options
context:
space:
mode:
Diffstat (limited to 'classes/sota_sanity.bbclass')
-rw-r--r--classes/sota_sanity.bbclass10
1 files changed, 7 insertions, 3 deletions
diff --git a/classes/sota_sanity.bbclass b/classes/sota_sanity.bbclass
index 3678e33..1339fb3 100644
--- a/classes/sota_sanity.bbclass
+++ b/classes/sota_sanity.bbclass
@@ -27,12 +27,16 @@ def sota_check_variables_validity(status, d):
27 prov = d.getVar("SOTA_CLIENT_PROV").strip() 27 prov = d.getVar("SOTA_CLIENT_PROV").strip()
28 if prov not in ("aktualizr-shared-prov", "aktualizr-device-prov", "aktualizr-device-prov-hsm", ""): 28 if prov not in ("aktualizr-shared-prov", "aktualizr-device-prov", "aktualizr-device-prov-hsm", ""):
29 status.addresult("Valid options for SOTA_CLIENT_PROV are aktualizr-shared-prov, aktualizr-device-prov and aktualizr-device-prov-hsm.\n") 29 status.addresult("Valid options for SOTA_CLIENT_PROV are aktualizr-shared-prov, aktualizr-device-prov and aktualizr-device-prov-hsm.\n")
30 if prov == "aktualizr-auto-prov":
31 bb.warn('aktualizr-auto-prov is deprecated. Please use aktualizr-shared-prov instead.')
32 elif prov == "aktualizr-ca-implicit-prov":
33 bb.warn('aktualizr-ca-implicit-prov is deprecated. Please use aktualizr-device-prov instead.')
34 elif prov == "aktualizr-hsm-prov":
35 bb.warn('aktualizr-hsm-prov is deprecated. Please use aktualizr-device-prov-hsm instead.')
30 if d.getVar("GARAGE_TARGET_URL") and re.match("^(https?|ftp|file)://.+$", d.getVar("GARAGE_TARGET_URL")) is None: 36 if d.getVar("GARAGE_TARGET_URL") and re.match("^(https?|ftp|file)://.+$", d.getVar("GARAGE_TARGET_URL")) is None:
31 status.addresult("GARAGE_TARGET_URL is set to a bad url.\n") 37 status.addresult("GARAGE_TARGET_URL is set to a bad url.\n")
32 if d.getVar("SOTA_POLLING_SEC") and re.match("^(0|\+?[1-9][0-9]*)$", d.getVar("SOTA_POLLING_SEC")) is None: 38 if d.getVar("SOTA_POLLING_SEC") and re.match("^[1-9]\d*|0$", d.getVar("SOTA_POLLING_SEC")) is None:
33 status.addresult("SOTA_POLLING_SEC should be an integer.\n") 39 status.addresult("SOTA_POLLING_SEC should be an integer.\n")
34 if d.getVar("OSTREE_REPO") and re.match("^\/([a-zA-Z0-9_-]+\/?)+$", d.getVar("OSTREE_REPO")) is None:
35 status.addresult("OSTREE_REPO is not set correctly. Path to your OSTree repository is invalid.\n")
36 config = d.getVar("SOTA_SECONDARY_CONFIG") 40 config = d.getVar("SOTA_SECONDARY_CONFIG")
37 if config is not None and config != "": 41 if config is not None and config != "":
38 path = os.path.abspath(config) 42 path = os.path.abspath(config)