#!/usr/bin/perl -w # # $Id$ # Copyright B. Cornec 2005-2014 # Provided under the GPL v2 # # Get all depedencies from a binary (dynamic libraires reported by ldd and all their links) # use strict; use MondoRescue::File; =pod =head1 NAME mindi-process-ldd keeps track of the dependencies of a binary with its dynamic libraries =head1 DESCRIPTION mindi-process-ldd keeps track of the dependencies of a binary with its dynamic libraries by alalyzing the return of ldd on that binary and recursing on all the dependencies to provide the complete list of files needed to have this binary run in a mindi context =head1 SYNOPSIS mindi-process-ldd /path/to/binary ... =head1 ARGUMENTS =over 4 =item B This is the path of the binary to analyze and for which we want its perl dependencies to be included =back =head1 WEB SITES The main Web site of the project is available at L. Bug reports should be filled using the trac instance of the project at L. =head1 USER MAILING LIST For community exchanges around MondoRescue please use the list L =head1 AUTHORS The MondoRescue team lead by Bruno Cornec L. =head1 COPYRIGHT MondoRescue is distributed under the GPL v2.0 license or later, described in the file C included with the distribution. =cut my $file = mr_file_process_ldd(@ARGV) if (defined $ARGV[0]); my $verbose = undef; $verbose = 1 if ($ARGV[0] eq "-v"); foreach my $f (sort keys %$file) { print "$f\n" if (defined $verbose); print "--\n" if (defined $verbose); foreach my $l (@{$file->{$f}}) { print "$l\n"; } print "--\n" if (defined $verbose); }