#! /bin/sh -e

. /usr/share/debconf/confmodule

if CODENAME="$(lsb_release -cs)"; then
	# TODO cjwatson 2006-04-07: wrong for Debian, I think
	db_set mirror/suite "$CODENAME"
	db_set mirror/codename "$CODENAME"
fi

rm -f /target/etc/apt/sources.list
PATH="/usr/lib/ubiquity/apt-setup:/usr/lib/ubiquity/choose-mirror:$PATH" \
	OVERRIDE_BASE_INSTALLABLE=1 \
	/usr/lib/ubiquity/apt-setup/apt-setup /target
