]> code.ossystems Code Review - openembedded-core.git/commitdiff
recipetool: create: fix overzealous mapping of git URLs
authorPaul Eggleton <paul.eggleton@linux.intel.com>
Mon, 18 Jan 2016 11:18:30 +0000 (00:18 +1300)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Tue, 19 Jan 2016 16:35:38 +0000 (16:35 +0000)
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.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
scripts/lib/recipetool/create.py

index 4f95d7e3ae729160a64ccf831c09a7a7c96698c7..1218a7d284c9b3e2d467007216fb0fe961153505 100644 (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