public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
From: Henning Schild <henning.schild@siemens.com>
To: Anton Mikanovich <amikan@ilbers.de>
Cc: isar-users@googlegroups.com
Subject: Re: [PATCH] buildchroot: Remove bashism when reading file content
Date: Thu, 10 Jun 2021 17:05:50 +0200	[thread overview]
Message-ID: <20210610170550.4accedf0@md1za8fc.ad001.siemens.net> (raw)
In-Reply-To: <20210610070222.5965-1-amikan@ilbers.de>

That does fix the build issues in docker/CI. So i think it should be
merged because without it people using a container workflow wont be
able to use next.

regards,
Henning

Am Thu, 10 Jun 2021 10:02:22 +0300
schrieb Anton Mikanovich <amikan@ilbers.de>:

> Reading mount counter with $(<file) was not working correctly in all
> the environments, so replace it with more generic POSIX way:
> $(cat file)
> 
> Signed-off-by: Anton Mikanovich <amikan@ilbers.de>
> ---
>  meta/classes/buildchroot.bbclass | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/meta/classes/buildchroot.bbclass
> b/meta/classes/buildchroot.bbclass index 97d5301..806a29f 100644
> --- a/meta/classes/buildchroot.bbclass
> +++ b/meta/classes/buildchroot.bbclass
> @@ -30,7 +30,7 @@ buildchroot_do_mounts() {
>  
>          count="1"
>          if [ -f '${BUILDCHROOT_DIR}.mount' ]; then
> -            count=$(($(< '${BUILDCHROOT_DIR}.mount') + 1))
> +            count=$(($(cat '${BUILDCHROOT_DIR}.mount') + 1))
>          fi
>          echo $count > '${BUILDCHROOT_DIR}.mount'
>          if [ $count -gt 1 ]; then
> @@ -78,9 +78,10 @@ buildchroot_undo_mounts() {
>          set -e
>  
>          if [ -f '${BUILDCHROOT_DIR}.mount' ]; then
> -            count=$(($(< '${BUILDCHROOT_DIR}.mount') - 1))
> +            count=$(($(cat '${BUILDCHROOT_DIR}.mount') - 1))
>              echo $count > '${BUILDCHROOT_DIR}.mount'
>          else
> +            echo "Could not find mount counter"
>              exit 1
>          fi
>          if [ $count -gt 0 ]; then


      reply	other threads:[~2021-06-10 15:05 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-10  7:02 Anton Mikanovich
2021-06-10 15:05 ` Henning Schild [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=20210610170550.4accedf0@md1za8fc.ad001.siemens.net \
    --to=henning.schild@siemens.com \
    --cc=amikan@ilbers.de \
    --cc=isar-users@googlegroups.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