From 56a58819e725b0e7b3b8421604bff101c5732403 Mon Sep 17 00:00:00 2001 From: "B. Watson" Date: Sat, 19 Sep 2026 19:55:36 -0400 Subject: find_installed_orphans: added. --- find_installed_orphans | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100755 find_installed_orphans diff --git a/find_installed_orphans b/find_installed_orphans new file mode 100755 index 0000000..1b1b1d9 --- /dev/null +++ b/find_installed_orphans @@ -0,0 +1,41 @@ +#!/usr/bin/perl -w + +($SELF = $0) =~ s,.*/,,; +if(@ARGV) { + print <) { + my $r = reverse; + my @a = split /-/, $r, 4; + my $pkg = reverse $a[3]; + $installed{$pkg}++; +} + +open my $pipe, "-|", "wget", "-qO-", "$URL" or die $!; +while(<$pipe>) { + next unless m{a href="/repository/[\d.]+/\w+/(\S+)/">}; + $count++; + print "$1\n" if $installed{$1}; +} + +exit ($count != 0); -- cgit v1.2.3