public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
From: Zhihang Wei <wzh@ilbers.de>
To: alexander.heinisch@siemens.com, isar-users@googlegroups.com
Cc: kasturi.shekar@siemens.com
Subject: Re: [PATCH] isar-installer: Generate textual output only in unattended mode.
Date: Tue, 14 Oct 2025 16:59:38 +0200	[thread overview]
Message-ID: <cf7ecf1a-98e7-4df6-a8ac-6bd2ce543573@ilbers.de> (raw)
In-Reply-To: <20250922164359.1322947-1-alexander.heinisch@siemens.com>

Applied to next, thanks.

On 9/22/25 18:43, alexander.heinisch via isar-users wrote:
> From: Alexander Heinisch<alexander.heinisch@siemens.com>
>
> Dialog renders textual output unreadable, thus, useless.
> Thus, logs output via a serial, or piped to a file are useless when combined with dialog.
>
> Signed-off-by: Alexander Heinisch<alexander.heinisch@siemens.com>
> ---
>   .../files/usr/bin/deploy-image-wic.sh         | 52 ++++++++++---------
>   1 file changed, 27 insertions(+), 25 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 333762f1..779ed34a 100755
> --- 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
> @@ -157,32 +157,34 @@ version_ge() {
>       fi
>   }
>   
> -# Get bmap-tools version
> -bmap_version=$(bmaptool --version | awk '{ print $NF }')
> -
> -if version_ge "$bmap_version" "3.6"; then
> -    # Create a named pipe for progress communication
> -    progress_pipe="/tmp/progress"
> -    if ! mkfifo "$progress_pipe"; then
> -        echo "Error: Failed to create named pipe $progress_pipe"
> -        exit 1
> -    fi
> -
> -    # Add psplash pipe to bmap_options
> -    bmap_options="$bmap_options --psplash-pipe=$progress_pipe"
> -    quiet_flag="-q"
> -
> -    # Initialize the dialog gauge and update it dynamically
> -    (
> -        while true; do
> -            if read -r line < "$progress_pipe"; then
> -                percentage=$(echo "$line" | awk '{ print $2 }')
> -                echo "$percentage"
> -            fi
> -        done
> -    ) | dialog --gauge "Flashing image, please wait..." 10 70 0 &
> +if ! $installer_unattended; then
> +    # Get bmap-tools version
> +    bmap_version=$(bmaptool --version | awk '{ print $NF }')
> +
> +    if version_ge "$bmap_version" "3.6"; then
> +        # Create a named pipe for progress communication
> +        progress_pipe="/tmp/progress"
> +        if ! mkfifo "$progress_pipe"; then
> +            echo "Error: Failed to create named pipe $progress_pipe"
> +            exit 1
> +        fi
>   
> -    gauge_pid=$!
> +        # Add psplash pipe to bmap_options
> +        bmap_options="$bmap_options --psplash-pipe=$progress_pipe"
> +        quiet_flag="-q"
> +
> +        # Initialize the dialog gauge and update it dynamically
> +        (
> +            while true; do
> +                if read -r line < "$progress_pipe"; then
> +                    percentage=$(echo "$line" | awk '{ print $2 }')
> +                    echo "$percentage"
> +                fi
> +            done
> +        ) | dialog --gauge "Flashing image, please wait..." 10 70 0 &
> +
> +        gauge_pid=$!
> +    fi
>   fi
>   
>   if ! bmaptool $quiet_flag copy $bmap_options "$installer_image_uri" "$installer_target_dev"; then

-- 
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/cf7ecf1a-98e7-4df6-a8ac-6bd2ce543573%40ilbers.de.

      reply	other threads:[~2025-10-14 14:59 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-09-22 16:43 alexander.heinisch via isar-users
2025-10-14 14:59 ` 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=cf7ecf1a-98e7-4df6-a8ac-6bd2ce543573@ilbers.de \
    --to=wzh@ilbers.de \
    --cc=alexander.heinisch@siemens.com \
    --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