Diff for /loncom/build/system_dependencies/perltest.pl between versions 1.11 and 1.12

version 1.11, 2003/08/22 19:56:02 version 1.12, 2003/08/22 20:48:38
Line 325  my @dev_missing; Line 325  my @dev_missing;
 my @dev_outdated;  my @dev_outdated;
 my @dev_okay;  my @dev_okay;
 my @dev_veryokay;  my @dev_veryokay;
   my @dev_to_update;
 my @stable_missing;  my @stable_missing;
 my @stable_outdated;  my @stable_outdated;
 my @stable_okay;  my @stable_okay;
 my @stable_veryokay;  my @stable_veryokay;
   my @stable_to_update;
   
 # ===== Loop through all of the needed CPAN distributions and probe the system.  # ===== Loop through all of the needed CPAN distributions and probe the system.
 foreach my $dist (keys %dist_module_hash) {  foreach my $dist (keys %dist_module_hash) {
Line 339  foreach my $dist (keys %dist_module_hash Line 341  foreach my $dist (keys %dist_module_hash
     my ($vok,$vstr);      my ($vok,$vstr);
     foreach my $type ('dev','stable') {      foreach my $type ('dev','stable') {
  my ($vers_mod,$vers_dist);   my ($vers_mod,$vers_dist);
  my ($missing_ref,$outdated_ref,$veryokay_ref,$okay_ref);   my ($missing,$outdated,$veryokay,$okay,$to_update);
  if ($type eq 'dev') {   if ($type eq 'dev') {
     $vers_mod=$module_dev_version_hash{$module};      $vers_mod=$module_dev_version_hash{$module};
     $vers_dist=$dist_dev_version_hash{$dist};      $vers_dist=$dist_dev_version_hash{$dist};
     ($missing_ref,$outdated_ref,$veryokay_ref,$okay_ref)=      ($missing,$outdated,$veryokay,$okay,$to_update)=
  (\@dev_missing,\@dev_outdated,\@dev_veryokay,\@dev_okay);   (\@dev_missing,\@dev_outdated,\@dev_veryokay,\@dev_okay,
    \@dev_to_update);
  } elsif ($type eq 'stable') {   } elsif ($type eq 'stable') {
     $vers_mod=$module_stable_version_hash{$module};      $vers_mod=$module_stable_version_hash{$module};
     $vers_dist=$dist_stable_version_hash{$dist};      $vers_dist=$dist_stable_version_hash{$dist};
     ($missing_ref,$outdated_ref,$veryokay_ref,$okay_ref)=      ($missing,$outdated,$veryokay,$okay,$to_update)=
  (\@stable_missing,\@stable_outdated,\@stable_veryokay,   (\@stable_missing,\@stable_outdated,\@stable_veryokay,
  \@stable_okay);   \@stable_okay,\@stable_to_update);
  }   }
  ($vok,$vstr) = have_vers($module,$vers_mod);   ($vok,$vstr) = have_vers($module,$vers_mod);
  # print "fsflag: $fsflag, vok: $vok, vstr: $vstr, fs: $fs\n";   # print "fsflag: $fsflag, vok: $vok, vstr: $vstr, fs: $fs\n";
  if ($fsflag and !$vok and $vstr=~/not found/) {   if ($fsflag and !$vok and $vstr=~/not found/) {
     push(@$missing_ref,'MISSING  '.$dist.' (want distribution '.      push(@$missing,'MISSING  '.$dist.' (want distribution '.
  $module.' version '. $vers_dist.') ?'."\n");   $module.' version '. $vers_dist.') ?'."\n");
       push(@$to_update,$dist);
     # The question mark indicates there was a pattern match in the      # The question mark indicates there was a pattern match in the
     # big_module_string which would be unexpected.      # big_module_string which would be unexpected.
     # There is no usual reason to tell the normal LON-CAPA user about this      # There is no usual reason to tell the normal LON-CAPA user about this
     # question mark.  This is just source code magic.      # question mark.  This is just source code magic.
  } elsif (!$fsflag and !$vok and $vstr=~/not found/) {   } elsif (!$fsflag and !$vok and $vstr=~/not found/) {
     push(@$missing_ref,'MISSING  '.$dist.' (want distribution '.      push(@$missing,'MISSING  '.$dist.' (want distribution '.
  $module.' version '.$vers_dist.')'."\n");   $module.' version '.$vers_dist.')'."\n");
       push(@$to_update,$dist);
  } elsif ($fsflag and !$vok and $vstr!~/not found/) {   } elsif ($fsflag and !$vok and $vstr!~/not found/) {
     push(@$outdated_ref,'OUTDATED '.$dist.' wanted module: v'.      push(@$outdated,'OUTDATED '.$dist.' wanted module: v'.
  $vers_mod.'; '.$vstr.' (VERSION_FROM is '.   $vers_mod.'; '.$vstr.' (VERSION_FROM is '.
  $fs.') want dist '.$module.' version '.$vers_dist.'.'. "\n");   $fs.') want dist '.$module.' version '.$vers_dist.'.'. "\n");
       push(@$to_update,$dist);
  } elsif ($fsflag) {   } elsif ($fsflag) {
     $vstr=~/found v(.*)/;      $vstr=~/found v(.*)/;
     my $vc=$1;      my $vc=$1;
     if ($vc eq $vers_mod) {      if ($vc eq $vers_mod) {
  push(@$veryokay_ref,'VERYOKAY '.$dist.' wanted: v'.   push(@$veryokay,'VERYOKAY '.$dist.' wanted: v'.
      $vers_mod.'; '.$vstr.' (VERSION_FROM is '.$fs.       $vers_mod.'; '.$vstr.' (VERSION_FROM is '.$fs.
      ') want dist '.$module.' version '.$vers_dist."\n");       ') want dist '.$module.' version '.$vers_dist."\n");
     } else {      } else {
  push(@$okay_ref,'OKAY     '.$dist.' wanted: v'.   push(@$okay,'OKAY     '.$dist.' wanted: v'.
      $vers_mod.'; '.$vstr.' (VERSION_FROM is '.$fs.').'."\n");       $vers_mod.'; '.$vstr.' (VERSION_FROM is '.$fs.').'."\n");
     }      }
  }   }
Line 509  if ($mode eq "html") Line 515  if ($mode eq "html")
 END  END
   }    }
   
   if ($mode =~ /^update(dev|stable)$/) {
       use CPAN;
       my $type=$1;
       print $detailstream 'Attempting to do a '.$type.' update'."\n";
       my $to_update;
       if ($type eq 'dev') {
    $to_update=\@dev_to_update;
       } elsif ($type eq 'stable') {
    $to_update=\@stable_to_update;
       }
       foreach my $dist (@$to_update) {
    my $module=$dist_module_hash{$dist};
    my ($vers_mod,$vers_dist);
    if ($type eq 'dev') {
       $vers_mod=$module_dev_version_hash{$module};
       $vers_dist=$dist_dev_version_hash{$dist};
    } elsif ($type eq 'stable') {
       $vers_mod=$module_stable_version_hash{$module};
       $vers_dist=$dist_stable_version_hash{$dist};
    }
    install($module);
       }
   }
 # ================================================================ Subroutines.  # ================================================================ Subroutines.
 # Note that "vers_cmp" and "have_vers" are adapted from a bugzilla version 2.16  # Note that "vers_cmp" and "have_vers" are adapted from a bugzilla version 2.16
 # "checksetup.pl" script.  # "checksetup.pl" script.

Removed from v.1.11  
changed lines
  Added in v.1.12


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>