summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDarren Hart <dvhart@linux.intel.com>2012-10-18 14:23:23 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2012-10-24 12:48:24 +0100
commit952b879de5ffdb04a706fc4e2824696b25c4bf11 (patch)
treea384e8e7892eaa6e6878a1c16931f45f5203b442
parenta3d5e9e6b7729319c518dcaf25bbe0643bfb25db (diff)
downloadpoky-952b879de5ffdb04a706fc4e2824696b25c4bf11.tar.gz
yocto-bsp: Fix git url parsing, allowing for local mirrors
The git URLs used in bitbake recipes are not compatible directly with git. In bitbake-speak, all git URLs start with git:// and the protocol is optionally specified in the SRC_URI. Local git mirrors are specified like so: git:///path/to/local/mirror.git;protocol=file The URL that git requires would be: file:///path/to/local/mirror.git Update the yocto-bsp kernel.py to make the necessary adjustment when parsing the SRC_URI to extract the git URL. (From meta-yocto rev: 30506f51cc95f0994cf54144295832e931d15f61) Signed-off-by: Darren Hart <dvhart@linux.intel.com> CC: Tom Zanussi <tom.zanussi@intel.com> CC: evadeflow@gmail.com Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-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):