install --ondev: ondev-prepare: use env vars (MR 1953)

Do not pass the arguments to ondev-prepare as command-line arguments in
a specific order, but instead as environment variables. New arguments
will be added in a follow-up patch.
This commit is contained in:
Oliver Smith 2020-06-29 20:13:01 +02:00 committed by Bart Ribbers
parent 8a02187a1a
commit f9f5640d82
No known key found for this signature in database
GPG Key ID: 699D16185DAFAE61
1 changed files with 6 additions and 5 deletions

View File

@ -533,11 +533,12 @@ def install_on_device_installer(args, step, steps):
logging.info(f"({suffix_installer}) ondev-prepare-image")
channel = pmb.config.pmaports.read_config(args)["channel"]
channel_cfg = pmb.config.pmaports.read_config_channel(args)
pmb.chroot.root(args, ["ondev-prepare", channel,
channel_cfg["description"],
channel_cfg["branch_pmaports"],
channel_cfg["branch_aports"],
channel_cfg["mirrordir_alpine"]], suffix_installer)
env = {"ONDEV_CHANNEL": channel,
"ONDEV_CHANNEL_BRANCH_APORTS": channel_cfg["branch_aports"],
"ONDEV_CHANNEL_BRANCH_PMAPORTS": channel_cfg["branch_pmaports"],
"ONDEV_CHANNEL_DESCRIPTION": channel_cfg["description"],
"ONDEV_CHANNEL_MIRRORDIR_ALPINE": channel_cfg["mirrordir_alpine"]}
pmb.chroot.root(args, ["ondev-prepare"], suffix_installer, env=env)
# Remove $DEVICE-boot.img (we will generate a new one if --split was
# specified, otherwise the separate boot image is not needed)