]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
binman: Avoid duplicates in bintool lists
authorStefan Herbrechtsmeier <stefan.herbrechtsmeier@weidmueller.com>
Fri, 19 Aug 2022 14:25:19 +0000 (16:25 +0200)
committerSimon Glass <sjg@chromium.org>
Sun, 21 Aug 2022 00:07:32 +0000 (18:07 -0600)
Avoid duplicate entries in the list of bintools used by the image and
the list of missing bintools.

Signed-off-by: Stefan Herbrechtsmeier <stefan.herbrechtsmeier@weidmueller.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
tools/binman/entry.py

index d413c91f181f133c9c3ab6d24480c88cbdd326aa..1795d5cf300172e0424a0670c74ed2fedc0c5416 100644 (file)
@@ -1081,7 +1081,8 @@ features to produce new behaviours.
         Args:
             bintool (Bintool): Bintool that was missing
         """
-        self.missing_bintools.append(bintool)
+        if bintool not in self.missing_bintools:
+            self.missing_bintools.append(bintool)
 
     def check_missing_bintools(self, missing_list):
         """Check if any entries in this section have missing bintools
@@ -1091,7 +1092,10 @@ features to produce new behaviours.
         Args:
             missing_list: List of Bintool objects to be added to
         """
-        missing_list += self.missing_bintools
+        for bintool in self.missing_bintools:
+            if bintool not in missing_list:
+                missing_list.append(bintool)
+
 
     def GetHelpTags(self):
         """Get the tags use for missing-blob help