forked from josch/mmdebstrap
set APT::Immediate-Configure to false in dry-run mode
This commit is contained in:
parent
3e50d09b43
commit
1ff5ba7e9e
1 changed files with 19 additions and 2 deletions
17
mmdebstrap
17
mmdebstrap
|
@ -1224,6 +1224,14 @@ sub setup {
|
||||||
# options.
|
# options.
|
||||||
print $conf "pkgCacheGen::ForceEssential \",\";\n";
|
print $conf "pkgCacheGen::ForceEssential \",\";\n";
|
||||||
}
|
}
|
||||||
|
if ($options->{dryrun}) {
|
||||||
|
# Without this option, apt will fail with:
|
||||||
|
# E: Could not configure 'libc6:amd64'.
|
||||||
|
# E: Could not perform immediate configuration on 'libgcc1:amd64'.
|
||||||
|
#
|
||||||
|
# See https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=953260
|
||||||
|
print $conf "APT::Immediate-Configure false;\n";
|
||||||
|
}
|
||||||
close $conf;
|
close $conf;
|
||||||
|
|
||||||
{
|
{
|
||||||
|
@ -2851,6 +2859,15 @@ sub main() {
|
||||||
'setup-hook=s@' => \$options->{setup_hook},
|
'setup-hook=s@' => \$options->{setup_hook},
|
||||||
'essential-hook=s@' => \$options->{essential_hook},
|
'essential-hook=s@' => \$options->{essential_hook},
|
||||||
'customize-hook=s@' => \$options->{customize_hook},
|
'customize-hook=s@' => \$options->{customize_hook},
|
||||||
|
# Sometimes --simulate fails even though non-simulate succeeds because
|
||||||
|
# in simulate mode, apt cannot rely on dpkg to figure out tricky
|
||||||
|
# dependency situations and will give up instead when it cannot find
|
||||||
|
# a solution.
|
||||||
|
#
|
||||||
|
# 2020-02-06, #debian-apt on OFTC, times in UTC+1
|
||||||
|
# 12:52 < DonKult> [...] It works in non-simulation because simulate is
|
||||||
|
# more picky. If you wanna know why simulate complains
|
||||||
|
# here prepare for long suffering in dependency hell.
|
||||||
'simulate' => \$options->{dryrun},
|
'simulate' => \$options->{dryrun},
|
||||||
'dry-run' => \$options->{dryrun},
|
'dry-run' => \$options->{dryrun},
|
||||||
) or pod2usage(-exitval => 2, -verbose => 1);
|
) or pod2usage(-exitval => 2, -verbose => 1);
|
||||||
|
|
Loading…
Reference in a new issue