summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--IkiWiki/Plugin/orphans.pm10
-rw-r--r--debian/changelog4
2 files changed, 11 insertions, 3 deletions
diff --git a/IkiWiki/Plugin/orphans.pm b/IkiWiki/Plugin/orphans.pm
index d981670e7..ae330b23b 100644
--- a/IkiWiki/Plugin/orphans.pm
+++ b/IkiWiki/Plugin/orphans.pm
@@ -23,9 +23,13 @@ sub preprocess (@) {
my %params=@_;
$params{pages}="*" unless defined $params{pages};
- # Needs to update whenever a page is changed, added, or removed,
- # in order to see the link changes.
- add_depends($params{page}, $params{pages});
+ # Needs to update whenever a link changes, on any page
+ # since any page could link to one of the pages we're
+ # considering as orphans.
+ add_depends($params{page}, "*", links => 1);
+ # Also needs to update whenever potential orphans are added or
+ # removed.
+ add_depends($params{page}, $params{pages}, presence => 1);
my @orphans;
foreach my $page (pagespec_match_list(
diff --git a/debian/changelog b/debian/changelog
index 0255ac5d0..363bb9dbd 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -22,6 +22,10 @@ ikiwiki (3.14159266) UNRELEASED; urgency=low
* inline: Use a presence dependency in quick mode.
* brokenlinks: Use a link dependency.
This makes it much more efficient, only updating when really necessary.
+ * oprhans: Use a combination of precense and link dependencies.
+ This makes it more efficient. It also fixes a longstanding bug,
+ where if only a small set of pages were considered by orphans,
+ changes to links on other pages failed to cause an update.
* Transitive dependencies are now correctly supported.
-- Joey Hess <joeyh@debian.org> Sun, 27 Sep 2009 17:40:03 -0400