forked from Mirror/pmbootstrap
Replace pmaports channels stable, stable-next (MR 2032)
Translate the pmaports channels "stable" to "v20.05" and "stable-next" to "v21.03", so these have the same channel name as the pmaports.git branch name. The original plan was to switch the "stable" channel from the "v20.05" branch to the "v21.03" branch when the release is done. However, now that we are close to that, I'm realizing that this would not be useful. It would lead to conflicts in the dir with locally built packages (default: ~/.local/var/pmbootstrap/packages/$CHANNEL). And it would make it awkward to go back to a previous branch (we may name it old-stable for the time being, but what after that, old-old-stable?).
This commit is contained in:
parent
5c1c126647
commit
278dfced61
13 changed files with 90 additions and 25 deletions
|
@ -29,9 +29,9 @@ def test_chroot_save_init(args, tmpdir, monkeypatch):
|
|||
return 1234567890.1234
|
||||
monkeypatch.setattr(time, "time", fake_time)
|
||||
|
||||
# Pretend channel=stable in pmaports.cfg
|
||||
# Pretend channel=v20.05 in pmaports.cfg
|
||||
def read_config(args):
|
||||
return {"channel": "stable"}
|
||||
return {"channel": "v20.05"}
|
||||
monkeypatch.setattr(pmb.config.pmaports, "read_config", read_config)
|
||||
|
||||
args.work = str(tmpdir)
|
||||
|
@ -41,7 +41,7 @@ def test_chroot_save_init(args, tmpdir, monkeypatch):
|
|||
expected = ("[chroot-init-dates]\n"
|
||||
"native = 1234567890\n\n"
|
||||
"[chroot-channels]\n"
|
||||
"native = stable\n\n")
|
||||
"native = v20.05\n\n")
|
||||
with open(args.work + "/workdir.cfg", "r") as handle:
|
||||
assert handle.read() == expected
|
||||
|
||||
|
@ -51,8 +51,8 @@ def test_chroot_save_init(args, tmpdir, monkeypatch):
|
|||
"native = 1234567890\n"
|
||||
"buildroot_armhf = 1234567890\n\n"
|
||||
"[chroot-channels]\n"
|
||||
"native = stable\n"
|
||||
"buildroot_armhf = stable\n\n")
|
||||
"native = v20.05\n"
|
||||
"buildroot_armhf = v20.05\n\n")
|
||||
with open(args.work + "/workdir.cfg", "r") as handle:
|
||||
assert handle.read() == expected
|
||||
|
||||
|
@ -104,7 +104,7 @@ def test_chroot_check_channel(args, tmpdir, monkeypatch):
|
|||
|
||||
# Write workdir.cfg
|
||||
with open(f"{args.work}/workdir.cfg", "w") as handle:
|
||||
handle.write("[chroot-channels]\nnative = stable\n\n")
|
||||
handle.write("[chroot-channels]\nnative = v20.05\n\n")
|
||||
|
||||
# workdir.cfg: no entry for buildroot_armhf chroot
|
||||
with pytest.raises(RuntimeError) as e:
|
||||
|
@ -114,11 +114,11 @@ def test_chroot_check_channel(args, tmpdir, monkeypatch):
|
|||
# Chroot was created for wrong channel
|
||||
with pytest.raises(RuntimeError) as e:
|
||||
func(args, "native")
|
||||
exp = "created for the 'stable' channel, but you are on the 'edge'"
|
||||
exp = "created for the 'v20.05' channel, but you are on the 'edge'"
|
||||
assert exp in str(e.value)
|
||||
|
||||
# Check runs through without raising an exception
|
||||
channel = "stable"
|
||||
channel = "v20.05"
|
||||
func(args, "native")
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue