summaryrefslogtreecommitdiffstats
path: root/scripts/lib/bsp/kernel.py
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/lib/bsp/kernel.py')
-rw-r--r--scripts/lib/bsp/kernel.py14
1 files changed, 10 insertions, 4 deletions
diff --git a/scripts/lib/bsp/kernel.py b/scripts/lib/bsp/kernel.py
index d4bdc4c250..128fad0dfa 100644
--- a/scripts/lib/bsp/kernel.py
+++ b/scripts/lib/bsp/kernel.py
@@ -631,6 +631,7 @@ def extract_giturl(file):
631 Extract the git url of the kernel repo from the kernel recipe's 631 Extract the git url of the kernel repo from the kernel recipe's
632 SRC_URI. 632 SRC_URI.
633 """ 633 """
634 url = None
634 f = open(file, "r") 635 f = open(file, "r")
635 lines = f.readlines() 636 lines = f.readlines()
636 for line in lines: 637 for line in lines:
@@ -641,10 +642,15 @@ def extract_giturl(file):
641 line = line[1:].strip() 642 line = line[1:].strip()
642 if line.startswith("\""): 643 if line.startswith("\""):
643 line = line[1:].strip() 644 line = line[1:].strip()
644 fields = line.split(";") 645 prot = "git"
645 if fields: 646 for s in line.split(";"):
646 return fields[0] 647 if s.startswith("git://"):
647 return None 648 url = s
649 if s.startswith("protocol="):
650 prot = s.split("=")[1]
651 if url:
652 url = prot + url[3:]
653 return url
648 654
649 655
650def find_giturl(context): 656def find_giturl(context):