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

Bug#563737: smarter cleaning of /var/lib/apt/lists



Julian Andres Klode <jak@debian.org> writes:

> Am Dienstag, den 05.01.2010, 11:51 +1300 schrieb martin f krafft:
>> Package: apt
>> Version: 0.7.25
>> Severity: wishlist
>> 
>> Moving around a lot, I often switch my Debian mirrors.
>> geo.debian.org is not really an option as that doesn't allow me to
>> use internal mirrors. Whenever I switch mirrors in sources.list,
>> however, /var/lib/apt/lists gets cleaned and everything has to be
>> redownloaded.
>> 
>> Maybe APT could check the *Release files in that directory and
>> reuse existing files if they're found to be official Debian
>> Package/Source lists? This would save me having to do the same s///
>> replace on the directory contents that I do in sources.list, which
>> is arguably not that much trouble, but it would be nice if APT did
>> it for me.
>
> I don't think that this could be done easily as the files are identified
> based on hostname, port and path.

Maybe that is the problem.

I don't change my sources.list all the time but I have multiple debian
mirrors in the list, my local one, a near one and ftp.debian.org. That
way I get the newest files from the best source and out-of-sync
mirrors don't matter (they just make things slower). But, assuming the
mirrors are in sync, every Packages file gets downloaded 3 times now.

So maybe index files should be referenced by their checksum instead of
host,port,path. That way apt would download Packages.gz from my local
mirror and then reuse that file for the near mirror and
ftp.debian.org. It would only download the Release[.gpg] file from the
remote mirrors.

So
/var/lib/apt/lists/ftp.debian.org_debian_dists_sid_main_source_Sources
could become
/var/lib/apt/lists/537f0e9373ce078e6af6cd9a000218c4d4c477fc.


The same goes for downloading source files. Say I have
foo_1.2.orig.tar.gz and foo_1.2-3.dsc on my local mirror and Debian
has foo_1.2-4.dsc. I want apt-get source foo to download
foo_1.2.orig.tar.gz from my local mirror and foo_1.2-4.dsc from
debian. There is no need to download all files of a source from the
same host if the checksum matches.

MfG
        Goswin



Reply to: