From 1b0bef6d49722d37eca3e871e808e46b2a1461a3 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Fri, 23 Jul 2010 14:14:25 -0400 Subject: template: Fix dependency tracking. Broken in version 3.20100427. template_depends was adding a dependency on the source filename, instead of on the page name when a template is a page. Such a dependency doesn't work. --- IkiWiki.pm | 7 +++++-- debian/changelog | 6 ++++++ 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/IkiWiki.pm b/IkiWiki.pm index 0c0b7bd4c..cfa4f5f03 100644 --- a/IkiWiki.pm +++ b/IkiWiki.pm @@ -1730,12 +1730,15 @@ sub template_file ($) { my $name=shift; my $tpage=($name =~ s/^\///) ? $name : "templates/$name"; + my $template; if ($name !~ /\.tmpl$/ && exists $pagesources{$tpage}) { - $tpage=$pagesources{$tpage}; + $template=srcfile($pagesources{$tpage}, 1); $name.=".tmpl"; } + else { + $template=srcfile($tpage, 1); + } - my $template=srcfile($tpage, 1); if (defined $template) { return $template, $tpage, 1 if wantarray; return $template; diff --git a/debian/changelog b/debian/changelog index 209b170eb..c27af5615 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +ikiwiki (3.20100723) UNRELEASED; urgency=low + + * template: Fix dependency tracking. Broken in version 3.20100427. + + -- Joey Hess Fri, 23 Jul 2010 14:00:32 -0400 + ikiwiki (3.20100722) unstable; urgency=low * img: Add a margin around images displayed by this directive. -- cgit v1.2.3