diff options
author | Patrick Vacek <patrickvacek@gmail.com> | 2018-07-17 14:23:59 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-07-17 14:23:59 +0200 |
commit | 919ed233dc8d628ec33e61dcb576b8e1323a6eeb (patch) | |
tree | 5b5659ed964a25ffdeccc7b3fdec749b8a653c30 | |
parent | 739653d625a776b244b2086e28594bc52a849cf2 (diff) | |
parent | f58f82942cb414af358dab00f1bd516374712512 (diff) | |
download | meta-updater-919ed233dc8d628ec33e61dcb576b8e1323a6eeb.tar.gz |
Merge pull request #359 from advancedtelematic/feat/bump-aktualizr-pro-h#3-sumo
Feat/bump aktualizr pro h#3 sumo
-rwxr-xr-x | recipes-sota/aktualizr/aktualizr_git.bb | 2 | ||||
-rw-r--r-- | recipes-sota/aktualizr/garage-sign-version.inc | 17 |
2 files changed, 16 insertions, 3 deletions
diff --git a/recipes-sota/aktualizr/aktualizr_git.bb b/recipes-sota/aktualizr/aktualizr_git.bb index ac3e070..52a69f8 100755 --- a/recipes-sota/aktualizr/aktualizr_git.bb +++ b/recipes-sota/aktualizr/aktualizr_git.bb | |||
@@ -26,7 +26,7 @@ SRC_URI = " \ | |||
26 | file://aktualizr-secondary.socket \ | 26 | file://aktualizr-secondary.socket \ |
27 | file://aktualizr-serialcan.service \ | 27 | file://aktualizr-serialcan.service \ |
28 | " | 28 | " |
29 | SRCREV = "72abac76184c84b9a5beb0dfbb103a13b9bfb2ae" | 29 | SRCREV = "e9faff35ffa8c31cbf3c5fb1c3c6ed4f5f50e500" |
30 | BRANCH ?= "master" | 30 | BRANCH ?= "master" |
31 | 31 | ||
32 | S = "${WORKDIR}/git" | 32 | S = "${WORKDIR}/git" |
diff --git a/recipes-sota/aktualizr/garage-sign-version.inc b/recipes-sota/aktualizr/garage-sign-version.inc index f2d04e8..1b89a3d 100644 --- a/recipes-sota/aktualizr/garage-sign-version.inc +++ b/recipes-sota/aktualizr/garage-sign-version.inc | |||
@@ -11,8 +11,21 @@ python () { | |||
11 | url = url_file.read().decode().strip(' \t\n') + '/health/version' | 11 | url = url_file.read().decode().strip(' \t\n') + '/health/version' |
12 | except (KeyError, ValueError, RuntimeError): | 12 | except (KeyError, ValueError, RuntimeError): |
13 | return | 13 | return |
14 | r = urllib.request.urlopen(url) | 14 | connected = False |
15 | if r.code != 200: | 15 | tries = 3 |
16 | for i in range(tries): | ||
17 | try: | ||
18 | r = urllib.request.urlopen(url) | ||
19 | if r.code == 200: | ||
20 | connected = True | ||
21 | break | ||
22 | else: | ||
23 | print('Bad return code from server ' + url + ': ' + str(r.code) + | ||
24 | ' (attempt ' + str(i + 1) + ' of ' + str(tries) + ')') | ||
25 | except urllib.error.URLError as e: | ||
26 | print('Error connecting to server ' + url + ': ' + str(e) + | ||
27 | ' (attempt ' + str(i + 1) + ' of ' + str(tries) + ')') | ||
28 | if not connected: | ||
16 | return | 29 | return |
17 | resp = r.read().decode('utf-8') | 30 | resp = r.read().decode('utf-8') |
18 | j = json.loads(resp) | 31 | j = json.loads(resp) |