]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
devtool/upgrade: catch bb.fetch2.decodeurl errors
authorAlexander Kanavin <alex.kanavin@gmail.com>
Mon, 1 Aug 2022 15:44:34 +0000 (17:44 +0200)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 4 Aug 2022 15:26:03 +0000 (16:26 +0100)
Otherwise, workspace cleanup (removing bogus recipe and source tree)
will not happen, leaving breakage behind.

Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
scripts/lib/devtool/upgrade.py

index c57015eb40c5ec73c901fedecabc280728efff78..39a1910a494c7a02819ff590d64cadc35a58d0a6 100644 (file)
@@ -336,7 +336,10 @@ def _create_new_recipe(newpv, md5, sha256, srcrev, srcbranch, srcsubdir_old, src
         replacing = True
         new_src_uri = []
         for entry in src_uri:
-            scheme, network, path, user, passwd, params = bb.fetch2.decodeurl(entry)
+            try:
+                scheme, network, path, user, passwd, params = bb.fetch2.decodeurl(entry)
+            except bb.fetch2.MalformedUrl as e:
+                raise DevtoolError("Could not decode SRC_URI: {}".format(e))
             if replacing and scheme in ['git', 'gitsm']:
                 branch = params.get('branch', 'master')
                 if rd.expand(branch) != srcbranch: