X-Git-Url: https://git.grml.org/?p=grml-debootstrap.git;a=blobdiff_plain;f=chroot-script;h=fe0becb1817463fc71aa6ee2c75dd40b344b1be8;hp=3bbd19a64ae4524f13f07896ce714f9052617992;hb=61979477b00635f917604cccd664d176d081c506;hpb=837ac5728ed1ab1d05f162b68b798bca6fe16ce4 diff --git a/chroot-script b/chroot-script index 3bbd19a..fe0becb 100755 --- a/chroot-script +++ b/chroot-script @@ -53,15 +53,25 @@ askpass() { # define chroot mirror {{{ chrootmirror() { - [ -n "$KEEP_SRC_LIST" ] && return - [ -z "$COMPONENTS" ] && COMPONENTS='main contrib non-free' + if [ -n "$KEEP_SRC_LIST" ] ; then + echo "KEEP_SRC_LIST has been set, skipping chrootmirror stage." + return + fi + + if [ -z "$COMPONENTS" ] ; then + COMPONENTS='main contrib non-free' + fi + echo "Using repository components $COMPONENTS" if [ -n "$ISO" ] ; then - echo "deb $ISO $RELEASE $COMPONENTS" > /etc/apt/sources.list - [ -n "$MIRROR" ] && echo "deb $MIRROR $RELEASE $COMPONENTS" >> /etc/apt/sources.list || true + echo "Adjusting sources.list for ISO (${ISO})." + echo "deb $ISO $RELEASE $COMPONENTS" > /etc/apt/sources.list + echo "Adding mirror entry (${MIRROR}) to sources.list." + [ -n "$MIRROR" ] && echo "deb $MIRROR $RELEASE $COMPONENTS" >> /etc/apt/sources.list || true else if [ -n "$MIRROR" ] ; then - echo "deb $MIRROR $RELEASE $COMPONENTS" > /etc/apt/sources.list + echo "Adjusting sources.list for mirror (${MIRROR})." + echo "deb $MIRROR $RELEASE $COMPONENTS" > /etc/apt/sources.list fi fi @@ -69,6 +79,7 @@ chrootmirror() { case "$RELEASE" in unstable|sid) ;; # no security pool available *) + echo "Adding security.debian.org to sources.list." echo "deb http://security.debian.org ${RELEASE}/updates $COMPONENTS" >> /etc/apt/sources.list ;; esac