done
}
+genname() {
+ local suite="$1"; shift
+ local arch="$1"; shift
+
+ if [ -n "$sbuildnames" ]; then
+ local name="${suite}-${arch}-sbuild"
+ else
+ local name="${suite}_${arch}-dchroot"
+ fi
+
+ echo "$name"
+}
+
+
genschrootconf() {
local suite="$1"; shift
local arch="$1"; shift
local suite="${suite}-${extra}"
fi
- if [ -n "$sbuildnames" ]; then
- local name="${suite}-${arch}-sbuild"
- else
- local name="${suite}_${arch}-dchroot"
- fi
+ local name="$(genname "$suite" "$arch")"
local fullname="$name"
case "$arch" in
;;
esac
fi
+if [ -n "$ubuntu" ]; then
+ echo "deb $mirror ${suite}-updates main" >> "$rootdir/etc/apt/sources.list"
+ echo "deb $mirror ${suite}-security main" >> "$rootdir/etc/apt/sources.list"
+ chroot "$rootdir" apt-get update
+ chroot "$rootdir" apt-get dist-upgrade -y
+fi
rm -f "$rootdir/etc/apt/sources.list" "$rootdir/etc/apt/sources.list.d/*"
chroot "$rootdir" apt-get clean
umount "$rootdir/dev" 2>/dev/null || true