Draft: Use sources.list.d to fix #1086701
-
d/README.source: Mention some apt features that we cannot use yet
-
adt_binaries: Rename autopkgtest.list to 00autopkgtest-binaries.list
sources.list(5) entries are arranged in priority order, starting with
/etc/apt/sources.list
, followed by/etc/apt/sources.list.d/*.list
and/etc/apt/sources.list.d/*.sources
in lexicographic order. We want autopkgtest's binaries under test (either newly built, or supplied on the autopkgtest(1) command-line) to take higher precedence than any binaries of the same version that might come from ordinary apt archives.Using sequence number 00 puts our binaries before every sources.list(5) entry, except for sources.list itself.
-
adt_binaries: Use .pref extension for apt_preferences(5)
-
adt_binaries: Move shell scripts out-of-line
-
binaries-init: Coding style
-
binaries-init: Rename sources.list to sources.list.d/01*.list
This makes it lower-precedence than our 00autopkgtest-binaries.list, which means that if the binaries newly built from source by autopkgtest or supplied on the command-line differ from the binaries in the archive but have the same version number, we will not consider them to be a downgrade.
Closes: #1086701
-
setup-commands: Try reading other filenames before sources.list
01autopkgtest-default-XXXXXX.list is created by binaries-init.sh: if we see this filename, we can be quite confident that it's the list of apt sources that was previously in /etc/apt/sources.list, so we should read it with higher precedence.
Similarly
$distro.list
is a sensible name for the distro's basic apt sources, analogous to the$distro.sources
recommended by apt upstream. -
build-lxd: Reuse setup-commands/get-release instead of reinventing it
This allows it to distinguish between Debian testing and unstable, and also gives it support for apt sources configured in sources.list.d.
-
setup-testbed: Create /etc/apt/sources.list.d/VENDOR.list if not deb822
This is analogous to the VENDOR.sources that we create when using deb822 format, and in particular is lower-precedence than the /etc/apt/sources.list.d/00autopkgtest-binaries.list created by binaries-init.sh, which means we won't need to rename it out of the way in newly-created containers and virtual machines.
Alternative to !476 (closed) as a solution to https://bugs.debian.org/1086701. Needs testing, especially the build-lxd
part.
/cc @paride