summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorChen Qi <Qi.Chen@windriver.com>2018-05-14 16:35:22 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2018-08-16 10:00:08 +0100
commit6069ffb48d91819f4e3ef12af52cc78ed3ea267c (patch)
tree0de37cdd166f64be8cd4822ac582bfc001a28336 /scripts
parent5b5ebab2998b2f6c05edf933cd54a1592d4bcc5c (diff)
downloadpoky-6069ffb48d91819f4e3ef12af52cc78ed3ea267c.tar.gz
devtool/sdk.py: error out in case of downloading file failure
It's possible that downloading file from updateserver fails. In this case, we should error out instead of continue. We have users reporting unexpected behavior of 'devtool sdk-update'. When an invalid url is supplied, e.g., `devtool sdk-update http://invalid', the program reports 'Note: Already up-to-date'. This is obviously not expected. We should error out in such case. (From OE-Core rev: 449564783dfb162536a2f772b3a8704973221e0f) (From OE-Core rev: 61a56f6c5db9a3575a21f0c206f0fa760cf005e0) Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Armin Kuster <akuster808@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts')
-rw-r--r--scripts/lib/devtool/sdk.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/scripts/lib/devtool/sdk.py b/scripts/lib/devtool/sdk.py
index f46577c2ab..4616753797 100644
--- a/scripts/lib/devtool/sdk.py
+++ b/scripts/lib/devtool/sdk.py
@@ -145,6 +145,9 @@ def sdk_update(args, config, basepath, workspace):
145 # Fetch manifest from server 145 # Fetch manifest from server
146 tmpmanifest = os.path.join(tmpsdk_dir, 'conf', 'sdk-conf-manifest') 146 tmpmanifest = os.path.join(tmpsdk_dir, 'conf', 'sdk-conf-manifest')
147 ret = subprocess.call("wget -q -O %s %s/conf/sdk-conf-manifest" % (tmpmanifest, updateserver), shell=True) 147 ret = subprocess.call("wget -q -O %s %s/conf/sdk-conf-manifest" % (tmpmanifest, updateserver), shell=True)
148 if ret != 0:
149 logger.error("Cannot dowload files from %s" % updateserver)
150 return ret
148 changedfiles = check_manifest(tmpmanifest, basepath) 151 changedfiles = check_manifest(tmpmanifest, basepath)
149 if not changedfiles: 152 if not changedfiles:
150 logger.info("Already up-to-date") 153 logger.info("Already up-to-date")