devtool/sdk.py: error out in case of downloading file failure
cover devtool/sdk.py: error out in case of downloading file failure
The following changes since commit 5479654eeaaa0f81bfff54ca49369c87f1658705:
rm_work: Stop appending _setscene to do_image_complete_setscene stamps (2018-05-11 07:49:38 +0100)
are available in the git repository at:
git://git.pokylinux.org/poky-contrib ChenQi/devtool-sdk-update
http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=ChenQi/devtool-sdk-update
Chen Qi (1):
devtool/sdk.py: error out in case of downloading file failure
scripts/lib/devtool/sdk.py | 3 +++ 1 file changed, 3 insertions(+)
Signature · 1 line
1.9.1
PATCH 1/1 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.
--- scripts/lib/devtool/sdk.py | 3 +++ 1 file changed, 3 insertions(+)
scripts/lib/devtool/sdk.py +3 -0
@@ -145,6 +145,9 @@ def sdk_update(args, config, basepath, workspace): # Fetch manifest from server tmpmanifest = os.path.join(tmpsdk_dir, 'conf', 'sdk-conf-manifest') ret = subprocess.call("wget -q -O %s %s/conf/sdk-conf-manifest" % (tmpmanifest, updateserver), shell=True) + if ret != 0: + logger.error("Cannot dowload files from %s" % updateserver) + return ret changedfiles = check_manifest(tmpmanifest, basepath) if not changedfiles: logger.info("Already up-to-date")
Signature · 1 line
1.9.1