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

Re: Debian's problems, Debian's future



On Thu, Mar 28, 2002 at 05:24:39PM +0900, Junichi Uekawa wrote:
> Simon Richter <sjr@debian.org> wrote:
> > I'd suggest using diffs, as this brings the best results and is the
> > easiest to implement. The FTP servers have the usual Packages.gz file (so
> > we don't lose compatibility) plus daily diffs. The number of diffs kept
> > varies, you delete them when it would be faster to download the entire
> > Packages file than the diffs leading to our version. When updating, APT
> > simply starts with the oldest diff it would need to update, if it gets a
> > 404, it will fetch the whole file. 
> wooo!!!
> http://people.debian.org/~dancer/Packages-for-main-i386/
> # Time for suggesting is up, please implement.

Is there some reason you don't gzip -9 or bzip2 the diffs?

Hrm, given that you're only applying the diffs if the version you
have is exactly the same as the version you're diffing against (ie,
the md5sums match), you could probably use a different diff format to
make downloads faster. diff -e might be a good choice, in that it only
includes the new text, not the old text.

Rather than having a diff from the old version straight to the current
version (which means remirroing those files each time, and keeping all
the old Packages files around), it'd probably be better to have people
who're x days out of date download x diffs.

Something like:

	x=`md5sum Packages.last | cut -d\  -f1`
	diff -u Packages.last Packages | gzip -9 > Packages.diff-from-$x.gz

	y=`md5sum Packages | cut -d\  -f1`
	gzip -9 </dev/null >Packages.diff-from-$y.gz

and apt would then run:

	while 1:
		x = md5sum(Packages)
		diff = "Packages.diff-from-" + x
		if not get(diff):
			get("Packages")
			break

		if is_empty(diff):
			break # we're up to date

		patch("Packages", "Packages.diff-from-%s" % x)

(ie, download each diff, and apply it, until it got an empty diff, at which
point we're finished).

Cheers,
aj

-- 
Anthony Towns <aj@humbug.org.au> <http://azure.humbug.org.au/~aj/>
I don't speak for anyone save myself. GPG signed mail preferred.

  ``Debian: giving you the power to shoot yourself in each 
       toe individually.'' -- with kudos to Greg Lehey

Attachment: pgp2NY7R_XvF9.pgp
Description: PGP signature


Reply to: