source: MondoRescue/branches/3.3/MondoRescue/bin/mr-process-ldd@ 3650

Last change on this file since 3650 was 3650, checked in by Bruno Cornec, 7 years ago
  • Fix versions given back for mr-* tools
  • Log pb and mr versions in mindi log
  • mr-getparam now prints a version
  • Property svn:executable set to *
File size: 1.8 KB
Line 
1#!/usr/bin/perl -w
2#
3# $Id$
4# Copyright B. Cornec 2005-2014
5# Provided under the GPL v2
6#
7# Get all depedencies from a binary (dynamic libraires reported by ldd and all their links)
8#
9use strict;
10use MondoRescue::File;
11use MondoRescue::Version;
12
13=pod
14
15=head1 NAME
16
17mindi-process-ldd keeps track of the dependencies of a binary with its dynamic libraries
18
19=head1 DESCRIPTION
20
21mindi-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
22
23=head1 SYNOPSIS
24
25mindi-process-ldd /path/to/binary ...
26
27=head1 ARGUMENTS
28
29=over 4
30
31=item B</path/to/binary>
32
33This is the path of the binary to analyze and for which we want its perl dependencies to be included
34
35=back
36
37=head1 WEB SITES
38
39The main Web site of the project is available at L<http://www.mondorescue.org>. Bug reports should be filled using the trac instance of the project at L<http://trac.mondorescue.org/>.
40
41=head1 USER MAILING LIST
42
43For community exchanges around MondoRescue please use the list L<http://sourceforge.net/mailarchive/forum.php?forum_name=mondo-devel>
44
45=head1 AUTHORS
46
47The MondoRescue team lead by Bruno Cornec L<mailto:bruno@mondorescue.org>.
48
49=head1 COPYRIGHT
50
51MondoRescue is distributed under the GPL v2.0 license or later,
52described in the file C<COPYING> included with the distribution.
53
54=cut
55
56
57my $file = mr_file_process_ldd(@ARGV) if (defined $ARGV[0]);
58
59my $verbose = undef;
60$verbose = 1 if ((defined $ARGV[0]) && ($ARGV[0] eq "-v"));
61
62foreach my $f (sort keys %$file) {
63 print "$f\n" if (defined $verbose);
64 print "--\n" if (defined $verbose);
65 foreach my $l (@{$file->{$f}}) {
66 print "$l\n";
67 }
68 print "--\n" if (defined $verbose);
69}
Note: See TracBrowser for help on using the repository browser.