public inbox for cip-dev@lists.cip-project.org
 help / color / mirror / Atom feed
* [PATCH] swupdate.bbclass: make swu_files entries unique
@ 2024-07-03 11:42 Claudius Heine
  2024-07-04 12:15 ` MOESSBAUER, Felix
  2024-07-12  7:17 ` Jan Kiszka
  0 siblings, 2 replies; 10+ messages in thread
From: Claudius Heine @ 2024-07-03 11:42 UTC (permalink / raw)
  To: cip-dev; +Cc: Claudius Heine

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



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

end of thread, other threads:[~2024-07-12  7:17 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-07-03 11:42 [PATCH] swupdate.bbclass: make swu_files entries unique Claudius Heine
2024-07-04 12:15 ` 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

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