pmb.helpers.run_core: move flat_cmd here

Move pmb.helpers.run.flat_cmd to run_core, as it will be used by
pmb.helpers.run_core.core in the next patch.

Link: https://lists.sr.ht/~postmarketos/pmbootstrap-devel/%3C20230713182337.6185-2-ollieparanoid@postmarketos.org%3E
This commit is contained in:
Oliver Smith 2023-07-13 20:19:47 +02:00
parent 46789ccee8
commit 20a0ccf36f
No known key found for this signature in database
GPG key ID: 5AE7F5513E0885CB
8 changed files with 54 additions and 48 deletions

View file

@ -9,6 +9,7 @@ import pmb.config
import pmb.helpers.frontend
import pmb.helpers.logging
import pmb.helpers.run
import pmb.helpers.run_core
@pytest.fixture
@ -40,11 +41,11 @@ def test_config_user(args, tmpdir, monkeypatch):
path_config = tmpdir + "/pmbootstrap.cfg"
# Generate default config (only uses tmpdir)
cmd = pmb.helpers.run.flat_cmd(["./pmbootstrap.py",
"-c", path_config,
"-w", path_work,
"--aports", args.aports,
"init"])
cmd = pmb.helpers.run_core.flat_cmd(["./pmbootstrap.py",
"-c", path_config,
"-w", path_work,
"--aports", args.aports,
"init"])
pmb.helpers.run.user(args, ["sh", "-c", "yes '' | " + cmd],
pmb.config.pmb_src)