From 29550acb8835abcff5caf82a8912411788e95f54 Mon Sep 17 00:00:00 2001 From: Johannes 'josch' Schauer Date: Sun, 30 Dec 2018 17:18:27 +0100 Subject: [PATCH] add --interactive=never to rm call to avoid prompts for removal of write protected files in proot mode --- mmdebstrap | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/mmdebstrap b/mmdebstrap index 5c1a37a..4f7324e 100755 --- a/mmdebstrap +++ b/mmdebstrap @@ -1963,7 +1963,11 @@ sub main() { # without unshare, we use the system's rm to recursively remove the # temporary directory just to make sure that we do not accidentally # remove more than we should by using --one-file-system. - 0 == system('rm', '--recursive', '--preserve-root', '--one-file-system', $options->{root}) or die "rm failed: $!"; + # + # --interactive=never is needed when in proot mode, the + # write-protected file /apt/apt.conf.d/01autoremove-kernels is to + # be removed. + 0 == system('rm', '--interactive=never', '--recursive', '--preserve-root', '--one-file-system', $options->{root}) or die "rm failed: $!"; } else { die "unknown mode: $options->{mode}"; }