Skip to content

Commit 22f3925

Browse files
committed
rootfs-create: verbose mmdebstrap by default, --debug under DEBUG=yes
mmdebstrap setup failures routinely surface as a one-line 'E: setup failed' in Armbian build logs with no context about which package dep resolution actually blew up. Diagnosing those (gnupg2/dirmngr sid/loong64 port-sync skew, package rename across a release bump, etc.) currently requires rebuilding locally with DEBUG=yes to see mmdebstrap's own progress/solver output. Make --verbose the default so the normal build log shows apt's per-package download + solver work. Gate --debug behind DEBUG=yes for the heavier trace (hook hashes, command echoes) that's only interesting when debugging rootfs bootstrap failures.
1 parent ef5966a commit 22f3925

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

lib/functions/rootfs/rootfs-create.sh

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,17 @@ function create_new_rootfs_cache_via_debootstrap() {
100100
"'--components=${AGGREGATED_DEBOOTSTRAP_COMPONENTS_COMMA}'" # from aggregation.py
101101
"'--skip=check/empty'" # skips check if the rootfs dir is empty at start
102102
)
103+
104+
# Verbosity: always show per-package download/install progress via
105+
# --verbose. With DEBUG=yes escalate to --debug (superset of
106+
# --verbose) which also adds mmdebstrap's own debug messages and
107+
# bash xtrace on every --setup-hook/--customize-hook.
108+
if [[ "${DEBUG}" == "yes" ]]; then
109+
debootstrap_arguments+=("--debug")
110+
else
111+
debootstrap_arguments+=("--verbose")
112+
fi
113+
103114
fetch_distro_keyring "$RELEASE"
104115

105116
# This is necessary to debootstrap from a non-official repo

0 commit comments

Comments
 (0)