#784906 apt does not need to repeatedly re-download package file information when switching between apt servers

Package:
apt
Source:
apt
Description:
commandline package manager
Submitter:
Faheem Mitha
Date:
2015-05-10 12:48:17 UTC
Severity:
wishlist
#784906#5
Date:
2015-05-10 12:45:05 UTC
From:
To:
Dear Maintainer,

I noticed that if I switch servers, apt goes ahead and re-downloads
the package file information from scratch, completely ignoring the
already existing file. But usually these files are similar, if not
identical. Also, as of the just released jessie, these files are
increasingly significant in size, currently of the order of 20 MB.

As described in the IRC snippet below, one possibiliy would be to
check hashes of files, and if they are identical, then hardlink to an
existing file.

###################################################################

Snipper from #debian-apt follow:

<faheem> I'm sure I'm not saying anything that others haven't thought
of before, but I noticed (not for the first time) that apt downloads
the same package information from every mirror, even though each
mirror has probably similar if not identical information. Can this
step not be reduced or skipped?

<mvo> faheem: that is a interessting idea, we know what hashes to
expect and we could simply hardlink a existing identical file if the
hash is the same