From e75139cc9d5a6a8ecd58bd854cd9ced77ea1d046 Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Tue, 23 Dec 2014 12:32:36 +0000 Subject: bitbake: fetch2/wget: Fix horrible temp file handling Hardcoding a temp directory is bad practice and leads to races between the tests. There is no longer any good reason for doing this, drop it and ensure the files get cleaned up correctly. (Bitbake rev: 10a47b1ec7470c9e8c4ffe0bb35cdf6d1bb2ee2e) Signed-off-by: Richard Purdie --- bitbake/lib/bb/fetch2/wget.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'bitbake/lib/bb/fetch2/wget.py') diff --git a/bitbake/lib/bb/fetch2/wget.py b/bitbake/lib/bb/fetch2/wget.py index 2e6da48270..b081b7621b 100644 --- a/bitbake/lib/bb/fetch2/wget.py +++ b/bitbake/lib/bb/fetch2/wget.py @@ -174,7 +174,7 @@ class Wget(FetchMethod): """ Run fetch checkstatus to get directory information """ - f = tempfile.NamedTemporaryFile(dir="/tmp/s/", delete=False) + f = tempfile.NamedTemporaryFile() agent = "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.12) Gecko/20101027 Ubuntu/9.10 (karmic) Firefox/3.6.12" fetchcmd = self.basecmd @@ -186,7 +186,6 @@ class Wget(FetchMethod): fetchresult = "" f.close() - # os.unlink(f.name) return fetchresult def _check_latest_dir(self, url, versionstring, ud, d): -- cgit v1.2.3-54-g00ecf