[oe-commits] [bitbake] 03/07: wget: Set localfile for directories

git at git.openembedded.org git at git.openembedded.org
Fri Feb 26 17:59:15 UTC 2016


rpurdie pushed a commit to branch master-next
in repository bitbake.

commit ab74a72fdf44722b7bf021aeb9a600edd981005b
Author: Richard Purdie <richard.purdie at linuxfoundation.org>
AuthorDate: Fri Feb 26 17:48:55 2016 +0000

    wget: Set localfile for directories
    
    If we wget something which looks directory like we end up with lock files
    and done stamps without names, they also all use the same lockfile.
    
    This change ensures that we use separate lock files based on the url
    and avoid creating the mysterious ${DL_DIR}/.done files.
    
    Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
 lib/bb/fetch2/wget.py | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/lib/bb/fetch2/wget.py b/lib/bb/fetch2/wget.py
index fd25c42..202ed0b 100644
--- a/lib/bb/fetch2/wget.py
+++ b/lib/bb/fetch2/wget.py
@@ -63,6 +63,8 @@ class Wget(FetchMethod):
             ud.basename = os.path.basename(ud.path)
 
         ud.localfile = data.expand(urllib.unquote(ud.basename), d)
+        if not ud.localfile:
+            ud.localfile = data.expand(urllib.unquote(ud.host + ud.path).replace("/", "."), d)
 
         self.basecmd = d.getVar("FETCHCMD_wget", True) or "/usr/bin/env wget -t 2 -T 30 -nv --passive-ftp --no-check-certificate"
 

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Openembedded-commits mailing list