Update of /cvsroot/fink/fink/perlmod/Fink
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8163

Modified Files:
        ChangeLog Engine.pm 
Log Message:
In -m mode, weaken .info validation for dependencies and only check each .info 
once


Index: Engine.pm
===================================================================
RCS file: /cvsroot/fink/fink/perlmod/Fink/Engine.pm,v
retrieving revision 1.371
retrieving revision 1.372
diff -u -d -r1.371 -r1.372
--- Engine.pm   29 Mar 2006 23:00:44 -0000      1.371
+++ Engine.pm   30 Mar 2006 08:04:05 -0000      1.372
@@ -1444,6 +1444,7 @@
 use constant OP      => 3;
 use constant FLAG    => 4;
 
+our %validated_info_files = ();  # keys are filenames that have been checked
 
 sub real_install {
        my $op = shift;
@@ -1501,14 +1502,17 @@
 
                # pedantically validate .info of explicitly requested packages
                if (Fink::Config::get_option("maintainermode")) {
-                       my %saved_options = map { $_ => 
Fink::Config::get_option($_) } qw/ verbosity Pedantic /;
-                       Fink::Config::set_options( {
-                               'verbosity' => 3,
-                               'Pedantic'  => 1
-                       } );
-                       
Fink::Validation::validate_info_file($package->get_info_filename())
-                               or die "Please correct the above problems and 
try again!\n";
-                       Fink::Config::set_options(\%saved_options);
+                       my $info_filename = $package->get_info_filename();
+                       if (not $validated_info_files{$info_filename}++) {
+                               my %saved_options = map { $_ => 
Fink::Config::get_option($_) } qw/ verbosity Pedantic /;
+                               Fink::Config::set_options( {
+                                       'verbosity' => 3,
+                                       'Pedantic'  => 1
+                                                                               
   } );
+                               
Fink::Validation::validate_info_file($info_filename)
+                                       or die "Please correct the above 
problems and try again!\n";
+                               Fink::Config::set_options(\%saved_options);
+                       }
                }
 
                # no duplicates here
@@ -1638,7 +1642,15 @@
                                # only use default level for dependencies of 
explicit packages
                                # (explicitly requested pkgs were severely 
validated earlier)
                                if (Fink::Config::get_option("maintainermode")) 
{
-                                       $bad_infos = 1 unless 
Fink::Validation::validate_info_file($item->[PKGVER]->get_info_filename());
+                                       my $info_filename = 
$item->[PKGVER]->get_info_filename();
+                                       if (not 
$validated_info_files{$info_filename}++) {
+                                               my %saved_options = map { $_ => 
Fink::Config::get_option($_) } qw/ Pedantic /;
+                                               Fink::Config::set_options( {
+                                                       'Pedantic'  => 0
+                                                                               
                   } );
+                                               $bad_infos = 1 unless 
Fink::Validation::validate_info_file($info_filename);
+                                               
Fink::Config::set_options(\%saved_options);
+                                       }
                                }
                        }
                }

Index: ChangeLog
===================================================================
RCS file: /cvsroot/fink/fink/perlmod/Fink/ChangeLog,v
retrieving revision 1.1314
retrieving revision 1.1315
diff -u -d -r1.1314 -r1.1315
--- ChangeLog   29 Mar 2006 23:00:44 -0000      1.1314
+++ ChangeLog   30 Mar 2006 08:04:05 -0000      1.1315
@@ -1,3 +1,8 @@
+2006-03-28  Daniel Macks  <[EMAIL PROTECTED]>
+
+       * Engine.pm: Weaken .info validator settings for dependencies
+       and only check each .info file once in -m mode.
+
 2006-03-29  Dave Vasilevsky  <[EMAIL PROTECTED]>
 
        * Scanpackages.pm: Provide a way to get the path to the default cache.



-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
Fink-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/fink-commits

Reply via email to