Skip to content

Commit 0927524

Browse files
committed
fix(kernel-debs): allow 'dwarves' as alternative for 'pahole' in headers Depends
Older releases (Debian buster/bullseye, Ubuntu focal) do not have a standalone 'pahole' package — pahole ships inside the 'dwarves' package there. The headers .deb's unsatisfiable 'Depends: pahole' broke apt install on these older releases: E: Unable to locate package pahole E: Unable to correct problems, you have held broken packages. Reproduces with e.g. helios4 / bullseye / edge. Use 'pahole | dwarves' alternative dependency so apt picks 'pahole' on modern releases and falls back to 'dwarves' on the older ones (on bookworm+/jammy+ 'dwarves' is a transitional package that pulls 'pahole', so the alternative remains satisfiable everywhere). This also lets us drop the explicit pre-install of pahole from install_distribution_agnostic(): installing the headers .deb pulls in pahole/dwarves automatically via Depends. When buster/bullseye/focal support is dropped, the alternative can be simplified back to a plain 'pahole'. Assisted-by: Claude:claude-opus-4.7
1 parent cfacf12 commit 0927524

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

lib/functions/compilation/kernel-debs.sh

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -511,6 +511,9 @@ function kernel_package_callback_linux_headers() {
511511

512512
# Generate a control file
513513
# TODO: libssl-dev is only required if we're signing modules, which is a kernel .config option.
514+
# Note: 'pahole | dwarves' alternative — older releases (buster/bullseye/focal) ship pahole inside the
515+
# 'dwarves' package; standalone 'pahole' exists from bookworm/jammy onward. When support for these
516+
# releases is dropped, simplify to 'pahole'.
514517
cat <<- CONTROL_FILE > "${package_DEBIAN_dir}/control"
515518
Version: ${artifact_version}
516519
Maintainer: ${MAINTAINER} <${MAINTAINERMAIL}>
@@ -519,7 +522,7 @@ function kernel_package_callback_linux_headers() {
519522
Architecture: ${ARCH}
520523
Priority: optional
521524
Provides: linux-headers (= ${kernel_version}), linux-headers-armbian, armbian-$BRANCH
522-
Depends: make, gcc, libc6-dev, bison, flex, libssl-dev, libelf-dev, pahole
525+
Depends: make, gcc, libc6-dev, bison, flex, libssl-dev, libelf-dev, pahole | dwarves
523526
Description: Armbian Linux $BRANCH headers ${kernel_version_family}
524527
This package provides kernel header files for ${kernel_version_family}
525528
.

lib/functions/rootfs/distro-agnostic.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -378,7 +378,6 @@ function install_distribution_agnostic() {
378378

379379
if [[ "${KERNEL_HAS_WORKING_HEADERS:-"no"}" == "yes" ]]; then
380380
if [[ $INSTALL_HEADERS == yes ]]; then # @TODO remove? might be a good idea to always install headers.
381-
chroot_sdcard_apt_get_install "pahole"
382381
install_artifact_deb_chroot "linux-headers"
383382
fi
384383
fi

0 commit comments

Comments
 (0)