From a1575b0c8398f3ebb70b2364b986964fb354e09a Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sat, 24 Apr 2010 20:41:35 -0400 Subject: [PATCH] bugfixes --- IkiWiki/Plugin/google.pm | 2 +- IkiWiki/Plugin/search.pm | 2 +- IkiWiki/Render.pm | 13 +++++++++---- 3 files changed, 11 insertions(+), 6 deletions(-) diff --git a/IkiWiki/Plugin/google.pm b/IkiWiki/Plugin/google.pm index 529a2c801..85467fa0b 100644 --- a/IkiWiki/Plugin/google.pm +++ b/IkiWiki/Plugin/google.pm @@ -28,7 +28,7 @@ sub checkconfig () { # This is a mass dependency, so if the search form template # changes, every page is rebuilt. - add_depends("", "googleform.tmpl"); + add_depends("", "templates/googleform.tmpl"); } my $form; diff --git a/IkiWiki/Plugin/search.pm b/IkiWiki/Plugin/search.pm index c9a69f443..be39fdf1e 100644 --- a/IkiWiki/Plugin/search.pm +++ b/IkiWiki/Plugin/search.pm @@ -44,7 +44,7 @@ sub checkconfig () { # This is a mass dependency, so if the search form template # changes, every page is rebuilt. - add_depends("", "searchform.tmpl"); + add_depends("", "templates/searchform.tmpl"); } my $form; diff --git a/IkiWiki/Render.pm b/IkiWiki/Render.pm index 50af2bdec..d0c7e58a3 100644 --- a/IkiWiki/Render.pm +++ b/IkiWiki/Render.pm @@ -592,15 +592,20 @@ sub render_dependent ($$$$$$$) { my %lc_changed = map { lc(pagename($_)) => 1 } @changed; my %lc_exists_changed = map { lc(pagename($_)) => 1 } @exists_changed; - my $mass_reason; - foreach my $p ("page.tmpl", keys %{$depends_simple{""}}) { - $mass_reason=$p if $rendered{$p}; + foreach my $p ("templates/page.tmpl", keys %{$depends_simple{""}}) { + if ($rendered{$p}) { + foreach my $f (@$files) { + next if $rendered{$f}; + render($f, sprintf(gettext("building %s, which depends on %s"), $f, $p)); + } + return 0; + } } foreach my $f (@$files) { next if $rendered{$f}; my $p=pagename($f); - my $reason = $mass_reason; + my $reason = undef; if (exists $depends_simple{$p} && ! defined $reason) { foreach my $d (keys %{$depends_simple{$p}}) { -- 2.26.2