diff options
author | Alexander Kanavin <alex.kanavin@gmail.com> | 2022-08-01 17:44:34 +0200 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2022-08-04 16:27:25 +0100 |
commit | a782a46c372606d1729b738b6dd03f762b8672da (patch) | |
tree | 640017b2d64c496e492358fa0c54dbfbec4a9a0f /scripts/lib/devtool/upgrade.py | |
parent | b8c5b2bfd530735a0fab8ce4f0d0e9f76496f3cb (diff) | |
download | poky-a782a46c372606d1729b738b6dd03f762b8672da.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: 74774f9b67580a8c56f605dfd4cc7b856bbeeae8)
Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts/lib/devtool/upgrade.py')
-rw-r--r-- | scripts/lib/devtool/upgrade.py | 5 |
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: |