+if [ -n "$buildd" ] ; then
+ case "$suite" in
+ wheezy|jessie|stretch)
+ chroot "$rootdir" apt-get install -y --no-install-recommends apt-transport-https ca-certificates
+ ;;
+ *)
+ chroot "$rootdir" apt-get install -y --no-install-recommends ca-certificates
+ ;;
+ 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