From 2c232e066183133c84f3eb4437a8365f9e27f7b2 Mon Sep 17 00:00:00 2001 From: Johannes 'josch' Schauer Date: Wed, 2 Dec 2020 00:33:18 +0100 Subject: [PATCH] don't ignore packages added via --include if multiple apt indices are used --- coverage.sh | 21 ++++++++++++++++++++- mmdebstrap | 2 +- 2 files changed, 21 insertions(+), 2 deletions(-) diff --git a/coverage.sh b/coverage.sh index 5a408cb..1f2bacb 100755 --- a/coverage.sh +++ b/coverage.sh @@ -119,7 +119,7 @@ if [ ! -e shared/hooks/eatmydata/customize.sh ] || [ hooks/eatmydata/customize.s fi fi starttime= -total=166 +total=167 skipped=0 runtests=0 i=1 @@ -1858,6 +1858,25 @@ else runtests=$((runtests+1)) fi +# This checks for https://bugs.debian.org/976166 +# Since $DEFAULT_DIST varies, we hardcode stable and unstable. +print_header "mode=root,variant=apt: test --include with multiple apt sources" +cat << END > shared/test.sh +#!/bin/sh +set -eu +export LC_ALL=C.UTF-8 +$CMD --mode=root --variant=minbase --include=doc-debian unstable /tmp/debian-chroot "deb $mirror unstable main" "deb $mirror stable main" +chroot /tmp/debian-chroot dpkg-query --show doc-debian +rm -r /tmp/debian-chroot +END +if [ "$HAVE_QEMU" = "yes" ]; then + ./run_qemu.sh + runtests=$((runtests+1)) +else + ./run_null.sh SUDO + runtests=$((runtests+1)) +fi + print_header "mode=root,variant=apt: test merged-usr via --setup-hook" cat << END > shared/test.sh #!/bin/sh diff --git a/mmdebstrap b/mmdebstrap index 467f074..fbbeeff 100755 --- a/mmdebstrap +++ b/mmdebstrap @@ -1959,7 +1959,7 @@ sub run_download() { ) { my %ess_pkgs; my %ess_pkgs_target; - my %pkgs_to_install_target; + my %pkgs_to_install_target = %pkgs_to_install; my $num_indices = 0; open( my $pipe_apt,