[oe-commits] [openembedded-core] 02/02: devtool/sdk.py: error out in case of downloading file failure

git at git.openembedded.org git at git.openembedded.org
Mon May 14 13:02:00 UTC 2018


This is an automated email from the git hooks/post-receive script.

rpurdie pushed a commit to branch master-next
in repository openembedded-core.

commit de3f0fc98790fefeff11dbb0ed27dc663c5e3437
Author: Chen Qi <Qi.Chen at windriver.com>
AuthorDate: Mon May 14 16:35:22 2018 +0800

    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.
    
    Signed-off-by: Chen Qi <Qi.Chen at windriver.com>
    Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
 scripts/lib/devtool/sdk.py | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/scripts/lib/devtool/sdk.py b/scripts/lib/devtool/sdk.py
index f46577c..4616753 100644
--- a/scripts/lib/devtool/sdk.py
+++ b/scripts/lib/devtool/sdk.py
@@ -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")

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Openembedded-commits mailing list