From f524f063ea335221c1ee2a74ba18f7b5a808fdb5 Mon Sep 17 00:00:00 2001 From: Helmut Grohne Date: Tue, 17 Jan 2023 07:54:21 +0100 Subject: debvm-create: combine ?exact-name with ?not(virtual) When apt encounters a package that does not exist, but is referenced via Recommends, Suggests, Breaks or otherwise, it errors out with a missing installation candidate. This happens for linux-image-generic on buster. To avoid this situation, we specifically ask apt to not consider virtual packages whenever we use ?exact-name. --- bin/debvm-create | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'bin/debvm-create') diff --git a/bin/debvm-create b/bin/debvm-create index 31e1e45..95305a9 100755 --- a/bin/debvm-create +++ b/bin/debvm-create @@ -231,7 +231,7 @@ case "$ARCHITECTURE" in esac if ! check_skip kernel; then - set -- "--include=?or(?exact-name(linux-image-cloud-$KERNEL_ARCH),?exact-name(linux-image-$KERNEL_ARCH),?exact-name(linux-image-generic))" "$@" + set -- "--include=?not(?virtual)?or(?exact-name(linux-image-cloud-$KERNEL_ARCH),?exact-name(linux-image-$KERNEL_ARCH),?exact-name(linux-image-generic))" "$@" fi # construct mmdebstrap options as $@: @@ -257,7 +257,7 @@ if ! check_skip systemdnetwork; then # dhcp on all network interfaces, and add a dns resolver set -- \ "--customize-hook=$SHARE_DIR/customize-networkd.sh" \ - '--include=?exact-name(libnss-resolve)' \ + '--include=?not(?virtual)?exact-name(libnss-resolve)' \ "--customize-hook=$SHARE_DIR/customize-resolved.sh" \ "$@" fi -- cgit v1.2.3