recipetool: create: fix overzealous mapping of git URLs

The regex for detecting git URLs was unanchored, leading to it matching
where it shouldn't have. An example of where this went wrong was
http://taglib.github.io/releases/taglib-1.9.1.tar.gz.

(From OE-Core rev: bacff751c88b680fbfb07843b18c59c8bc80a9ea)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Paul Eggleton 2016-01-19 00:18:30 +13:00 committed by Richard Purdie
parent ece0a2e1a0
commit 788e4bb23e
1 changed files with 1 additions and 1 deletions

View File

@ -140,7 +140,7 @@ def create_recipe(args):
# Assume the archive contains the directory structure verbatim
# so we need to extract to a subdirectory
fetchuri += ';subdir=%s' % os.path.splitext(os.path.basename(urlparse.urlsplit(fetchuri).path))[0]
git_re = re.compile('(https?)://([^;]+\.git)(;.*)?')
git_re = re.compile('(https?)://([^;]+\.git)(;.*)?$')
res = git_re.match(fetchuri)
if res:
# Need to switch the URI around so that the git fetcher is used