On Thu, 08 Feb 2018 at 21:26:14 +0100, Helmut Grohne wrote: > So we'd also need a > new binary package (probably called "valac-bin"), move /usr/bin/valac to > that new package, add a dependency from valac to the new package and > mark the new package Multi-Arch: foreign. That's not fully correct as > valac is still architecture-dependent, but anyone wanting a particular > architecture's behaviour can and should simply run > ${DEB_HOST_GNU_TYPE}-valac. We do the same for pkg-config and that > appears to work fairly well. Consumers need to add this prefix of course > and I sent a patch for AM_PROG_VALAC (#889920) already.
Would it work to move /usr/bin/valac to /usr/libexec/valac in the new, Multi-Arch: foreign valac-bin package, and have these scripts in valac? /usr/bin/valac: #!/bin/sh exec /usr/libexec/valac --cc="${CC:-cc}" --pkg-config="${PKG_CONFIG:-pkg-config}" "$@" /usr/bin/@DEB_HOST_GNU_TYPE@-valac: #!/bin/sh exec /usr/libexec/valac --cc="${CC:-@DEB_HOST_GNU_TYPE@-gcc}" --pkg-config="${PKG_CONFIG:-@DEB_HOST_GNU_TYPE@-pkg-config}" "$@" And then #889920 would still be helpful, but not a blocker, because in practice most packages that compile Vala code (and in particular those that use Autotools) will already export an appropriate $CC and $PKG_CONFIG? (In fact valac is just a symlink to valac-0.42, so we'd probably want to move this indirection down to valac-0.42, vapigen-0.42 etc., which would help to make it clearer that valac-bin is an implementation detail, because it wouldn't contain any command-line APIs that were stable between versions at all.) However, this is not the only Multi-Arch issue with valac: vapigen would also need checking for Multi-Arch suitability. It is used directly in many packages. /usr/lib/*/vala-*/gen-introspect-* would also need checking for Multi-Arch suitability, and /usr/bin/vala-gen-introspect is a shell script wrapper around /usr/lib/*/vala-*/gen-introspect-* which hard-codes pkg-config. It should at least use ${PKG_CONFIG}. This is used directly in the geary and libdmapsharing packages. smcv