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

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



On Wed, Jan 20, 2010 at 05:59:21PM +0100, Goswin von Brederlow wrote:
> Julian Andres Klode <jak@debian.org> writes:
> > 
> 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.

As far as I know, this would require patches for 
	apt-pkg/deb/debindexfile.{cc,h}
	apt-pkg/deb/debmetaindex.{cc,h}
and probably some others. debIndexFile classes would need a field for the
checksum and e.g. debPackagesIndex::IndexFile needs to return the filename
with checksum. 

> 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.
I haven't looked at it, but we don't have a mapping of hashsums
to URIs as far as I know.
-- 
Julian Andres Klode  - Debian Developer, Ubuntu Member

See http://wiki.debian.org/JulianAndresKlode and http://jak-linux.org/.



Reply to: