Add missing plugin section, and deal with missing sections with a warning.

master
Joey Hess 2013-03-04 13:00:33 -04:00
parent e2405005e6
commit 1d6eb13e2b
3 changed files with 6 additions and 0 deletions

View File

@ -18,6 +18,7 @@ sub getsetup () {
plugin => { plugin => {
safe => 0, safe => 0,
rebuild => undef, rebuild => undef,
section => "special-purpose",
}, },
add_underlays => { add_underlays => {
type => "string", type => "string",

View File

@ -223,6 +223,10 @@ sub commented_dump ($$) {
my $setup=$pair->[1]; my $setup=$pair->[1];
my %s=@{$setup}; my %s=@{$setup};
my $section=$s{plugin}->{section}; my $section=$s{plugin}->{section};
if (! defined $section) {
print STDERR "warning: missing section in $plugin\n";
$section="other";
}
push @{$section_plugins{$section}}, $plugin; push @{$section_plugins{$section}}, $plugin;
if (@{$section_plugins{$section}} == 1) { if (@{$section_plugins{$section}} == 1) {
push @ret, "", $indent.("#" x 70), "$indent# $section plugins", push @ret, "", $indent.("#" x 70), "$indent# $section plugins",

1
debian/changelog vendored
View File

@ -1,6 +1,7 @@
ikiwiki (3.20130213) UNRELEASED; urgency=low ikiwiki (3.20130213) UNRELEASED; urgency=low
* Allow dots in directive parameter names. (tango) * Allow dots in directive parameter names. (tango)
* Add missing plugin section, and deal with missing sections with a warning.
-- Joey Hess <joeyh@debian.org> Fri, 15 Feb 2013 17:23:12 -0400 -- Joey Hess <joeyh@debian.org> Fri, 15 Feb 2013 17:23:12 -0400