[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#761970: tasksel: Retry downloads to cope with flaky network connections?



Package: tasksel
Version: 3.14.1
Tags: patch

Hi.

Today, when trying to install Debian on a flaky network connection, or
using a transparent proxy with issues, the tasksel/pkgsel step some
times fail because a download was unsuccessful, but succeed a minute
later when trying again.

Other parts of the installer, like apt-install, will try a few times
before giving up, while tasksel do not, as far as I can tell.

What about adding -o APT::Acquire::Retries=3 or something like that to
the apt-get call, to ensure packages can be installed automatically
also on slightly flaky networks?

This patch should do it:

--- /usr/bin/tasksel    2013-05-07 20:00:56.000000000 +0200
+++ /tmp/tasksel        2014-09-17 12:19:11.037946683 +0200
@@ -619,7 +619,7 @@
                        if exists $options{'debconf-apt-progress'};
                push @cmd, "--";
        }
-       push @cmd, qw{apt-get -q -y -o APT::Install-Recommends=true -o APT::Get::AutomaticRemove=true install};
+       push @cmd, qw{apt-get -q -y -o APT::Install-Recommends=true -o APT::Get::AutomaticRemove=true -o APT::Acquire::Retries=3 install};
 
        # And finally, act on selected tasks.
        if (@tasks_install || @tasks_remove) {

-- 
Happy hacking
Petter Reinholdtsen


Reply to: