Update of /cvsroot/fink/fink/perlmod/Fink In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25127
Modified Files: ChangeLog PkgVersion.pm Log Message: Stop duplicate BDO warnings Index: PkgVersion.pm =================================================================== RCS file: /cvsroot/fink/fink/perlmod/Fink/PkgVersion.pm,v retrieving revision 1.529 retrieving revision 1.530 diff -u -d -r1.529 -r1.530 --- PkgVersion.pm 1 Mar 2006 06:15:27 -0000 1.529 +++ PkgVersion.pm 15 Mar 2006 02:26:48 -0000 1.530 @@ -2179,6 +2179,10 @@ # In "conflicts" mode, must have none of any sublist installed # (but makes no sense to have logical OR in a *Conflicts field) +{ + # track which BuildDependsOnly violation warnings we've issued + my $bdo_warning_cache = {}; # hash of "$pkg\0$dependency"=>1 + sub resolve_depends { my $self = shift; my $include_build = shift || 0; @@ -2275,13 +2279,21 @@ # loop through all PkgVersion that supply $pkg if ($dependent->param_boolean("BuildDependsOnly")) { - # whine if BDO violation - my $dep_providername = $dependent->get_name(); - print "\nWARNING: The package " . $self->get_name() . " Depends on $depname"; - if ($dep_providername ne $depname) { # virtual pkg - print "\n\t (which is provided by $dep_providername)"; + my $cache_key = $self->get_name() . "\0" . $depname; + if (!exists $bdo_warning_cache->{$cache_key}) { + $bdo_warning_cache->{$cache_key} = 1; + + # whine if this BDO violation hasn't + # been whined-about before + my $dep_providername = $dependent->get_name(); + print "\nWARNING: The package " . $self->get_name() . " Depends on $depname"; + if ($dep_providername ne $depname) { + # virtual pkg + print "\n\t (which is provided by $dep_providername)"; + } + print ",\n\t but $depname only allows things to BuildDepend on it.\n\n"; } - print ",\n\t but $depname only allows things to BuildDepend on it.\n\n"; + if (Fink::Config::get_option("maintainermode")) { die "Please correct the above problems and try again!\n"; } @@ -2371,6 +2383,9 @@ return @deplist; } +# resolve_depends has lexical private variables +} + sub get_altspec { my $self = shift; my $altspecs = shift; Index: ChangeLog =================================================================== RCS file: /cvsroot/fink/fink/perlmod/Fink/ChangeLog,v retrieving revision 1.1258 retrieving revision 1.1259 diff -u -d -r1.1258 -r1.1259 --- ChangeLog 6 Mar 2006 23:20:43 -0000 1.1258 +++ ChangeLog 15 Mar 2006 02:26:46 -0000 1.1259 @@ -1,3 +1,8 @@ +2006-03-14 Daniel Macks <[EMAIL PROTECTED]> + + * PkgVersion.pm: Do not issue repeated warnings about the same + BuildDependsOnly violation + 2006-03-06 Daniel Macks <[EMAIL PROTECTED]> * Validation.pm: Fix *SetPATH handler ------------------------------------------------------- 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 Fink-commits@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/fink-commits