summaryrefslogtreecommitdiffstats
path: root/pym
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2007-03-02 01:47:34 +0000
committerZac Medico <zmedico@gentoo.org>2007-03-02 01:47:34 +0000
commitfdad51fbc130f9f67e57ed9fa9c330f002d97344 (patch)
tree06188137ab6e360dedeb4df9a5e0c34b27320f0c /pym
parent0f4c241d478842e4ac7a50c7e2280f2546546566 (diff)
downloadportage-fdad51fbc130f9f67e57ed9fa9c330f002d97344.tar.gz
portage-fdad51fbc130f9f67e57ed9fa9c330f002d97344.tar.bz2
portage-fdad51fbc130f9f67e57ed9fa9c330f002d97344.zip
Even if there's no timestamp available locally, fetch the timestamp anyway as an initial probe to verify that the server is responsive. This protects us from hanging indefinitely on a connection attempt to an unresponsive server which rsync's --timeout option does not prevent.
svn path=/main/trunk/; revision=6127
Diffstat (limited to 'pym')
-rw-r--r--pym/emerge/__init__.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/pym/emerge/__init__.py b/pym/emerge/__init__.py
index 5a1fedbd4..10dfe9d3c 100644
--- a/pym/emerge/__init__.py
+++ b/pym/emerge/__init__.py
@@ -3983,7 +3983,12 @@ def action_sync(settings, trees, mtimedb, myopts, myaction):
exitcode = os.EX_OK
servertimestamp = 0
- if mytimestamp != 0:
+ # Even if there's no timestamp available locally, fetch the
+ # timestamp anyway as an initial probe to verify that the server is
+ # responsive. This protects us from hanging indefinitely on a
+ # connection attempt to an unresponsive server which rsync's
+ # --timeout option does not prevent.
+ if True:
mycommand = rsynccommand.split()
mycommand.append(dosyncuri.rstrip("/") + \
"/metadata/timestamp.chk")