CURLOPT_TIMEOUT
Pass a long as parameter containing the maximum time in seconds
that you allow the libcurl transfer operation to take.

Note that it's not a timeout of inactivity, it's just a maximum time the transfer can take. This does not match the behavior of method/http.cc where HttpMethod::Go sets the same timeout value on a select() call on any of the open filedescriptors; this only gets triggered if none of the connections make any progress by the timeout time.

It seems to me that the http and https behaviors ought to be made consistent, or else the https method ought to honor a separate Acquire::https::Timeout setting.

I've also had the same problem so I entered the same apt-get install command several times so as to get the package completely downloaded. Unfortunately, when the download was expected to finish, it failed and, on calling once more the apt-get install command, it started from the begining again. Is there any workaround for this?

It appears CURLOPT_TIMEOUT isn't proper to use here, as indeed it times out in 120s regardless of the connection state. The fact the connection doesn't resume seems to be another issue, but I have attached a small patch that fixes the timeout issue. It sets the minimum transfer speed to 1bs, and uses the timeout of 120s only if < 1bs is being transferred.

[ Michael Vogt ]
* apt-pkg/deb/dpkgpm.cc:
- include df -l output in the apport log as well (thanks to
tjaalton)
* apt-pkg/packagemanager.cc:
- add output about pre-depends configuring when debug::pkgPackageManager
is used
* methods/https.cc:
- fix incorrect use of CURLOPT_TIMEOUT, closes: #497983, LP: #354972
thanks to Brian Thomason for the patch
* merge lp:~mvo/apt/netrc branch, this adds support for a
/etc/apt/auth.conf that can be used to store username/passwords
in a "netrc" style file (with the extension that it supports "/"
in a machine definition). Based on the maemo git branch.

[ Nicolas François ]
* Cleaned up the first patch draft from KURASAWA Nozomu to finally
get po4a support for translating the man pages.
Many thanks to both for this excellent work! (Closes: #441608)
* doc/ja/*, doc/po/ja.po:
- remove the old ja man page translation and replace it with
the new po4a-powered translation by KURASAWA Nozomu.
* doc/*.?.xml (manpages):
- add contrib to author tags and also add refmiscinfo to fix warnings
* doc/style.txt, buildlib/defaults.mak, buildlib/manpage.mak:
- fix a few typos in the comments of this files