From 27fca53e1de0dcf2108c13d07f0f21635bdd496d Mon Sep 17 00:00:00 2001 From: Gioele Barabucci Date: Sat, 20 Aug 2022 17:05:11 +0200 Subject: [PATCH] mmdebstrap: Show APT's dependency trace when in debug mode A dependency trace is a powerful tool to debug issues related to APT's selection of packages, especially in custom mode. Thus it makes sense to ask APT to output a dependency trace when `mmdebstrap` is run with the `--debug` flag. --- mmdebstrap | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/mmdebstrap b/mmdebstrap index 5db65bb..b61b4cd 100755 --- a/mmdebstrap +++ b/mmdebstrap @@ -961,6 +961,16 @@ sub run_apt_download_progress { } else { info "downloading packages with apt..."; } + + if ($verbosity_level >= 3) { + my @apt_debug_opts = qw( + -oDebug::pkgProblemResolver=true + -oDebug::pkgDepCache::Marker=1 + -oDebug::pkgDepCache::AutoInstall=1 + ); + push @{ $options->{APT_ARGV} }, @apt_debug_opts; + } + pipe my $rfh, my $wfh; my $pid = open my $fh, '-|' // error "fork() failed: $!"; if ($pid == 0) { -- 2.39.5