depends: Hash included makefiles in package checksums #34239

pull hebasto wants to merge 1 commits into bitcoin:master from hebasto:260109-qt-details changing 1 files +1 −1
  1. hebasto commented at 3:07 pm on January 9, 2026: member

    This PR fixes an issue where modifications in included files (e.g. packages/qt_details.mk) do not trigger a rebuild of the parent packages (native_qt and qt).

    This addresses an oversight in 248613eb3ee034bf143821a51635e697dc114e6c from #30997.

    Reproduction

    On master (@ 595504a43209bead162da54a204df7d140a25f0e), modifying the included makefile does not change the build ID:

    0$ cd depends
    1$ gmake print-qt_build_id HOST=x86_64-w64-mingw32
    2qt_build_id=b2ce790473c
    3$ gmake print-native_qt_build_id HOST=x86_64-w64-mingw32
    4native_qt_build_id=70e1e5164c5
    5$ echo "" >> packages/qt_details.mk
    6$ gmake print-qt_build_id HOST=x86_64-w64-mingw32
    7qt_build_id=b2ce790473c
    8$ gmake print-native_qt_build_id HOST=x86_64-w64-mingw32
    9native_qt_build_id=70e1e5164c5
    

    With this patch

    The checksum calculation now parses include directives and adds those files to the hash. The IDs now update correctly:

    0$ cd depends
    1$ gmake print-qt_build_id HOST=x86_64-w64-mingw32
    2qt_build_id=9a6ebf79cb3
    3$ gmake print-native_qt_build_id HOST=x86_64-w64-mingw32
    4native_qt_build_id=6ad78a3f644
    5$ echo "" >> packages/qt_details.mk
    6$ gmake print-qt_build_id HOST=x86_64-w64-mingw32
    7qt_build_id=ca820665c52
    8$ gmake print-native_qt_build_id HOST=x86_64-w64-mingw32
    9native_qt_build_id=082e4cb2364
    
  2. hebasto added the label Build system on Jan 9, 2026
  3. DrahtBot commented at 3:07 pm on January 9, 2026: contributor

    The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

    Code Coverage & Benchmarks

    For details see: https://corecheck.dev/bitcoin/bitcoin/pulls/34239.

    Reviews

    See the guideline for information on the review process.

    Type Reviewers
    Approach NACK fanquake

    If your review is incorrectly listed, please copy-paste <!–meta-tag:bot-skip–> into the comment that the bot should ignore.

  4. fanquake commented at 3:14 pm on January 9, 2026: member
    Approach NACK. We’ve removed sed usage (in #19761 + some later changes) because its generally not portable, can fail silently, and previously its usage was either poorly, or completely undocumented (this change also lacks any inline documentation). I’d rather not reintroduce it.
  5. hebasto commented at 3:23 pm on January 9, 2026: member

    Approach NACK. We’ve removed sed usage (in #19761 + some later changes)

    Yes, I remember that. However, sed is still used in both depends and contrib/guix:

    0$ git grep -l -w sed -- depends/Makefile contrib/guix/
    1contrib/guix/INSTALL.md
    2contrib/guix/guix-attest
    3contrib/guix/guix-build
    4contrib/guix/libexec/build.sh
    5contrib/guix/manifest.scm
    6depends/Makefile
    

    … because its generally not portable, can fail silently, and previously its usage was either poorly, or completely undocumented (this change also lacks any inline documentation). I’d rather not reintroduce it.

    I’ll look into alternative implementations though.

  6. fanquake commented at 3:30 pm on January 9, 2026: member
    The single usage in depends is straightforward, and needed to substitute runtime values. The usage in Guix is in the docs, a workaround for a bug in CMake and for dealing with runtime values (sha256sums).
  7. depends: Hash included makefiles in package checksums
    Fix the behavior where modifications in included files (e.g.
    `packages/qt_details.mk`) do not trigger a rebuild of the
    parent packages (`native_qt` and `qt`).
    
    The checksum calculation now parses `include` directives and
    adds those files to the hash.
    143e0d117c
  8. hebasto force-pushed on Jan 9, 2026
  9. DrahtBot added the label CI failed on Jan 9, 2026
  10. hebasto commented at 3:31 pm on January 9, 2026: member
    Reworked to avoid using sed.
  11. hebasto removed the label CI failed on Jan 9, 2026

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-01-28 21:13 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me