Add option to specify extra free space in pmbootstrap init (MR 1989)

This adds a new commandline flag -E / --extra-space for
specifying the amount of additional space to be added to
the image size to work around cases where the automatically
determined size turns out to not actually be enough.

The value is also asked for in the "Additional options"
section of the interactive mode.

Fixes: #1904
This commit is contained in:
Johannes Marbach 2020-11-15 17:19:25 +01:00
parent e6543332de
commit 5dea31058d
No known key found for this signature in database
GPG key ID: 5AE7F5513E0885CB
5 changed files with 24 additions and 4 deletions

View file

@ -261,9 +261,10 @@ def test_questions_additional_options(args, monkeypatch):
assert cfg == {"pmbootstrap": {}}
# Answer everything
fake_answers(monkeypatch, ["y", "64", "5", "2G", "n"])
fake_answers(monkeypatch, ["y", "128", "64", "5", "2G", "n"])
func(args, cfg)
assert cfg == {"pmbootstrap": {"boot_size": "64",
assert cfg == {"pmbootstrap": {"extra_space": "128",
"boot_size": "64",
"jobs": "5",
"ccache_size": "2G"}}