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

Modified Files:
        ChangeLog Engine.pm 
Log Message:
Remember to validate dependency .info in -m mode


Index: Engine.pm
===================================================================
RCS file: /cvsroot/fink/fink/perlmod/Fink/Engine.pm,v
retrieving revision 1.363
retrieving revision 1.364
diff -u -d -r1.363 -r1.364
--- Engine.pm   22 Mar 2006 08:54:05 -0000      1.363
+++ Engine.pm   22 Mar 2006 17:05:54 -0000      1.364
@@ -1506,17 +1506,6 @@
                        die "no package found for specification '$pkgspec'!\n";
                }
 
-               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);
-               }
-
                # no duplicates here
                #        (dependencies is different, but those are checked 
later)
                $pkgname = $package->get_name();
@@ -1637,7 +1626,16 @@
        # generate summary
        @requested = ();
        @additionals = ();
-       my $willbuild = 0;
+
+       my $willbuild = 0;  # at least one new package will be compiled probably
+       my $bad_infos = 0;  # at least one .info failed validation
+       my %saved_options = map { $_ => Fink::Config::get_option($_) } qw/ 
verbosity Pedantic /;
+       if (Fink::Config::get_option("maintainermode")) {
+               Fink::Config::set_options( {
+                       'verbosity' => 3,
+                       'Pedantic'  => 1
+                       } );
+       }
        foreach $pkgname (sort keys %deps) {
                $item = $deps{$pkgname};
                if ($item->[FLAG] == 0) {
@@ -1646,9 +1644,18 @@
                        push @requested, $pkgname;
                }
                if ($item->[OP] == $OP_REBUILD || $item->[OP] == $OP_BUILD || 
not $item->[PKGVER]->is_present()) {
-                       $willbuild = 1 unless ($item->[OP] == $OP_INSTALL and 
$item->[PKGVER]->is_installed());
+                       unless ($item->[OP] == $OP_INSTALL and 
$item->[PKGVER]->is_installed()) {
+                               $willbuild = 1;
+
+                               # validate the .info if desired
+                               if (Fink::Config::get_option("maintainermode")) 
{
+                                       $bad_infos = 1 unless 
Fink::Validation::validate_info_file($item->[PKGVER]->get_info_filename());
+                               }
+                       }
                }
        }
+       Fink::Config::set_options(\%saved_options);
+       $bad_infos && die "Please correct the above problems and try again!\n";
 
        if ($willbuild) {
                if 
(Fink::PkgVersion->match_package("broken-gcc")->is_installed()) { 

Index: ChangeLog
===================================================================
RCS file: /cvsroot/fink/fink/perlmod/Fink/ChangeLog,v
retrieving revision 1.1290
retrieving revision 1.1291
diff -u -d -r1.1290 -r1.1291
--- ChangeLog   22 Mar 2006 08:54:05 -0000      1.1290
+++ ChangeLog   22 Mar 2006 17:05:54 -0000      1.1291
@@ -1,3 +1,8 @@
+2006-03-21  Daniel Macks  <[EMAIL PROTECTED]>
+
+       * Engine.pm: In -m mode, validate .info of deps also, not just
+       explicitly requested pkgs.
+
 2006-03-21  Dave Vasilevsky  <[EMAIL PROTECTED]>
 
        * Engine.pm: New BuildConflicts routine that should work.



-------------------------------------------------------
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