public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
* [PATCH v2 0/1] Avoid line duplicates when appended from the recipes
@ 2022-02-23  6:05 Uladzimir Bely
  2022-02-23  6:05 ` [PATCH v2 1/1] " Uladzimir Bely
  2022-03-03 10:22 ` [PATCH v2 0/1] " Anton Mikanovich
  0 siblings, 2 replies; 3+ messages in thread
From: Uladzimir Bely @ 2022-02-23  6:05 UTC (permalink / raw)
  To: isar-users

Changes since v1:
- Fixed patch author and signed-off-by

Uladzimir Bely (1):
  Avoid line duplicates when appended from the recipes

 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(-)

-- 
2.20.1


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH v2 1/1] Avoid line duplicates when appended from the recipes
  2022-02-23  6:05 [PATCH v2 0/1] Avoid line duplicates when appended from the recipes Uladzimir Bely
@ 2022-02-23  6:05 ` Uladzimir Bely
  2022-03-03 10:22 ` [PATCH v2 0/1] " Anton Mikanovich
  1 sibling, 0 replies; 3+ messages in thread
From: Uladzimir Bely @ 2022-02-23  6:05 UTC (permalink / raw)
  To: isar-users

Potentially, using "cat << EOF >> target_file" can lead to duplicated
lines in the target files.

This adds simple checks for skipping lines append if they already exist.

Signed-off-by: Uladzimir Bely <ubely@ilbers.de>
---
 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 || \\
-- 
2.20.1


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH v2 0/1] Avoid line duplicates when appended from the recipes
  2022-02-23  6:05 [PATCH v2 0/1] Avoid line duplicates when appended from the recipes Uladzimir Bely
  2022-02-23  6:05 ` [PATCH v2 1/1] " Uladzimir Bely
@ 2022-03-03 10:22 ` Anton Mikanovich
  1 sibling, 0 replies; 3+ messages in thread
From: Anton Mikanovich @ 2022-03-03 10:22 UTC (permalink / raw)
  To: Uladzimir Bely, isar-users

23.02.2022 09:05, Uladzimir Bely wrote:
> Changes since v1:
> - Fixed patch author and signed-off-by
>
> Uladzimir Bely (1):
>    Avoid line duplicates when appended from the recipes
>
>   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(-)

Applied to next, thanks.


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-03-03 10:22 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-23  6:05 [PATCH v2 0/1] Avoid line duplicates when appended from the recipes Uladzimir Bely
2022-02-23  6:05 ` [PATCH v2 1/1] " Uladzimir Bely
2022-03-03 10:22 ` [PATCH v2 0/1] " Anton Mikanovich

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox