bitbake: bb/fetch2/ssh.py: Fix urldata.localpath use os.path.normpath
When urls ends with trailing slash os.path.basename return "" [1] and built urldata.localpath only with DL_DIR, it causes that donestamp is built as DL_DIR + '.done' and seems that ssh resource was already download. [YOCTO #6448] [1] https://docs.python.org/2/library/os.path.html#os.path.basename (Bitbake rev: 47992591349bab2c12741b937096e41085399087) Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
parent
83a30dfd49
commit
3cd31b19d3
|
@ -87,7 +87,8 @@ class SSH(FetchMethod):
|
|||
m = __pattern__.match(urldata.url)
|
||||
path = m.group('path')
|
||||
host = m.group('host')
|
||||
urldata.localpath = os.path.join(d.getVar('DL_DIR', True), os.path.basename(path))
|
||||
urldata.localpath = os.path.join(d.getVar('DL_DIR', True),
|
||||
os.path.basename(os.path.normpath(path)))
|
||||
|
||||
def download(self, urldata, d):
|
||||
dldir = d.getVar('DL_DIR', True)
|
||||
|
|
Loading…
Reference in New Issue