From: Uladzimir Bely <ubely@ilbers.de>
To: isar-users@googlegroups.com, Jan Kiszka <jan.kiszka@siemens.com>
Subject: Re: [PATCH] Avoid line duplicates when appended from the recipes
Date: Wed, 23 Feb 2022 09:13:15 +0300 [thread overview]
Message-ID: <2534840.fDdHjke4Dd@home> (raw)
In-Reply-To: <3357a943-ca48-d494-0c19-1ec1025927e4@siemens.com>
In the email from Tuesday, 22 February 2022 19:05:18 +03 user Jan Kiszka
wrote:
> 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
>
Thanks. Fixed in new version.
I prepared a patch on a different PC with different global .gitconfig options
and missed this moment. I googled a bit for ways to prevent such things in the
future, and it might be interesting for someone else.
The idea is to place to the end of `~.gitconfig` something like:
``
[includeIf "gitdir:/home/Work/"]
path = /home/Work/.gitconfig
```
In this case all git repos in `/home/Work` and subdirectories will use
settings from local `.gitconfig` that will override global settings.
> > ---
> >
> > 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 || \\
--
Uladzimir Bely
prev parent reply other threads:[~2022-02-23 6:13 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
2022-02-23 6:13 ` Uladzimir Bely [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=2534840.fDdHjke4Dd@home \
--to=ubely@ilbers.de \
--cc=isar-users@googlegroups.com \
--cc=jan.kiszka@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