Re: [Tails-dev] Debian 9: Build fails consistently, name re…

Delete this message

Reply to this message
Author: Arnaud
Date:  
To: The Tails public development discussion list
Subject: Re: [Tails-dev] Debian 9: Build fails consistently, name resolution fails sooner or later
On 03/11/2017 08:41 PM, anonym wrote:
> Arnaud:
>> --- a/vagrant/provision/setup-tails-builder
>> +++ b/vagrant/provision/setup-tails-builder
> [...]
>> +# Configure apt to retry
>> +echo 'APT::Acquire::Retries "20";' > /etc/apt/apt.conf.d/99retries
> This will only affect provisioning, not any usage of APT during the build, right? Or will it propagate into the chroot somehow?


Indeed, it is not effective in the chroot.

One way to set this setting in the chroot is to pass an option
explicitly when running `lb config` (patch attached). Another way would
be to add a file into the `config` directory, but I'm not sure exactly
which file. According to today's live-build doc, creating a file
`config/apt/apt.conf` should work. But it doesn't seem to match the
existing layout, Tails already has a directory `config/chroot_apt`,
maybe it's better to drop a file there, however I didn't try.

Anyway.

The fact is that it doesn't help me much, because apt-get **will not**
retry when it's run along `apt-cacher-ng`. I strongly suspect that it's
because apt-cacher-ng returns an error code 503 "Service Unavailable" on
failure, instead of forwarding the original error code. I got in touch
with apt-cacher-ng and let you know when I know more about that.

Cheers

---
auto/config | 1 +
1 file changed, 1 insertion(+)

diff --git a/auto/config b/auto/config
index 236ac0f1b9..d0b9c1a2e3 100755
--- a/auto/config
+++ b/auto/config
@@ -58,6 +58,7 @@ perl -pi \
 # set Amnesia's general options
 $RUN_LB_CONFIG \
    --verbose \
+   --apt-options "--yes -oAcquire::Retries=20" \
    --apt-recommends false \
    --architecture amd64 \
    --backports false \
-- 
2.11.0