summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2014-12-23 12:32:36 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2014-12-25 08:18:14 +0000
commite75139cc9d5a6a8ecd58bd854cd9ced77ea1d046 (patch)
treeb410a60985c2579cdb5e06d62388db2bc3d79d95
parent1d4908ddb224ccc7e018b485e8e52d7ec2b70b81 (diff)
downloadpoky-e75139cc9d5a6a8ecd58bd854cd9ced77ea1d046.tar.gz
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 <richard.purdie@linuxfoundation.org>
-rw-r--r--bitbake/lib/bb/fetch2/wget.py3
1 files changed, 1 insertions, 2 deletions
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):
174 """ 174 """
175 Run fetch checkstatus to get directory information 175 Run fetch checkstatus to get directory information
176 """ 176 """
177 f = tempfile.NamedTemporaryFile(dir="/tmp/s/", delete=False) 177 f = tempfile.NamedTemporaryFile()
178 178
179 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" 179 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"
180 fetchcmd = self.basecmd 180 fetchcmd = self.basecmd
@@ -186,7 +186,6 @@ class Wget(FetchMethod):
186 fetchresult = "" 186 fetchresult = ""
187 187
188 f.close() 188 f.close()
189 # os.unlink(f.name)
190 return fetchresult 189 return fetchresult
191 190
192 def _check_latest_dir(self, url, versionstring, ud, d): 191 def _check_latest_dir(self, url, versionstring, ud, d):