Changeset 3388 in MondoRescue


Ignore:
Timestamp:
Jun 3, 2015, 11:56:04 PM (10 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
Location:
branches/3.2/mindi
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/3.2/mindi/mindi

    r3386 r3388  
    28192819mkdir -p $MINDI_TMP
    28202820
    2821 # Purge from potential old run
    2822 if [ _"$MINDI_CACHE" = _"" ]; then
    2823     Die "MINDI_CACHE undefined"
    2824 fi
    2825 
    28262821# --nolog needs to be first, and is used in analyze-my-lvm
    28272822if [ "$1" = "--nolog" ] ; then
     
    28552850LogFile "MINDI_SBIN = $MINDI_SBIN"
    28562851LogFile "MINDI_CONF = $MINDI_CONF"
     2852# Purge from potential old run
     2853if [ _"$MINDI_CACHE" = _"" ]; then
     2854    Die "MINDI_CACHE undefined"
     2855else
     2856    LogFile "MINDI_CACHE = $MINDI_CACHE"
     2857fi
     2858
    28572859if [ -f $MINDI_CONFIG ]; then
    28582860    LogFile "-----------------------------"
     
    31743176        # This is the scratch dir in mondo - subdir images
    31753177        MINDI_CACHE=$3
     3178        LogFile "MINDI_CACHE = $MINDI_CACHE"
    31763179
    31773180        kernelpath=$4; [ "$kernelpath" = "(null)" ] && kernelpath=""
  • 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.