forked from Mirror/pmbootstrap
config: workdir: handle systemd chroot channel (MR 2252)
Correctly denote whether the chroot is for the systemd channel or not so users are warned when switching from edge to systemd staging without zapping. Signed-off-by: Caleb Connolly <caleb@postmarketos.org>
This commit is contained in:
parent
3f11fa2500
commit
4ed813cf0e
1 changed files with 2 additions and 4 deletions
|
@ -30,7 +30,7 @@ def chroot_save_init(suffix: Chroot):
|
|||
cfg[key] = {}
|
||||
|
||||
# Update sections
|
||||
channel = pmb.config.pmaports.read_config(pkgrepo_default_path())["channel"]
|
||||
channel = pmb.config.pmaports.read_config()["channel"]
|
||||
cfg["chroot-channels"][str(suffix)] = channel
|
||||
cfg["chroot-init-dates"][str(suffix)] = str(int(time.time()))
|
||||
|
||||
|
@ -83,9 +83,7 @@ def chroot_check_channel(chroot: Chroot):
|
|||
if key not in cfg or str(chroot) not in cfg[key]:
|
||||
raise RuntimeError(f"{msg_unknown} {msg_again}")
|
||||
|
||||
# Exclude systemd repo
|
||||
aports = pkgrepo_default_path()
|
||||
channel = pmb.config.pmaports.read_config(aports)["channel"]
|
||||
channel = pmb.config.pmaports.read_config()["channel"]
|
||||
channel_cfg = cfg[key][str(chroot)]
|
||||
if channel != channel_cfg:
|
||||
raise RuntimeError(f"Chroot '{chroot}' was created for the"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue