Draft: Support for Build-Profiles
On apt.postgresql.org, I'm keeping packages for very old PostgreSQL major versions alive so people have something to install when they want to start up old databases. So far, that has worked quite well, but over time, incompatibilities creep in.
The newest bug is that PostgreSQL 9.x still depends on Python distutils, but Python 3.12 (default in the upcoming Ubuntu noble 24.04) has finally removed that module. To fix, I added a "nopython" build-profile in the postgresql-9.6 package that is activated when building on noble. That does fix the package building, but unfortunately it doesn't fix autopkgtest running on that package.
The postgresql-plpython3-9.6 binary is still listed in the Sources stanza for postgresql-9.6:
postgresql-plpython3-9.6 deb database optional arch=any profile=!nopython
So autopkgtest postgresql-9.6 -- null
will try to install it, but
since the package doesn't exist, it fails.
To fix, I added a -P --build-profiles switch to autopkgtest (same option as in dpkg-buildpackage), which fixes the "extract binaries list from Sources stanza" part, but unfortunately there are many more places in autopkgtest that read package lists, so testing the package still fails.