mirror of
https://git.yoctoproject.org/poky
synced 2026-04-20 18:32:12 +02:00
recipetool: create: fix extraction of name from URLs ending in /
If the URL ends in a / then we want to strip that off the path we split out of the URL before calling os.path.basename() on it. (From OE-Core rev: 308189beda8a31541481d09e3d5e86187e843d8d) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
committed by
Richard Purdie
parent
b307e0a604
commit
10c8d14d1a
@@ -432,7 +432,7 @@ def create_recipe(args):
|
||||
if srcuri and not realpv or not pn:
|
||||
parseres = urlparse.urlparse(srcuri)
|
||||
if parseres.path:
|
||||
srcfile = os.path.basename(parseres.path)
|
||||
srcfile = os.path.basename(parseres.path.rstrip('/'))
|
||||
name_pn, name_pv = determine_from_filename(srcfile)
|
||||
logger.debug('Determined from filename: name = "%s", version = "%s"' % (name_pn, name_pv))
|
||||
if name_pn and not pn:
|
||||
|
||||
Reference in New Issue
Block a user