find-iso-orphans: initial import
This commit is contained in:
parent
35ded8f2f8
commit
c8842b786d
22
scripts/find-iso-orphans
Executable file
22
scripts/find-iso-orphans
Executable file
@ -0,0 +1,22 @@
|
||||
#!/usr/bin/perl
|
||||
|
||||
use warnings; use strict;
|
||||
|
||||
my $depmap="/mnt/crux/setup.dependencies";
|
||||
my @orphans; my %DEPENDS;
|
||||
|
||||
open (my $dfh, $depmap) or die "Cannot open dependency map $depmap!\n";
|
||||
while (<$dfh>) {
|
||||
$DEPENDS{$1} = $2 if m/(.*): (.*)/;
|
||||
}
|
||||
close ($dfh);
|
||||
|
||||
my $iso_deps="";
|
||||
foreach my $port (keys %DEPENDS) {
|
||||
$DEPENDS{$port} =~ s/ $port / /;
|
||||
$iso_deps .= " $DEPENDS{$port} " if ($DEPENDS{$port} !~ /^\s*$/);
|
||||
}
|
||||
@orphans = grep { $iso_deps !~ / $_/ } keys %DEPENDS;
|
||||
|
||||
print "Orphans found on the iso:\n";
|
||||
foreach (@orphans) { print "$_\n"; }
|
Loading…
Reference in New Issue
Block a user