public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
From: Zhihang Wei <wzh@ilbers.de>
To: Kasturi shekar <kasturi.shekar@siemens.com>, isar-users@googlegroups.com
Subject: Re: [PATCH] installer: skip image selection when only one image is available
Date: Wed, 29 Jul 2026 09:07:10 +0200	[thread overview]
Message-ID: <6cff2680-49b2-4406-96ea-76b0c731b00a@ilbers.de> (raw)
In-Reply-To: <20260715101441.648588-1-kasturi.shekar@siemens.com>

Applied to next, thanks.

Zhihang

On 7/15/26 12:14, 'Kasturi shekar' via isar-users wrote:
> From: Kasturi Shekar <kasturi.shekar@siemens.com>
>
> In attended mode, auto-select the installable image when exactly one
> image is found on the installation media. keep the image selection
> dialog only for cases where multiple installable images are available.
>
> Signed-off-by: Kasturi Shekar <kasturi.shekar@siemens.com>
> ---
>   .../files/usr/bin/deploy-image-wic.sh         | 34 ++++++++++++++-----
>   1 file changed, 26 insertions(+), 8 deletions(-)
>
> diff --git a/meta-isar/recipes-installer/deploy-image/files/usr/bin/deploy-image-wic.sh b/meta-isar/recipes-installer/deploy-image/files/usr/bin/deploy-image-wic.sh
> index 42107d16..475b1814 100644
> --- a/meta-isar/recipes-installer/deploy-image/files/usr/bin/deploy-image-wic.sh
> +++ b/meta-isar/recipes-installer/deploy-image/files/usr/bin/deploy-image-wic.sh
> @@ -34,25 +34,43 @@ flow_run_attended() {
>   	local selected_image
>   	local selected_target
>   	local target_device_size
> +	local installable_images=()
> +	local installable_image
>   
>   	# In attended mode, prefer to ask the user for the image selection.
>   	# Only use installer_image_uri when it was explicitly configured.
>   
>   	if [ -z "$installer_image_uri" ] || [ ! -f "$installdata/$installer_image_uri" ]; then
> -		selected_image=$(ui_select_image_menu "$installdata")
> -		case $? in
> +		while IFS= read -r installable_image; do
> +			[ -n "$installable_image" ] || continue
> +			installable_images+=("$installable_image")
> +		done < <(sys_list_installable_entries "$installdata")
> +
> +		case "${#installable_images[@]}" in
>   			0)
> -				installer_image_uri="$selected_image"
> -				;;
> -			1)
>   				ui_show_error "Could not find an image to install. Installation aborted."
>   				return 1
>   				;;
> -			2)
> -				return 2
> +			1)
> +				installer_image_uri="${installable_images[0]}"
>   				;;
>   			*)
> -				return 1
> +				selected_image=$(ui_select_image_menu "$installdata")
> +				case $? in
> +					0)
> +						installer_image_uri="$selected_image"
> +						;;
> +					1)
> +						ui_show_error "Could not find an image to install. Installation aborted."
> +						return 1
> +						;;
> +					2)
> +						return 2
> +						;;
> +					*)
> +						return 1
> +						;;
> +				esac
>   				;;
>   		esac
>   	fi

-- 
You received this message because you are subscribed to the Google Groups "isar-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to isar-users+unsubscribe@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/isar-users/6cff2680-49b2-4406-96ea-76b0c731b00a%40ilbers.de.

      reply	other threads:[~2026-07-29  7:07 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-15 10:14 'Kasturi shekar' via isar-users
2026-07-29  7:07 ` Zhihang Wei [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=6cff2680-49b2-4406-96ea-76b0c731b00a@ilbers.de \
    --to=wzh@ilbers.de \
    --cc=isar-users@googlegroups.com \
    --cc=kasturi.shekar@siemens.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox