1
0
Fork 1
mirror of https://gitlab.postmarketos.org/postmarketOS/pmbootstrap.git synced 2025-07-13 03:19:47 +03:00

Use pmbootstrap_v3.cfg as config file (MR 2350)

Using pmbootstrap v3 with the old config can cause problems, for example
when having $WORK in the pmaports dir instead of the actual work path.
This is not supported anymore by v3 to reduce complexity. The format of
how mirrors are stored in the config also has changed.

Use a separate config file, so users can go back from v3 to 2.3.x if
they need to (for figuring out a regression) and so users won't run into
bugs when moving from 2.3.x to v3.
This commit is contained in:
Oliver Smith 2024-07-07 20:48:57 +02:00 committed by Caleb Connolly
parent 3d9607aa99
commit 9dfa89c58c
No known key found for this signature in database
GPG key ID: 0583312B195F64B6
11 changed files with 15 additions and 14 deletions

View file

@ -13,20 +13,20 @@ _testdir = Path(__file__).parent / "data/tests"
@pytest.fixture
def config_file(tmp_path_factory, request):
"""Fixture to create a temporary pmbootstrap.cfg file."""
"""Fixture to create a temporary pmbootstrap_v3.cfg file."""
tmp_path = tmp_path_factory.mktemp("pmbootstrap")
flavour = "default"
if hasattr(request, "param") and request.param:
flavour = request.param
out_file = tmp_path / "pmbootstrap.cfg"
out_file = tmp_path / "pmbootstrap_v3.cfg"
workdir = tmp_path / "work"
workdir.mkdir()
configs = {"default": f"aports = {workdir / 'cache_git' / 'pmaports'}", "no-repos": "aports = "}
file = _testdir / "pmbootstrap.cfg"
file = _testdir / "pmbootstrap_v3.cfg"
print(f"CONFIG: {out_file}")
cfg = configs[flavour]
contents = open(file).read().format(workdir, cfg)