install --ondev: ondev-prepare: use env vars

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
parent 7da4903223
commit a7dbdf58bc
No known key found for this signature in database
GPG Key ID: 5AE7F5513E0885CB
1 changed files with 6 additions and 5 deletions

View File

@ -541,11 +541,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)