diff options
author | Aníbal Limón <anibal.limon@linux.intel.com> | 2015-01-12 18:36:13 -0600 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2015-01-14 11:32:01 +0000 |
commit | 3cd31b19d34c9aa1d40fc1f59de6a1925988bb8d (patch) | |
tree | 95b3a2dfbff924d4ca147493269a661f9b819acb /bitbake/lib | |
parent | 83a30dfd495f0b8e90b7b5725c946c659ecbd93d (diff) | |
download | poky-3cd31b19d34c9aa1d40fc1f59de6a1925988bb8d.tar.gz |
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>
Diffstat (limited to 'bitbake/lib')
-rw-r--r-- | bitbake/lib/bb/fetch2/ssh.py | 3 |
1 files changed, 2 insertions, 1 deletions
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): | |||
87 | m = __pattern__.match(urldata.url) | 87 | m = __pattern__.match(urldata.url) |
88 | path = m.group('path') | 88 | path = m.group('path') |
89 | host = m.group('host') | 89 | host = m.group('host') |
90 | urldata.localpath = os.path.join(d.getVar('DL_DIR', True), os.path.basename(path)) | 90 | urldata.localpath = os.path.join(d.getVar('DL_DIR', True), |
91 | os.path.basename(os.path.normpath(path))) | ||
91 | 92 | ||
92 | def download(self, urldata, d): | 93 | def download(self, urldata, d): |
93 | dldir = d.getVar('DL_DIR', True) | 94 | dldir = d.getVar('DL_DIR', True) |