Makefile: Abolish `$(HERE)' as a bad idea.
[distorted-chroot] / bin / mkbuildchroot
index 58dc7c6..a6ac135 100755 (executable)
@@ -78,10 +78,6 @@ chmod 750 $mnt/
 
 ## Install the base system.
 want=$BASE_PACKAGES
-case $qemup in
-  t) want="$want $FOREIGN_BASE_PACKAGES" ;;
-  nil) want="$want $NATIVE_BASE_PACKAGES" ;;
-esac
 pkgs=; for p in $want; do pkgs=${pkgs:+$pkgs,}$p; done
 eatmydata debootstrap $dbsopts --arch=$a --variant=minbase \
          --include=$pkgs $d $mnt/fs/ $DEBMIRROR
@@ -152,7 +148,7 @@ case $qemup in
     ## the `--no-rename' option was required in the same version in which is
     ## was introduced, so there's no single incantation that will work across
     ## the boundary.
-    schroot -uroot -csource:$LVPREFIX$d-$a -- eatmydata sh -e -c "
+    schroot -uroot -csource:$lv -- eatmydata sh -e -c "
        if dpkg-divert >/dev/null 2>&1 --no-rename --help
        then no_rename=--no-rename
        else no_rename=
@@ -163,15 +159,15 @@ case $qemup in
 
     ## Install faster native tools.
     $STATE/bin/install-cross-tools $d $a
-
-    ## Install `build-essential', which had been delayed from earlier.
-    schroot -uroot -csource:$LVPREFIX$d-$a -- \
-           eatmydata apt-get -y install build-essential
-    ;;
 esac
 
+## Install extra packages now that everything should go fairly quickly.
+want=$EXTRA_PACKAGES
+pkgs=; for p in $want; do pkgs=${pkgs:+$pkgs,}$p; done
+schroot -uroot -csource:$lv -- eatmydata apt-get -y install $pkgs
+
 ## Set the chroot's package state up properly.
-schroot -uroot -csource:$LVPREFIX$d-$a -- eatmydata sh -e -c '
+schroot -uroot -csource:$lv -- eatmydata sh -e -c '
        apt-get update
        apt-get -y upgrade
        locale-gen