From: Claudius Heine <ch@denx.de>
To: cip-dev@lists.cip-project.org
Cc: Claudius Heine <ch@denx.de>
Subject: [PATCH] swupdate.bbclass: make swu_files entries unique
Date: Wed, 3 Jul 2024 13:42:42 +0200 [thread overview]
Message-ID: <20240703114242.1896508-1-ch@denx.de> (raw)
In case a sw-description contains multiple entries of the same file,
swu_files will contains multiples of the same file and thus later
operations fail.
This change makes the files in the swu_files variable unique, so they
are only operated on once.
Signed-off-by: Claudius Heine <ch@denx.de>
---
classes/swupdate.bbclass | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/classes/swupdate.bbclass b/classes/swupdate.bbclass
index e91238d..5e54853 100644
--- a/classes/swupdate.bbclass
+++ b/classes/swupdate.bbclass
@@ -205,7 +205,7 @@ IMAGE_CMD:swu() {
swu_file_base=$(basename $swu_file)
# Create symlinks for files used in the update image
swu_files=$(awk '$1=="filename"{gsub(/[",;]/, "", $3); print $3}' \
- "${WORKDIR}/$swu_file_base/${SWU_DESCRIPTION_FILE}")
+ "${WORKDIR}/$swu_file_base/${SWU_DESCRIPTION_FILE}" | sort | uniq)
export swu_files
for file in $swu_files; do
if [ -e "${WORKDIR}/$file" ]; then
--
2.39.2
next reply other threads:[~2024-07-03 11:43 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-03 11:42 Claudius Heine [this message]
2024-07-04 12:15 ` [PATCH] swupdate.bbclass: make swu_files entries unique MOESSBAUER, Felix
2024-07-04 13:29 ` Claudius Heine
2024-07-04 21:45 ` Jan Kiszka
2024-07-05 7:55 ` Claudius Heine
2024-07-05 8:08 ` Jan Kiszka
2024-07-05 8:21 ` Claudius Heine
2024-07-08 6:22 ` Storm, Christian
2024-07-05 8:01 ` Claudius Heine
2024-07-12 7:17 ` Jan Kiszka
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=20240703114242.1896508-1-ch@denx.de \
--to=ch@denx.de \
--cc=cip-dev@lists.cip-project.org \
/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