From 3cd31b19d34c9aa1d40fc1f59de6a1925988bb8d Mon Sep 17 00:00:00 2001 From: Aníbal Limón Date: Mon, 12 Jan 2015 18:36:13 -0600 Subject: bitbake: bb/fetch2/ssh.py: Fix urldata.localpath use os.path.normpath MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Signed-off-by: Richard Purdie --- bitbake/lib/bb/fetch2/ssh.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'bitbake/lib/bb/fetch2') diff --git a/bitbake/lib/bb/fetch2/ssh.py b/bitbake/lib/bb/fetch2/ssh.py index 4ae979472c..635578a711 100644 --- a/bitbake/lib/bb/fetch2/ssh.py +++ b/bitbake/lib/bb/fetch2/ssh.py @@ -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) -- cgit v1.2.3-54-g00ecf