Comment 3 for bug 1670905

Revision history for this message
Alistair Buxton (a-j-buxton) wrote :

Yes, I expected the chroot to end up with the mirror I asked for in the sources.list. This is the behaviour with a normal debbotstrap invocation.

This doesn't actually have anything to do with the keyring file at all.

The reason this happens is because there is no mechanism for the first stage to tell the second stage what mirror to use, nor any way for it to be passed in as an argument on the command line when running the second stage. If you try to set a mirror, debootstrap explicitly ignores it, setting the variable to "null:".

The reason why Ubuntu does not have this problem is because they have overridden the mirror URLs in their suite scripts, eg /usr/share/debootstrap/scripts/trusty, the very first lines. Debian suite scripts do not do this, and so they end up using the URL hard coded into debootstrap since there is no other way to override it.

Since Raspbian re-uses the Debian suite scripts unmodified, it ends up getting the Debian repositories when doing foreign bootstrap. As a workaround you can simply fix them manually after the second stage runs, because they aren't used for anything and sources.list only gets written with the wrong value after the second stage has unpacked and configured everything.