summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorAlexander Kanavin <alex.kanavin@gmail.com>2022-08-01 17:44:34 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2022-08-23 15:22:52 +0100
commit0ff2b0bbf84a06e7a700b3b7ee49fcd01cc4de2f (patch)
tree8a04d801204febf7ac2e9e1916fe9a372bd650f7 /scripts
parent53019423e471cca2fcaf35709bdc9dc95c4a28dc (diff)
downloadpoky-0ff2b0bbf84a06e7a700b3b7ee49fcd01cc4de2f.tar.gz
devtool/upgrade: catch bb.fetch2.decodeurl errors
Otherwise, workspace cleanup (removing bogus recipe and source tree) will not happen, leaving breakage behind. (From OE-Core rev: 72bfdca08029c031cedc9dbbf366663632c1c8db) Signed-off-by: Alexander Kanavin <alex@linutronix.de> Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com> (cherry picked from commit 74774f9b67580a8c56f605dfd4cc7b856bbeeae8) Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts')
-rw-r--r--scripts/lib/devtool/upgrade.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/scripts/lib/devtool/upgrade.py b/scripts/lib/devtool/upgrade.py
index c57015eb40..39a1910a49 100644
--- a/scripts/lib/devtool/upgrade.py
+++ b/scripts/lib/devtool/upgrade.py
@@ -336,7 +336,10 @@ def _create_new_recipe(newpv, md5, sha256, srcrev, srcbranch, srcsubdir_old, src
336 replacing = True 336 replacing = True
337 new_src_uri = [] 337 new_src_uri = []
338 for entry in src_uri: 338 for entry in src_uri:
339 scheme, network, path, user, passwd, params = bb.fetch2.decodeurl(entry) 339 try:
340 scheme, network, path, user, passwd, params = bb.fetch2.decodeurl(entry)
341 except bb.fetch2.MalformedUrl as e:
342 raise DevtoolError("Could not decode SRC_URI: {}".format(e))
340 if replacing and scheme in ['git', 'gitsm']: 343 if replacing and scheme in ['git', 'gitsm']:
341 branch = params.get('branch', 'master') 344 branch = params.get('branch', 'master')
342 if rd.expand(branch) != srcbranch: 345 if rd.expand(branch) != srcbranch: