From 66a65b5ddd8963a66293ac90a01eb40daccaee03 Mon Sep 17 00:00:00 2001 From: joey Date: Thu, 8 Mar 2007 11:04:59 +0000 Subject: [PATCH] * Correct a deadlock that could occur in post-commit if the aggregate plugin was enabled and tried to lock the already locked wiki. --- IkiWiki/Plugin/aggregate.pm | 7 ++++--- debian/changelog | 4 +++- po/ikiwiki.pot | 24 ++++++++++++------------ 3 files changed, 19 insertions(+), 16 deletions(-) diff --git a/IkiWiki/Plugin/aggregate.pm b/IkiWiki/Plugin/aggregate.pm index b1b069b00..bdbcd536f 100644 --- a/IkiWiki/Plugin/aggregate.pm +++ b/IkiWiki/Plugin/aggregate.pm @@ -31,15 +31,16 @@ sub getopt () { #{{{ } #}}} sub checkconfig () { #{{{ - IkiWiki::lockwiki(); + my $nolock=($config{post_commit} && ! commit_hook_enabled()); + IkiWiki::lockwiki() unless $nolock; loadstate(); - if ($config{aggregate}) { + if ($config{aggregate} && ! $nolock) { IkiWiki::loadindex(); aggregate(); expire(); savestate(); } - IkiWiki::unlockwiki(); + IkiWiki::unlockwiki() unless $nolock; } #}}} sub filter (@) { #{{{ diff --git a/debian/changelog b/debian/changelog index 47a1a9423..faddbb983 100644 --- a/debian/changelog +++ b/debian/changelog @@ -25,8 +25,10 @@ ikiwiki (1.45) UNRELEASED; urgency=low * That means that *every edit link* on the wiki is potentially changed. Rebuilding wikis on upgrade to this version therefore necessary; enabled that in postinst. + * Correct a deadlock that could occur in post-commit if the aggregate plugin + was enabled and tried to lock the already locked wiki. - -- Joey Hess Wed, 7 Mar 2007 22:58:52 -0500 + -- Joey Hess Thu, 8 Mar 2007 05:57:49 -0500 ikiwiki (1.44) unstable; urgency=low diff --git a/po/ikiwiki.pot b/po/ikiwiki.pot index 7d5af02ed..f622d2652 100644 --- a/po/ikiwiki.pot +++ b/po/ikiwiki.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2007-03-08 01:08-0500\n" +"POT-Creation-Date: 2007-03-08 06:02-0500\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -54,53 +54,53 @@ msgstr "" msgid "login failed, perhaps you need to turn on cookies?" msgstr "" -#: ../IkiWiki/Plugin/aggregate.pm:61 +#: ../IkiWiki/Plugin/aggregate.pm:62 #, perl-format msgid "missing %s parameter" msgstr "" -#: ../IkiWiki/Plugin/aggregate.pm:89 +#: ../IkiWiki/Plugin/aggregate.pm:90 msgid "new feed" msgstr "" -#: ../IkiWiki/Plugin/aggregate.pm:103 +#: ../IkiWiki/Plugin/aggregate.pm:104 msgid "posts" msgstr "" -#: ../IkiWiki/Plugin/aggregate.pm:105 +#: ../IkiWiki/Plugin/aggregate.pm:106 msgid "new" msgstr "" -#: ../IkiWiki/Plugin/aggregate.pm:211 +#: ../IkiWiki/Plugin/aggregate.pm:212 #, perl-format msgid "expiring %s (%s days old)" msgstr "" -#: ../IkiWiki/Plugin/aggregate.pm:218 +#: ../IkiWiki/Plugin/aggregate.pm:219 #, perl-format msgid "expiring %s" msgstr "" -#: ../IkiWiki/Plugin/aggregate.pm:241 +#: ../IkiWiki/Plugin/aggregate.pm:242 #, perl-format msgid "checking feed %s ..." msgstr "" -#: ../IkiWiki/Plugin/aggregate.pm:246 +#: ../IkiWiki/Plugin/aggregate.pm:247 #, perl-format msgid "could not find feed at %s" msgstr "" -#: ../IkiWiki/Plugin/aggregate.pm:255 +#: ../IkiWiki/Plugin/aggregate.pm:256 msgid "feed crashed XML::Feed!" msgstr "" -#: ../IkiWiki/Plugin/aggregate.pm:278 +#: ../IkiWiki/Plugin/aggregate.pm:279 #, perl-format msgid "processed ok at %s" msgstr "" -#: ../IkiWiki/Plugin/aggregate.pm:333 +#: ../IkiWiki/Plugin/aggregate.pm:334 #, perl-format msgid "creating new page %s" msgstr "" -- 2.32.0.93.g670b81a890