scripts: gen_config.py: install additional_packages in one go

To avoid quite costly parsing step on each additional package install.

Signed-off-by: Petr Štetiar <ynezz@true.cz>
This commit is contained in:
Petr Štetiar 2023-03-06 19:24:43 +01:00 committed by Petr Štetiar
parent 3e477e899f
commit 773825c18e
No known key found for this signature in database
GPG Key ID: 58EE120F30CC02D3

View File

@ -157,11 +157,11 @@ for p in profile.get("feeds", []):
for ap in profile.get("additional_packages"):
feed = ap["feed"]
for package in ap["packages"]:
if run_cmd(
["./scripts/feeds", "install", "-f", "-p", feed, package]
).returncode:
die(f"Error installing additional package {package} from {feed} feed")
if run_cmd(
["./scripts/feeds", "install", "-f", "-p", feed, *ap["packages"]]
).returncode:
packages_install = " ".join(ap["packages"])
die(f"Error installing additional packages {packages_install} from {feed} feed")
if profile.get("external_target", False):
if run_cmd(["./scripts/feeds", "install", profile["target"]]).returncode: