config: add auto_zap_misconfigured_chroots (MR 2252)

This option will make pmbootstrap automatically zap chroots that are
initialized for the wrong channel, making it much faster to switch
between edge and systemd.

Signed-off-by: Caleb Connolly <caleb@postmarketos.org>
This commit is contained in:
Caleb Connolly 2024-06-13 22:48:43 +02:00 committed by Oliver Smith
parent af826c671d
commit c1aa5acdaa
No known key found for this signature in database
GPG key ID: 5AE7F5513E0885CB
4 changed files with 49 additions and 9 deletions

View file

@ -72,11 +72,10 @@ def sudo(cmd: Sequence[PathString]) -> Sequence[PathString]:
return cmd
defaults = {
defaults: Dict[str, PathString] = {
"cipher": "aes-xts-plain64",
"config": Path((os.environ.get('XDG_CONFIG_HOME') or
os.path.expanduser("~/.config")) + "/pmbootstrap.cfg"),
"fork_alpine": False,
# A higher value is typically desired, but this can lead to VERY long open
# times on slower devices due to host systems being MUCH faster than the
# target device (see issue #429).