trail: remove excess presence-dependencies
authorSimon McVittie <smcv@debian.org>
Wed, 2 Jan 2013 19:17:16 +0000 (19:17 +0000)
committerSimon McVittie <smcv@debian.org>
Wed, 2 Jan 2013 19:19:32 +0000 (19:19 +0000)
Since trail members are explicitly rebuilt if the information used for
their prev/up/next boxes changes, they don't need another dependency
on the trail itself. (If the trail disappears, it will disappear from
the member's member_to_trails entry, causing a rebuild; so the add_depends
is redundant.)

Similarly, since trail members are explicitly rebuilt if their next
or previous item, or its title, changes, the presence dependencies on the
next and previous items are redundant.

IkiWiki/Plugin/trail.pm

index b1bb6d5b532fb25120f6da1d4a371e43e04cfb72..cb94855fdd1181cb8113001f838db491db0bcc4d 100644 (file)
@@ -344,8 +344,6 @@ sub prerender {
                        $prev = $members->[$i - 1] if $i > 0;
                        my $next = $members->[$i + 1];
 
-                       add_depends($member, $trail, deptype("presence"));
-
                        $member_to_trails{$member}{$trail} = [$prev, $next];
                }
 
@@ -438,13 +436,11 @@ sub pagetemplate (@) {
                        my ($prevurl, $nexturl, $prevtitle, $nexttitle);
 
                        if (defined $prev) {
-                               add_depends($params{destpage}, $prev, deptype("presence"));
                                $prevurl = urlto($prev, $page);
                                $prevtitle = title_of($prev);
                        }
 
                        if (defined $next) {
-                               add_depends($params{destpage}, $next, deptype("presence"));
                                $nexturl = urlto($next, $page);
                                $nexttitle = title_of($next);
                        }