On Sun, 12 Sep 2021 at 14:47:20 +0200, Andreas Metzler wrote: > On 2021-09-11 Simon McVittie <s...@debian.org> wrote: > > GLib uses a generated postinst where #MULTIARCH# gets replaced > > by the multiarch tuple of the package. > > dpkg-buildpackage sets DEB_BUILD_MULTIARCH but afaiui > one cannot /rely/ on it being set since it is not listed in policy 4.9. > I will probably make sure it is set in debian/rules and use > #ENV.DEB_BUILD_MULTIARCH#
You want DEB_HOST_MULTIARCH, not DEB_BUILD_MULTIARCH, for this. When cross-compiling, DEB_BUILD_MULTIARCH is the machine on which the package is being built, which is only rarely an important piece of information. (For example if you cross-compile a package for mipsel on amd64, the host architecture is mipsel and the build architecture is amd64. The multiarch tuple my script would need from the postinst is the one for mipsel.) If in doubt, the _HOST_ variables are usually the right ones to look at. smcv