]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
fetch2/wget: Set localfile for directories
authorRichard Purdie <richard.purdie@linuxfoundation.org>
Fri, 26 Feb 2016 17:48:55 +0000 (17:48 +0000)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Sun, 28 Feb 2016 11:33:58 +0000 (11:33 +0000)
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@linuxfoundation.org>
lib/bb/fetch2/wget.py

index fd25c42436f065b40a339d532fecd8f0338fb162..202ed0b9e1cd77957dcb1c6673b255ada043e813 100644 (file)
@@ -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"