summaryrefslogtreecommitdiffstats
path: root/commands/find-dups
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-09 09:43:48 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-09 09:43:48 +0000
commit45883c31c7274fc67bedc4a590d8f2987a792a6a (patch)
tree6c728e20b450e1c47747ae54cea148b81f720297 /commands/find-dups
parentInitial commit. (diff)
downloadkernel-wedge-45883c31c7274fc67bedc4a590d8f2987a792a6a.tar.xz
kernel-wedge-45883c31c7274fc67bedc4a590d8f2987a792a6a.zip
Adding upstream version 2.105.upstream/2.105upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'commands/find-dups')
-rwxr-xr-xcommands/find-dups24
1 files changed, 24 insertions, 0 deletions
diff --git a/commands/find-dups b/commands/find-dups
new file mode 100755
index 0000000..7c4d45a
--- /dev/null
+++ b/commands/find-dups
@@ -0,0 +1,24 @@
+#!/bin/bash -e
+# Find duplicate modules. Pass the kernel name.
+kernel=$1
+(
+ shopt -s nullglob
+ for dir in debian/*-modules-$kernel-di; do
+ cd $dir
+ find lib -type f -printf "$dir %p\n"
+ cd ../..
+ done
+) | sort -k2 | perl -ne '
+ my $configdir = ($ENV{KW_CONFIG_DIR} || ".");
+ while (<>) {
+ ($d, $f)=split;
+ if ($f eq $lf) { print "$d $f\n$ld $lf\n"; $dups++ }
+ $lf=$f;
+ $ld=$d
+ }
+ if ($dups) {
+ print STDERR "some modules are in more than one package\n";
+ exit 1 unless (-e "$configdir/ignore-dups" ||
+ length($ENV{KW_CHECK_NONFATAL}));
+ }
+'