On Sat, 25 Feb 2023 at 12:08, Helmut Grohne <hel...@subdivi.de> wrote:

> I think I understand this part. At no point did Simon or me ask for
> changing the interface of env2mfile. What we asked for is to retain the
> interface of debcrossgen, which is Debian-specific. These requirements
> seem quite easy to reconcile to me.

Sure, but in Meson (and distro packaging specifically) we want to move
_all_ functionality in core rather than keep them around as patches.
Having both an autodetection and an explicit platform selection is
useful on its own so it should be in upstream code. This approach does
that while still retaining the public interface for debcrossgen.

> Instead, we can make debcrossgen forward its --arch flag as --debarch if
> present. This part already happens if you use the external
> implementation. If no --arch is given, debcrossgen can add a
> --debarch=${DEB_HOST_ARCH} flag. This way the way debhelper calls
> debcrossgen continues to work and debcrossgen becomes a compatibility
> layer.

What I wanted was to isolate _all_ code that has to do with platform
detection and selection in exactly one place. The only thing
debcrossgen should do is to call a different command. It should have
_zero_ "platform logic" code, meaning it should not touch any
DEB_HOST_* environment variables.

> > - when everything has settled, debhelper can be changed to call
> > env2mfile --debarch=auto
>
> Instead, debhelper can simply call env2mfile --debarch=${DEB_HOST_ARCH}.

With this approach both of these work.

Reply via email to