From: Joey Hess Date: Mon, 4 Mar 2013 17:19:31 +0000 (-0400) Subject: Merge branch 'master' of ssh://git.ikiwiki.info X-Git-Tag: 3.20130504~75 X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/commitdiff_plain/d72e5fd58c121582b2a2a1feca39596c29a1feb0?hp=e33d61df189cfc7bb35a48604afec043f249a5a0 Merge branch 'master' of ssh://git.ikiwiki.info --- diff --git a/IkiWiki/Plugin/underlay.pm b/IkiWiki/Plugin/underlay.pm index 3ea19c635..2967761c8 100644 --- a/IkiWiki/Plugin/underlay.pm +++ b/IkiWiki/Plugin/underlay.pm @@ -18,6 +18,7 @@ sub getsetup () { plugin => { safe => 0, rebuild => undef, + section => "special-purpose", }, add_underlays => { type => "string", diff --git a/IkiWiki/Setup.pm b/IkiWiki/Setup.pm index 48f3d4634..453d19670 100644 --- a/IkiWiki/Setup.pm +++ b/IkiWiki/Setup.pm @@ -172,6 +172,11 @@ sub getsetup () { my @s=eval { $IkiWiki::hooks{getsetup}{$plugin}{call}->() }; next unless @s; + if (scalar(@s) % 2 != 0) { + print STDERR "warning: plugin $plugin has a broken getsetup; ignoring\n"; + next; + } + # set default section value (note use of shared # hashref between array and hash) my %s=@s; @@ -223,6 +228,10 @@ sub commented_dump ($$) { my $setup=$pair->[1]; my %s=@{$setup}; my $section=$s{plugin}->{section}; + if (! defined $section) { + print STDERR "warning: missing section in $plugin\n"; + $section="other"; + } push @{$section_plugins{$section}}, $plugin; if (@{$section_plugins{$section}} == 1) { push @ret, "", $indent.("#" x 70), "$indent# $section plugins", diff --git a/debian/changelog b/debian/changelog index 7905ae6fc..54e7c9024 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,6 +1,8 @@ ikiwiki (3.20130213) UNRELEASED; urgency=low * Allow dots in directive parameter names. (tango) + * Add missing plugin section, and deal with missing sections with a warning. + * Detect plugins with a broken getsetup and warn. -- Joey Hess Fri, 15 Feb 2013 17:23:12 -0400