diff options
author | Helmut Grohne <helmut@subdivi.de> | 2023-01-07 21:32:43 +0100 |
---|---|---|
committer | Helmut Grohne <helmut@subdivi.de> | 2023-01-07 21:32:43 +0100 |
commit | a3fff16fd6cf180f36063d642671cbc3b4c9d2e1 (patch) | |
tree | 9aa34dd226d229154dad8c2aaa3dda71dd3e87fb /debvm-create | |
parent | d1603fc20101de5b32030f314500fc0be65dcf29 (diff) | |
download | debvm-a3fff16fd6cf180f36063d642671cbc3b4c9d2e1.tar.gz |
debvm-create: allow skipping package lists
Diffstat (limited to 'debvm-create')
-rwxr-xr-x | debvm-create | 19 |
1 files 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<systemdnetwork> skips installing B<libnss-resolve> as well as automatic network configuration via B<systemd-networkd>. +=item B<systemdnetwork> + +skips installing B<libnss-resolve> as well as automatic network configuration via B<systemd-networkd>. + +=item B<packagelists> + +reduces the package lists inside the image. +The B<available> database for B<dpkg> is not created. +The package lists used by B<apt> are deleted. +This generally produces a smaller image, but you need to run B<apt update> before installing packages and B<dpkg --set-selections> 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. |