From 6d966d86d5bed1c59a8c9ba4579d0e2ccc9d2117 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Tue, 11 Jun 2024 19:20:59 +0200 Subject: Merging debian version 1.5.1-3. Signed-off-by: Daniel Baumann --- ...-sources.list-only-write-out-etc-apt-sour.patch | 33 ++++++++++++++++++++++ debian/patches/series | 1 + 2 files changed, 34 insertions(+) create mode 100644 debian/patches/0001-tests-empty-sources.list-only-write-out-etc-apt-sour.patch (limited to 'debian/patches') diff --git a/debian/patches/0001-tests-empty-sources.list-only-write-out-etc-apt-sour.patch b/debian/patches/0001-tests-empty-sources.list-only-write-out-etc-apt-sour.patch new file mode 100644 index 0000000..522f4ca --- /dev/null +++ b/debian/patches/0001-tests-empty-sources.list-only-write-out-etc-apt-sour.patch @@ -0,0 +1,33 @@ +From 482699f377be9456cf42642e8912d040807c7b0b Mon Sep 17 00:00:00 2001 +From: Johannes Schauer Marin Rodrigues +Date: Tue, 11 Jun 2024 12:41:15 +0200 +Subject: [PATCH] tests/empty-sources.list: only write out + /etc/apt/sources.list if it doesn't exist yet + +In the mmdebstrap autpkgtest, debian/tests/sourcesfilter will write out +/etc/apt/sources.list before the test's setup-hook is run. Thus, the +test's setup-hook will overwrite the contents of the sources.list that +debian/tests/sourcesfilter set up, which will end up pulling in the +wrong packages. + +Thus, only write out our own /etc/apt/sources.list if it does not yet +exist. If it does exist, nothing needs to be done. +--- + tests/empty-sources.list | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/tests/empty-sources.list b/tests/empty-sources.list +index bf384f3..f9a6a6a 100644 +--- a/tests/empty-sources.list ++++ b/tests/empty-sources.list +@@ -3,6 +3,6 @@ set -eu + export LC_ALL=C.UTF-8 + trap "rm -f /tmp/debian-chroot.tar" EXIT INT TERM + printf '' | {{ CMD }} --mode={{ MODE }} --variant=apt \ +- --setup-hook='echo "deb {{ MIRROR }} {{ DIST }} main" > "$1"/etc/apt/sources.list' \ ++ --setup-hook='test -e "$1"/etc/apt/sources.list || echo "deb {{ MIRROR }} {{ DIST }} main" > "$1"/etc/apt/sources.list' \ + {{ DIST }} /tmp/debian-chroot.tar - + tar -tf /tmp/debian-chroot.tar | sort | diff -u tar1.txt - +-- +2.39.2 + diff --git a/debian/patches/series b/debian/patches/series index 39c5319..f54042e 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1 +1,2 @@ 0001-tests-base-files-now-ships-merged-usr-symlinks.patch +0001-tests-empty-sources.list-only-write-out-etc-apt-sour.patch -- cgit v1.2.3