public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
From: Jan Kiszka <jan.kiszka@siemens.com>
To: Uladzimir Bely <ubely@ilbers.de>, <isar-users@googlegroups.com>
Subject: Re: [PATCH] Avoid line duplicates when appended from the recipes
Date: Tue, 22 Feb 2022 17:05:18 +0100	[thread overview]
Message-ID: <3357a943-ca48-d494-0c19-1ec1025927e4@siemens.com> (raw)
In-Reply-To: <20220222135209.13724-1-ubely@ilbers.de>

On 22.02.22 14:52, Uladzimir Bely wrote:
> From: WiseLord <wiselord1983@gmail.com>
> 
> Potentially, using "cat << EOF >> target_file" can kead to duplicated
> lines in the target files.
> 
> This adds simple checks for skipping lines append if they already exist.
> 
> Signed-off-by: WiseLord <wiselord1983@gmail.com>
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

You likely want to use your real name again ;)

Jan

> ---
>  meta-isar/recipes-bsp/optee-os/optee-os-stm32mp15x_3.11.0.bb | 3 ++-
>  meta-isar/recipes-kernel/linux/linux-mainline_5.4.70.bb      | 3 ++-
>  2 files changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/meta-isar/recipes-bsp/optee-os/optee-os-stm32mp15x_3.11.0.bb b/meta-isar/recipes-bsp/optee-os/optee-os-stm32mp15x_3.11.0.bb
> index 9c0efaf1..8436dcbd 100644
> --- a/meta-isar/recipes-bsp/optee-os/optee-os-stm32mp15x_3.11.0.bb
> +++ b/meta-isar/recipes-bsp/optee-os/optee-os-stm32mp15x_3.11.0.bb
> @@ -21,7 +21,8 @@ OPTEE_BINARIES = "tee-header_v2.stm32 tee-pageable_v2.stm32 tee-pager_v2.stm32"
>  # Set version manually to PV, the tarball does not contain any hint.
>  # Alternative: pull from git and add git as build dependency.
>  dpkg_runbuild_prepend() {
> -    cat << EOF >> ${S}/debian/rules
> +    grep -q "^export TEE_IMPL_VERSION" ${S}/debian/rules ||
> +        cat << EOF >> ${S}/debian/rules
>  
>  export TEE_IMPL_VERSION=${PV}
>  EOF
> diff --git a/meta-isar/recipes-kernel/linux/linux-mainline_5.4.70.bb b/meta-isar/recipes-kernel/linux/linux-mainline_5.4.70.bb
> index 28e51c0d..644535e8 100644
> --- a/meta-isar/recipes-kernel/linux/linux-mainline_5.4.70.bb
> +++ b/meta-isar/recipes-kernel/linux/linux-mainline_5.4.70.bb
> @@ -25,7 +25,8 @@ LINUX_VERSION_EXTENSION = "-isar"
>  
>  # For testing purposes only
>  dpkg_configure_kernel_append() {
> -cat << EOF | sed -i '/^override_dh_auto_build/ r /dev/stdin' ${S}/debian/rules
> +    grep -q "# CONFIG_MTD is not set" ${S}/debian/rules ||
> +        cat << EOF | sed -i '/^override_dh_auto_build/ r /dev/stdin' ${S}/debian/rules
>  	if ! grep "# CONFIG_MTD is not set" \$(O)/.config && \\
>  	   ! grep "# CONFIG_MTD_UBI is not set" \$(O)/.config; then \\
>  	    grep "# CONFIG_UBIFS_FS is not set" \$(O)/.config || \\

-- 
Siemens AG, Technology
Competence Center Embedded Linux

  parent reply	other threads:[~2022-02-22 16:05 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-22 13:52 Uladzimir Bely
2022-02-22 15:59 ` Henning Schild
2022-02-22 16:05 ` Jan Kiszka [this message]
2022-02-23  6:13   ` Uladzimir Bely

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=3357a943-ca48-d494-0c19-1ec1025927e4@siemens.com \
    --to=jan.kiszka@siemens.com \
    --cc=isar-users@googlegroups.com \
    --cc=ubely@ilbers.de \
    /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