All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH] support/scripts/check-uniq-files: ignore reinstalled packages
@ 2018-04-26 16:27 John Keeping
  2018-04-26 18:22 ` Henrique Marks
  0 siblings, 1 reply; 6+ messages in thread
From: John Keeping @ 2018-04-26 16:27 UTC (permalink / raw)
  To: buildroot

If a package is rebuilt, then any files it installs will be listed
multiple times in the file list and check-uniq-files will report that
these files are touched by more than one package even though it is the
same package listed multiple times.

Switch to storing the package names in a set so that each package can
only appear once.

Signed-off-by: John Keeping <john@metanate.com>
---
 support/scripts/check-uniq-files | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/support/scripts/check-uniq-files b/support/scripts/check-uniq-files
index fbc6b5d6e7..eb92724e42 100755
--- a/support/scripts/check-uniq-files
+++ b/support/scripts/check-uniq-files
@@ -24,11 +24,11 @@ def main():
         sys.stderr.write('No type was provided\n')
         return False
 
-    file_to_pkg = defaultdict(list)
+    file_to_pkg = defaultdict(set)
     with open(args.packages_file_list[0], 'rb') as pkg_file_list:
         for line in pkg_file_list.readlines():
             pkg, _, file = line.rstrip(b'\n').partition(b',')
-            file_to_pkg[file].append(pkg)
+            file_to_pkg[file].add(pkg)
 
     for file in file_to_pkg:
         if len(file_to_pkg[file]) > 1:
-- 
2.17.0

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

end of thread, other threads:[~2018-05-03 16:36 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-04-26 16:27 [Buildroot] [PATCH] support/scripts/check-uniq-files: ignore reinstalled packages John Keeping
2018-04-26 18:22 ` Henrique Marks
2018-04-27 10:31   ` John Keeping
2018-04-28 21:29     ` Yann E. MORIN
2018-05-03 16:27       ` Angelo Compagnucci
2018-05-03 16:36         ` John Keeping

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.