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

Re: apt{-cache,-get,itude} show wrong version of package after update



>> What I'd like to know now is : what prevents apt-get from
>> downloading the Packages file from the mirror ? Wget can !
>
> Move all the files out of /var/lib/apt/lists/ so that apt-get update
> has to download fresh copies. That should get you back on track.
> 
> By all means take the opportunity to compare the old and the new files
> to look for causes. In the simplest scenario, which probably is not
> the cause but might illustrate the kind of problem, a failed download
> could leave a file with a timestamp at the point of failure. That
> erroneous timestamp would be more recent than the mirror's (correct)
> timestamp and could cause update to think there's nothing to do on
> subsequent runs until the original file on the mirror was modified.

The problem is not that apt-get sees the new Packages file and
decides that it does not need to be downloaded. If that were the
case, the output would be

  Hit http://mymirror/debian stretch/main amd64 Packages

The actual output is

  Ign:5 http://mymirror/debian stretch/main amd64 Packages

which indicates that it tried to download it but failed. At
least if the link I gave previously is correct (and it appears
to be).

The reason why it failed is that it looked for Packages.xz which
did not exist on my mirror. The reason why my mirror did not
have a Packages.xz file is that it was made with the version of
debmirror in Debian 8, which only concerns itself with
Packages.gz and Packages.bz2.

Those files *were* there and apt-get could have used them but,
in its wisdom, it didn't even try.

I solved the problem by installing the latest version of
debmirror on the Debian 8 machine where the mirror is.
Thankfully, there were no dependency problems.

There is probably material for a few bug reports in there.

Thank you.


Reply to: