Hi!

On Sun, 2025-01-26 at 11:07:39 +0100, Niels Thykier wrote:
> Package: dpkg-dev
> Version: 1.22.11
> Severity: minor
> X-Debbugs-Cc: ni...@thykier.net

> When the package is built, I get the following warnings:

> >    dh_gencontrol
> > dpkg-gencontrol: warning: package cross-exe-wrapper: substitution variable 
> > ${DEB-HOST-ARCH} unused, but is defined
> > dpkg-gencontrol: warning: package cross-exe-wrapper: substitution variable 
> > ${DEB-HOST-GNU-TYPE} unused, but is defined
> >    dh_md5sums

> But the generated .deb does seem to have used the substvar:
> 
> > $ dpkg-deb -f ../cross-exe-wrapper_${VERSION}_amd64.deb Description
> > Wrapper for executing binaries from other architectures
> >  Provides a tool x86_64-linux-gnu-cross-exe-wrapper that can be
> >  used to run amd64 ELF executables on the current CPU
> >  employing emulation technology if required.

Ah, that looked very surprising indeed. Started to check what might
have broken on the dpkg-dev side, but then built the package with
DH_VERBOSE=1 and -j1, and got this invocation sequence:

  dpkg-gencontrol -pcross-exe-wrapper -ldebian/changelog \
    -Tdebian/cross-exe-wrapper.substvars -cdebian/control \
    -Pdebian/.debhelper/cross-exe-wrapper/dbgsym-root \
    -UPre-Depends -URecommends -USuggests -UEnhances -UProvides \
    -UEssential -UConflicts -DPriority=optional -UHomepage \
    -UImportant -DAuto-Built-Package=debug-symbols -UProtected \
    -UBuilt-Using -UStatic-Built-Using \
    -DPackage=cross-exe-wrapper-dbgsym \
    "-DDepends=cross-exe-wrapper (= \${binary:Version})" \
    "-DDescription=debug symbols for cross-exe-wrapper" \
    -DBuild-Ids=edede37420ad37957c6efc1b90ec8747e296da5a \
    -DSection=debug -UReplaces -UBreaks

And then:

  dpkg-gencontrol -pcross-exe-wrapper -ldebian/changelog \
     -Tdebian/cross-exe-wrapper.substvars -cdebian/control \
     -Pdebian/cross-exe-wrapper

The first is the one generating the warnings, because its overridden
Description does not use the substvars.

This seems to be part of debhelper automatic debug package generation,
where it's trying to share most of the parent package to generate the
automatic one, but where the substvar inheritance does not seem to be
playing nice.

I don't think this is a problem in dpkg-dev, I guess it could be
considered a bug in debhelper? (If so, feel free to reassign, or to
close. :)

Thanks,
Guillem

Reply via email to