From a3fff16fd6cf180f36063d642671cbc3b4c9d2e1 Mon Sep 17 00:00:00 2001 From: Helmut Grohne Date: Sat, 7 Jan 2023 21:32:43 +0100 Subject: debvm-create: allow skipping package lists --- debvm-create | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/debvm-create b/debvm-create index f3f9895..1f5e8df 100755 --- a/debvm-create +++ b/debvm-create @@ -75,7 +75,16 @@ The following tasks may be skipped. =over 4 -=item B skips installing B as well as automatic network configuration via B. +=item B + +skips installing B as well as automatic network configuration via B. + +=item B + +reduces the package lists inside the image. +The B database for B is not created. +The package lists used by B are deleted. +This generally produces a smaller image, but you need to run B before installing packages and B does not work. =back @@ -332,10 +341,12 @@ if test -n "$SSHKEY"; then "$@" fi -set -- --skip=cleanup/apt/lists "$@" +if ! check_skip packagelists; then + set -- --skip=cleanup/apt/lists "$@" -# We need /var/lib/dpkg/available for dpkg --set-selections to work. -set -- '--customize-hook=chroot "$1" apt-cache dumpavail | chroot "$1" dpkg --update-avail' "$@" + # We need /var/lib/dpkg/available for dpkg --set-selections to work. + set -- '--customize-hook=chroot "$1" apt-cache dumpavail | chroot "$1" dpkg --update-avail' "$@" +fi if test "$DEBVER" -le 8; then # Use obsolete and expired keys. -- cgit v1.2.3