• Bug#1094227: dpkg-dev: The `dpkg-gencontrol` was about a unused substva

    From Guillem Jover@21:1/5 to Guillem Jover on Mon Feb 3 12:10:01 2025
    XPost: linux.debian.bugs.dist

    Control: reassign -1 debhelper
    Control: retitle -1 debhelper: Causes substvar warnings for dbgsym packages

    Hi!

    On Sun, 2025-01-26 at 13:42:26 +0100, Guillem Jover wrote:
    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: niels@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. :)

    Ok, let me reassign to get it out of the way (for dpkg), and then you
    can deal with it however you prefer. :)

    Thanks,
    Guillem

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Guillem Jover@1:229/2 to Niels Thykier on Sun Jan 26 13:50:01 2025
    XPost: linux.debian.bugs.dist
    From: guillem@debian.org

    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: niels@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

    --- SoupGate-Win32 v1.05
    * Origin: you cannot sedate... all the things you hate (1:229/2)