summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorMarkus Lehtonen <markus.lehtonen@linux.intel.com>2015-09-11 13:08:08 +0300
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-09-12 22:48:46 +0100
commit06cde90f9f4f35f0f8a1d7bf13e11e2559ad683b (patch)
treed292dd901043f37309366f2bd8e46b02a8258458 /scripts
parent9cda8f782f27f48fba258bcd828d43e63f344b29 (diff)
downloadpoky-06cde90f9f4f35f0f8a1d7bf13e11e2559ad683b.tar.gz
devtool: update-recipe: get srcuri parameters with decodeurl()
Use already existing bb.fetch.decodeurl() for getting the parameters for a URI. This is more fault tolerant and maintainable. (From OE-Core rev: cd201664b827e37fcabca272262016b171e997d9) Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts')
-rw-r--r--scripts/lib/devtool/standard.py7
1 files changed, 2 insertions, 5 deletions
diff --git a/scripts/lib/devtool/standard.py b/scripts/lib/devtool/standard.py
index 5263af56c8..d5900b4f82 100644
--- a/scripts/lib/devtool/standard.py
+++ b/scripts/lib/devtool/standard.py
@@ -761,11 +761,8 @@ def _guess_recipe_update_mode(srctree, rdata):
761 # Just use the first URI for now 761 # Just use the first URI for now
762 uri = git_uris[0] 762 uri = git_uris[0]
763 # Check remote branch 763 # Check remote branch
764 upstr_branch = 'master' 764 params = bb.fetch.decodeurl(uri)[5]
765 for paramdef in uri.split(';')[1:]: 765 upstr_branch = params['branch'] if 'branch' in params else 'master'
766 name, value = paramdef.split('=', 1)
767 if name == 'branch':
768 upstr_branch = value
769 # Check if current branch HEAD is found in upstream branch 766 # Check if current branch HEAD is found in upstream branch
770 stdout, _ = bb.process.run('git rev-parse HEAD', cwd=srctree) 767 stdout, _ = bb.process.run('git rev-parse HEAD', cwd=srctree)
771 head_rev = stdout.rstrip() 768 head_rev = stdout.rstrip()