diff options
author | Zac Medico <zmedico@gentoo.org> | 2007-08-05 18:05:35 +0000 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2007-08-05 18:05:35 +0000 |
commit | 21ffad15e22b1704de54ab38e609ccf56610998c (patch) | |
tree | 2c061ace3c412250f98c91bc0c5762f58fbf397b | |
parent | dd10b19facfd7184f86f7079b07d9fd150e9ffad (diff) | |
download | portage-21ffad15e22b1704de54ab38e609ccf56610998c.tar.gz portage-21ffad15e22b1704de54ab38e609ccf56610998c.tar.bz2 portage-21ffad15e22b1704de54ab38e609ccf56610998c.zip |
For bug #187806, use mkstemp to create tmpservertimestampfile (instead of using PORTAGE_TMPDIR).
svn path=/main/trunk/; revision=7576
-rw-r--r-- | pym/emerge/__init__.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/pym/emerge/__init__.py b/pym/emerge/__init__.py index 643687508..418df8bb1 100644 --- a/pym/emerge/__init__.py +++ b/pym/emerge/__init__.py @@ -4480,7 +4480,6 @@ def action_sync(settings, trees, mtimedb, myopts, myaction): if myaction == "metadata": print "skipping sync" updatecache_flg = True - tmpservertimestampfile = None elif syncuri[:8]=="rsync://": if not os.path.exists("/usr/bin/rsync"): print "!!! /usr/bin/rsync does not exist, so rsync support is disabled." @@ -4595,9 +4594,6 @@ def action_sync(settings, trees, mtimedb, myopts, myaction): # Real local timestamp file. servertimestampfile = os.path.join( myportdir, "metadata", "timestamp.chk") - # Temporary file for remote server timestamp comparison. - tmpservertimestampfile = os.path.join( - settings["PORTAGE_TMPDIR"], "timestamp.chk") content = portage.util.grabfile(servertimestampfile) mytimestamp = 0 @@ -4711,6 +4707,10 @@ def action_sync(settings, trees, mtimedb, myopts, myaction): # connection attempt to an unresponsive server which rsync's # --timeout option does not prevent. if True: + # Temporary file for remote server timestamp comparison. + from tempfile import mkstemp + fd, tmpservertimestampfile = mkstemp() + os.close(fd) mycommand = rsynccommand[:] mycommand.append(dosyncuri.rstrip("/") + \ "/metadata/timestamp.chk") |