:: Re: [DNG] why dies apt update need …
Pàgina inicial
Delete this message
Reply to this message
Autor: tito
Data:  
A: dng
Assumpte: Re: [DNG] why dies apt update need the date?
On Sat, 17 Apr 2021 08:03:44 -0400
Hendrik Boom <hendrik@???> wrote:

> On Fri, Apr 16, 2021 at 12:32:51AM +0200, tito via Dng wrote:
> ...
> ...
> >
> > Made script more robust against failures:
> > 1) added test for internet connectivity
> > 2) check that time and date is correct
> >     or apt update will fail. Fix it 
> >     with ntpdate-debian if not correct 

>
> Just curious -- what does apt update need the time and date for?
> Aren't the version numbes of the packages all it needs?
>
> -- hendrik


Hi,

it happened that when restoring the vm from the initial snapshot
it started with a time and date in the past, this made apt update
fail because the repository date was in the future for the local
machine so the indexes where not updated and the subsequent
apt download steps failed to download devuan debs breaking the
migration process to a point that was hard to fix by hand due to
missing network at reboot, my conclusion was that apt is sensible
to the date (and time?) and to make the migration process fail
proof at least the date needs to be accurate.

Ciao,
Tito