From c2e2da6ee2834d6ab68d06048588cdf3a27d3691 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Fri, 22 May 2009 13:09:11 -0400 Subject: [PATCH] ikiwiki-transition: deduplinks was broken and threw away all metadata stored by plugins in the index. Fix this bug. --- debian/NEWS | 11 ++++++++++- debian/changelog | 2 ++ doc/ikiwiki-transition.mdwn | 2 +- ikiwiki-transition | 6 ++++-- 4 files changed, 17 insertions(+), 4 deletions(-) diff --git a/debian/NEWS b/debian/NEWS index 7daa350d9..c3574bdb6 100644 --- a/debian/NEWS +++ b/debian/NEWS @@ -1,6 +1,15 @@ +ikiwiki (3.13) UNRELEASED; urgency=low + + The `ikiwiki-transition deduplinks` command introduced in the + last release was buggy. If you followed the NEWS file instructions + and ran it, you should run `ikiwiki -setup` to rebuild your wiki + to fix the problem. + + -- Joey Hess Fri, 22 May 2009 13:04:02 -0400 + ikiwiki (3.12) unstable; urgency=low - You may want to run `ikiwiki-transition deduplinks /path/to/srcdir` + You may want to run `ikiwiki-transition deduplinks your.setup` after upgrading to this version of ikiwiki. This command will optimise your wiki's saved state, removing duplicate information that can slow ikiwiki down. diff --git a/debian/changelog b/debian/changelog index c0a4afbc8..f25cab5bb 100644 --- a/debian/changelog +++ b/debian/changelog @@ -11,6 +11,8 @@ ikiwiki (3.13) UNRELEASED; urgency=low interpolation on user-supplied data when translating pagespecs. * ikiwiki-transition: Allow setup files to be passed to all subcommands that need a srcdir. + * ikiwiki-transition: deduplinks was broken and threw away all + metadata stored by plugins in the index. Fix this bug. -- Joey Hess Wed, 06 May 2009 20:45:44 -0400 diff --git a/doc/ikiwiki-transition.mdwn b/doc/ikiwiki-transition.mdwn index 6177f5a46..3d81d659f 100644 --- a/doc/ikiwiki-transition.mdwn +++ b/doc/ikiwiki-transition.mdwn @@ -61,7 +61,7 @@ If this is not done explicitly, a user's plaintext password will be automatically converted to a hash when a user logs in for the first time after upgrade to ikiwiki 2.48. -# deduplinks your.setup|srcdir +# deduplinks your.setup In the past, bugs in ikiwiki have allowed duplicate link information to be stored in its indexdb. This mode removes such duplicate information, diff --git a/ikiwiki-transition b/ikiwiki-transition index 17a347c20..398b1a3c8 100755 --- a/ikiwiki-transition +++ b/ikiwiki-transition @@ -184,7 +184,9 @@ sub moveprefs { } sub deduplinks { - setstatedir(shift); + loadsetup(shift); + IkiWiki::loadplugins(); + IkiWiki::checkconfig(); IkiWiki::loadindex(); foreach my $page (keys %links) { my %l; @@ -237,7 +239,7 @@ sub usage { print STDERR "\tmoveprefs setupfile\n"; print STDERR "\thashpassword setupfile|srcdir\n"; print STDERR "\tindexdb setupfile|srcdir\n"; - print STDERR "\tdeduplinks setupfile|srcdir\n"; + print STDERR "\tdeduplinks setupfile\n"; exit 1; }