From: Zac Medico Date: Fri, 2 Mar 2007 01:47:34 +0000 (-0000) Subject: Even if there's no timestamp available locally, fetch the timestamp anyway as an... X-Git-Tag: v2.2_pre1~1627 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=fdad51fbc130f9f67e57ed9fa9c330f002d97344;p=portage.git 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 --- 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")