Hi Andrej,

On Sun, Mar 21, 2021 at 07:25:58PM +0100, Andrej Shadura wrote:
> Since pkgconf added support for personalities [1], it is now possible to
> implement cross support without pkgconf-cross-wrapper and most of the
> related machinery.

Let me sketch a proposal on how to implement this:

 * Get rid of the "old" way: Drop the dpkg hook and the cross wrapper.
 * Rename the pkgconf binary package to pkgconf-bin. Don't miss out on
   Breaks + Replaces. Mark pkgconf-bin Multi-Arch: foreign.
 * Create a new binary package "pkgconf". It depends on pkgconf-bin. It
   contains two things:
    * The /usr/bin/<triplet>-pkgconf -> pkgconf symlink.
    * The personality file relevant to <triplet>.
 * Possibly add a build profile called pkg.pkgconf.personalityonly. When
   enabling it the entire package build is skipped and the only package
   built is the new pkgconf package. In particular, this profile should
   not use a C compiler. I'm not sure whether this profile is truly
   needed, but it should be simple if we figure out that it is.
 * Optionally, pkgconf-bin can provide pkgconf-for-build to follow the
   convention established in binutils.

However, this is mixing two different aspects. The personality approach
can also be implemented with the dpkg hook while dropping the cross
wrapper only. I do prefer the hook-less way though, becaue it is less
magic and easier to get right in the presence of DPKG_ROOT.

Helmut

Reply via email to