1
0
mirror of https://git.yoctoproject.org/poky synced 2026-05-31 12:49:46 +00:00

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>
This commit is contained in:
Richard Purdie
2014-12-23 12:32:36 +00:00
parent 1d4908ddb2
commit e75139cc9d
+1 -2
View File
@@ -174,7 +174,7 @@ class Wget(FetchMethod):
""" """
Run fetch checkstatus to get directory information 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" 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 fetchcmd = self.basecmd
@@ -186,7 +186,6 @@ class Wget(FetchMethod):
fetchresult = "" fetchresult = ""
f.close() f.close()
# os.unlink(f.name)
return fetchresult return fetchresult
def _check_latest_dir(self, url, versionstring, ud, d): def _check_latest_dir(self, url, versionstring, ud, d):