From f9f5640d82806ca485d3f1445d4d4d94064e0466 Mon Sep 17 00:00:00 2001 From: Oliver Smith Date: Mon, 29 Jun 2020 20:13:01 +0200 Subject: [PATCH] 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. --- pmb/install/_install.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/pmb/install/_install.py b/pmb/install/_install.py index 697c355d..cb9ebf62 100644 --- a/pmb/install/_install.py +++ b/pmb/install/_install.py @@ -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)