Have been playing with the great idea of caching deb packages. I finally settled for the option of using <a href="http://git.debian.org/?p=pkg-ocaml-maint/packages/approx.git">approx</a>, which does a really nice job of caching packages.

Actually, it fullfils quite a lot of requirements and even surpasses some of my expectations:

  • It supports multiple architectures (in fact, this is important for me, as I use i386, amd64, and powerpc.
  • It can support multiple distributions (both different versions of the same distribution and completely different distributions, as long as they use a repository like Debian's, as is the case of Ubuntu).
  • It keeps its directory hierarchy neatly organized, like that of Debian, in a package pool, which saves space and makes everything easier and faster to find (and has the advantage of being fast with filesystems that don't cope well with many entries in one directory).

The transition wasn't painless from apt-move, since apt-move moves the files, but renames them in a way that they don't keep epochs in their names, which makes approx-import moan about the packages.

For places where I am too lazy to import the packages, I just filled the cache redownloading the packages with something approximately like this:

apt-get -d --reinstall install $(dpkg -l | grep "^ii" | cut -d " " -f 3)

Well, I hope that this experience happens to be useful for other people, so that they can benefit from it. Rebuilding packages with a package cacher is much more pleasant, especially if the package has a lot of build-dependencies.

blog comments powered by Disqus