add --interactive=never to rm call to avoid prompts for removal of write protected files in proot mode

This commit is contained in:
Johannes 'josch' Schauer 2018-12-30 17:18:27 +01:00
parent 903b318ccc
commit 29550acb88
Signed by: josch
GPG key ID: F2CBA5C78FBD83E1

View file

@ -1963,7 +1963,11 @@ sub main() {
# without unshare, we use the system's rm to recursively remove the # without unshare, we use the system's rm to recursively remove the
# temporary directory just to make sure that we do not accidentally # temporary directory just to make sure that we do not accidentally
# remove more than we should by using --one-file-system. # 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 { } else {
die "unknown mode: $options->{mode}"; die "unknown mode: $options->{mode}";
} }