]> code.ossystems Code Review - openembedded-core.git/commitdiff
recipetool: create: ensure URL parameters don't make it into the name
authorPaul Eggleton <paul.eggleton@linux.intel.com>
Thu, 11 Feb 2016 01:13:33 +0000 (14:13 +1300)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 11 Feb 2016 12:32:56 +0000 (12:32 +0000)
When auto-detecting the name for a recipe from the URL, strip off any
parameters (";name=value...") before parsing the URL, otherwise this
just ends up in the recipe name which is undesirable.

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 ee27f8de855480b0605f1374a525abedb8eee205..f6d75150bf6180b814593a8d2f0229757e9b4ab2 100644 (file)
@@ -251,7 +251,7 @@ def determine_from_url(srcuri):
     """Determine name and version from a URL"""
     pn = None
     pv = None
-    parseres = urlparse.urlparse(srcuri.lower())
+    parseres = urlparse.urlparse(srcuri.lower().split(';', 1)[0])
     if parseres.path:
         if 'github.com' in parseres.netloc:
             res = re.search(r'.*/(.*?)/archive/(.*)-final\.(tar|zip)', parseres.path)