deb-arch trick.

Never knew this, but I was configuring apt-mirror to set up a ubuntu mirror and it dawned on me that I needed both amd64 and i386 binaries. In apt-mirror’s config file, there’s a ‘set defaultarch’ option to mirror a different arch then what your machine is currently, but that won’t help mirroring more then one arch in the same repository.

The answer gleaned from the comments of this blog post is to append the arch to extra deb lines in the mirror.list file. I.e. to mirror both amd64 and i386, you add these lines to /etc/apt/mirror.conf:

deb-i386 hardy main restricted universe
deb-amd64 htp:// hardy main restricted universe

If you think about it, it then makes sense why the source lines start with ‘deb-src’. Huh. Learn something new every day.