summaryrefslogtreecommitdiffstats
path: root/rpm-find-leaves
diff options
context:
space:
mode:
Diffstat (limited to 'rpm-find-leaves')
-rw-r--r--rpm-find-leaves7
1 files changed, 7 insertions, 0 deletions
diff --git a/rpm-find-leaves b/rpm-find-leaves
new file mode 100644
index 00000000..30f3f2f1
--- /dev/null
+++ b/rpm-find-leaves
@@ -0,0 +1,7 @@
+#!/usr/bin/perl
+
+$r = join '|', map { chop; $l{$_} = 1; quotemeta } `rpm -qa --queryformat "%{NAME}\n"`;
+$R = qr/ $r/;
+open F, "/etc/urpmi/depslist" or die "can't find depslist\n";
+$R && /(\S+)-[^-]+-[^-]+ / && delete $l{$1} foreach <F>;
+print "$_\n" foreach keys %l;