Lines 3945-3950
Link Here
|
3945 |
del content |
3945 |
del content |
3946 |
|
3946 |
|
3947 |
try: |
3947 |
try: |
|
|
3948 |
rsync_initial_timeout = \ |
3949 |
int(settings.get("PORTAGE_RSYNC_INITIAL_TIMEOUT", "15")) |
3950 |
except ValueError: |
3951 |
rsync_initial_timeout = 15 |
3952 |
|
3953 |
try: |
3948 |
if settings.has_key("RSYNC_RETRIES"): |
3954 |
if settings.has_key("RSYNC_RETRIES"): |
3949 |
print yellow("WARNING:")+" usage of RSYNC_RETRIES is deprecated, use PORTAGE_RSYNC_RETRIES instead" |
3955 |
print yellow("WARNING:")+" usage of RSYNC_RETRIES is deprecated, use PORTAGE_RSYNC_RETRIES instead" |
3950 |
maxretries=int(settings["RSYNC_RETRIES"]) |
3956 |
maxretries=int(settings["RSYNC_RETRIES"]) |
Lines 4054-4067
Link Here
|
4054 |
# Timeout here in case the server is unresponsive. The |
4060 |
# Timeout here in case the server is unresponsive. The |
4055 |
# --timeout rsync option doesn't apply to the initial |
4061 |
# --timeout rsync option doesn't apply to the initial |
4056 |
# connection attempt. |
4062 |
# connection attempt. |
4057 |
signal.alarm(15) |
4063 |
if rsync_initial_timeout: |
|
|
4064 |
signal.alarm(rsync_initial_timeout) |
4058 |
try: |
4065 |
try: |
4059 |
mypids.extend(portage_exec.spawn( |
4066 |
mypids.extend(portage_exec.spawn( |
4060 |
mycommand, env=settings.environ(), returnpid=True)) |
4067 |
mycommand, env=settings.environ(), returnpid=True)) |
4061 |
exitcode = os.waitpid(mypids[0], 0)[1] |
4068 |
exitcode = os.waitpid(mypids[0], 0)[1] |
4062 |
content = portage.grabfile(tmpservertimestampfile) |
4069 |
content = portage.grabfile(tmpservertimestampfile) |
4063 |
finally: |
4070 |
finally: |
4064 |
signal.alarm(0) |
4071 |
if rsync_initial_timeout: |
|
|
4072 |
signal.alarm(0) |
4065 |
try: |
4073 |
try: |
4066 |
os.unlink(tmpservertimestampfile) |
4074 |
os.unlink(tmpservertimestampfile) |
4067 |
except OSError: |
4075 |
except OSError: |