Draft: If dpkg is sufficiently new, tell it to sanitize the build environment
-
testbed: Record the dpkg version as well as the apt version
-
If dpkg is sufficiently new, tell it to sanitize the build environment
If autopkgtest is run in an unclean environment, this avoids having that environment leak into the package under test.
In particular, when autopkgtest itself (an Architecture: all package) is built, we must not allow internal variables set by debhelper to propagate into the Architecture: any packages that are built and tested by autopkgtest's test suite, because it will cause them to fail to build.
This is only a partial solution to #7 because we document that we still aim to support Ubuntu 20.04 hosts, which have a dpkg version that is too old for this.
Helps: https://salsa.debian.org/ci-team/autopkgtest/-/issues/7
As well as not working on Ubuntu 20.04, this currently doesn't work at all. I don't yet understand why, and am still trying to debug. Please consider !503 (merged), at least as a stopgap solution until I can get this working.