Changeset 3388 in MondoRescue for branches/3.2/mindi/mindi-get-perl-modules


Ignore:
Timestamp:
Jun 3, 2015, 11:56:04 PM (9 years ago)
Author:
Bruno Cornec
Message:
  • mindi now logs MINDI_CACHE
  • Fix mindi-get-perl-modules by using scan_deps instead of internal code from Mageia which wasn't fully working. This implies en new dep for mindi on Module::ScanDeps
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/3.2/mindi/mindi-get-perl-modules

    r3386 r3388  
    1414use ProjectBuilder::Base;
    1515use Getopt::Long qw(:config auto_abbrev no_ignore_case);
     16use Module::ScanDeps;
    1617
    1718=pod
     
    6465my @includes;
    6566my $req;
    66 my %args;
    67 
    6867GetOptions(
    6968     "verbose|v+" => \$opts{'v'},
     
    9291
    9392# deduplicate entry list
    94 if (defined $ARGV[0]) {
    95     %args = map { $_, 1 } @ARGV;
    96 } else {
     93if (not defined $ARGV[0]) {
    9794    pb_syntax();
    9895}
     
    109106close(TMPF);
    110107
    111 foreach my $f (keys %args,"$tmpf") {
    112     pb_log(1,"Get perl modules on $f\n");
    113     $req = mr_get_perl_modules($f);
    114     foreach my $k (keys %$req) {
    115         $files{$k} = $req->{$k};
    116     }
    117     pb_log(1,"After mr_get_perl_modules on $f we got:".Dumper(\%files)."\n");
    118 }
     108push @ARGV,$tmpf;
     109
     110my $h =  scan_deps(
     111        files => \@ARGV,
     112        recurse => 1,
     113    );
     114
    119115unlink("$tmpf");
    120116
    121 foreach my $f (sort keys %files) {
    122     print "$f\n";
     117pb_log(1,"Returning:");
     118pb_log(1,Dumper($h));
     119pb_log(1,"-----------------------\n");
     120foreach my $f (sort keys %$h) {
     121        print "$h->{$f}->{'file'}\n";
    123122}
    124123
Note: See TracChangeset for help on using the changeset viewer.