X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/39d4bfde6b9c49f0a8b13699be701bda11eb851a..9daf3db277c31d3ce434253af2dfb7e0e436b5f9:/IkiWiki/Render.pm?ds=inline diff --git a/IkiWiki/Render.pm b/IkiWiki/Render.pm index 8ae0cbd4f..7e3d78861 100644 --- a/IkiWiki/Render.pm +++ b/IkiWiki/Render.pm @@ -409,7 +409,7 @@ sub find_del_files ($) { my @del; my @internal_del; - foreach my $page (keys %pagemtime) { + foreach my $page (keys %pagesources) { if (! $pages->{$page}) { if (isinternal($page)) { push @internal_del, $pagesources{$page}; @@ -591,13 +591,23 @@ sub render_dependent ($$$$$$$) { my %lc_changed = map { lc(pagename($_)) => 1 } @changed; my %lc_exists_changed = map { lc(pagename($_)) => 1 } @exists_changed; + + foreach my $p ("templates/page.tmpl", keys %{$depends_simple{""}}) { + if ($rendered{$p} || grep { $_ eq $p } @$del) { + 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 = undef; - - if (exists $depends_simple{$p}) { + + if (exists $depends_simple{$p} && ! defined $reason) { foreach my $d (keys %{$depends_simple{$p}}) { if (($depends_simple{$p}{$d} & $IkiWiki::DEPEND_CONTENT && $lc_changed{$d}) @@ -771,13 +781,7 @@ sub refresh () { render_linkers($file); } - if ($rendered{"templates/page.tmpl"}) { - foreach my $f (@$files) { - next if $f eq "templates/page.tmpl"; - render($f, sprintf(gettext("building %s, which depends on %s"), $f, "templates/page.tmpl")); - } - } - elsif (@$changed || @$internal_changed || + if (@$changed || @$internal_changed || @$del || @$internal_del || @$internal_new) { 1 while render_dependent($files, $new, $internal_new, $del, $internal_del, $internal_changed,