From 5aaeb356bc8f719156efd588fb0004a0f6250a0e Mon Sep 17 00:00:00 2001 From: Shiloh Fen Date: Mon, 11 Aug 2025 22:31:07 -0500 Subject: [PATCH] envision/upgrade: Install all missing host packages at once --- src/atomic-xr/envision.nu | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/atomic-xr/envision.nu b/src/atomic-xr/envision.nu index b73b152..faf8851 100644 --- a/src/atomic-xr/envision.nu +++ b/src/atomic-xr/envision.nu @@ -22,14 +22,18 @@ export def uninstall [] { def ensure-host-packages [ ...packages: string ] { - $packages + let missing_packages = $packages | each {|package| if (rpm -q $package | complete | get exit_code) != 0 { - rpm-ostree install $package - # TODO: Notification actions - notify-send -u critical $"`($package)` installed" "Please reboot or use `rpm-ostree ex apply-live` before attempting to launch Envision." + $package } } + + if ($missing_packages | is-not-empty) { + rpm-ostree install ...$missing_packages + # TODO: Notification actions + notify-send -u critical "Package(s) installed" "Please reboot or use `rpm-ostree ex apply-live` before attempting to launch Envision." + } } export def upgrade [] { -- 2.51.2