summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorPaul Eggleton <paul.eggleton@linux.intel.com>2015-12-22 17:02:55 +1300
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-01-15 15:51:40 +0000
commitbe40baa5a0bffd6e8512a830f43ce9ce20d0ff36 (patch)
tree52c1d5d02061a6f2f6ddb60660f480f1d1633869 /scripts
parenta897bfdbdc23ecc324f6a9edac783e780beff964 (diff)
downloadpoky-be40baa5a0bffd6e8512a830f43ce9ce20d0ff36.tar.gz
recipetool: create: handle https://....git URLs
When you grab a URL for a github repository you'll almost certainly find it in https://github.com/path/to/repository.git format; but bitbake's fetcher can't handle that because it'll see https:// at the start and assume it should use wget to fetch it. If the URL starts with http:// or https:// and the path part ends with .git then assume it's a git repository and adjust it accordingly. (From OE-Core master rev: bdbc4cf41d30eddb8a9ed882dedcc1670ce8fdd6) (From OE-Core rev: 9d41e993a95a7b60f1ed5f8e9ca887fdf393233c) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts')
-rw-r--r--scripts/lib/recipetool/create.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/scripts/lib/recipetool/create.py b/scripts/lib/recipetool/create.py
index 15aa9bdbb3..e2941d7753 100644
--- a/scripts/lib/recipetool/create.py
+++ b/scripts/lib/recipetool/create.py
@@ -108,6 +108,11 @@ def create_recipe(args):
108 # Assume the archive contains the directory structure verbatim 108 # Assume the archive contains the directory structure verbatim
109 # so we need to extract to a subdirectory 109 # so we need to extract to a subdirectory
110 fetchuri += ';subdir=%s' % os.path.splitext(os.path.basename(urlparse.urlsplit(fetchuri).path))[0] 110 fetchuri += ';subdir=%s' % os.path.splitext(os.path.basename(urlparse.urlsplit(fetchuri).path))[0]
111 git_re = re.compile('(https?)://([^;]+\.git)(;.*)?')
112 res = git_re.match(fetchuri)
113 if res:
114 # Need to switch the URI around so that the git fetcher is used
115 fetchuri = 'git://%s;protocol=%s%s' % (res.group(2), res.group(1), res.group(3) or '')
111 srcuri = fetchuri 116 srcuri = fetchuri
112 rev_re = re.compile(';rev=([^;]+)') 117 rev_re = re.compile(';rev=([^;]+)')
113 res = rev_re.search(srcuri) 118 res = rev_re.search(srcuri)