Skip to content

bug fixes and enhancements #3

Merged
merged 3 commits into from
Jul 4, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
24 changes: 17 additions & 7 deletions ldd_bee/ldd_bee.pl
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,17 @@
use Data::Dumper;$Data::Dumper::Sortkeys=1;

my %ldd;
for (@ARGV) {
@_=`ldd $ARGV[0]`;
chomp @_;
map {/=>\s(\S+)/ && $ldd{$1}++} @_;
my @bins;
for my $bin (@ARGV) {
@_=`ldd $bin 2>&1`;
if ( $? == 0 ) {
chomp @_;
map {/=>\s(\S+)/ && $ldd{$1}++} @_;
push @bins,$bin;
}
else {
die "ldd failed on $bin";
}
}

my @libs = sort keys %ldd;
Expand All @@ -29,7 +36,10 @@
}
}

unshift @libs,@bins;

my %bee;

for my $l (@libs) {
print "# $l\n";
if ( exists( $BEEQUERY{$l}) ) {
Expand All @@ -40,17 +50,17 @@
}
}
my $b = 0;
my $lc = 0;
for my $bee ( sort keys %bee ) {
print "\n";
my ($beefile) = </usr/share/bee/$bee/*.bee>;
my $mt = (stat($beefile))[9];
print "PKGALLPKG[$b]=$bee\n";
print " BEEFILE[$b]=$beefile\n";
printf " BEETIME[$b]=%d # %s (%s)\n",$mt,years(time-$mt,2),scalar(localtime($mt));
my $bc = 0;
for my $lib ( sort keys %{$bee{$bee}} ) {
print " BEELIB[$lc]=$lib\n";
$lc++;
print " BEEF[$b][$bc]=$lib\n";
$bc++;
}
$b++;
}
Expand Down