Commit cb64ba1c authored by Andy Whitcroft's avatar Andy Whitcroft Committed by Tim Gardner

UBUNTU: [Debian] config-check -- handle V2 annotations format

Signed-off-by: default avatarAndy Whitcroft <apw@canonical.com>
parent cd78b65a
......@@ -45,15 +45,25 @@ my $annotations = "$commonconfig/annotations";
my ($config, $value, $options, $option, $value, $check, $policy);
print "$P: $annotations loading annotations\n";
my %annot;
my $form = 1;
open(ANNOTATIONS, "<$annotations") || die "$P: $annotations: open failed -- $! -- aborting\n";
while (<ANNOTATIONS>) {
if (/^# FORMAT: (\S+)/) {
die "$P: $1: unknown annotations format\n" if ($1 != 2);
$form = $1;
}
/^#/ && next;
chomp;
/^$/ && next;
/^CONFIG_/ || next;
($config, $value, $options) = split(' ', $_, 3);
if ($form == 1) {
($config, $value, $options) = split(' ', $_, 3);
} elsif ($form == 2) {
($config, $options) = split(' ', $_, 2);
}
$annot{$config} = $annot{$config} . ' ' . $options;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment