summaryrefslogtreecommitdiffstats
path: root/bin/emerge
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2007-08-05 18:06:00 +0000
committerZac Medico <zmedico@gentoo.org>2007-08-05 18:06:00 +0000
commit3e402982231db8daa15c0a3a43087457445bd7e5 (patch)
treef06ddf46f37eac8276f792def0777395b1addb9c /bin/emerge
parent2dfac5fcbb630a5c0b48ca83bc3888a2cb77bdd8 (diff)
downloadportage-3e402982231db8daa15c0a3a43087457445bd7e5.tar.gz
portage-3e402982231db8daa15c0a3a43087457445bd7e5.tar.bz2
portage-3e402982231db8daa15c0a3a43087457445bd7e5.zip
For bug #187806, use mkstemp to create tmpservertimestampfile (instead of using PORTAGE_TMPDIR). (trunk r7576)
svn path=/main/branches/2.1.2/; revision=7577
Diffstat (limited to 'bin/emerge')
-rwxr-xr-xbin/emerge8
1 files changed, 4 insertions, 4 deletions
diff --git a/bin/emerge b/bin/emerge
index bdc92e70a..3272172ca 100755
--- a/bin/emerge
+++ b/bin/emerge
@@ -4443,7 +4443,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."
@@ -4558,9 +4557,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
@@ -4674,6 +4670,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")