@@ -41,38 +41,33 @@ close(CONFIG);
# ANNOTATIONS: check any annotations marked for enforcement
my $pass = 0;
my $total = 0;
+my $annotations = "$commonconfig/annotations";
my ($config, $value, $options, $option, $value, $check, $policy);
-
+print "$P: $annotations loading annotations\n";
my %annot;
-my @annotations_list = ("$commonconfig/annotations", glob("$commonconfig/*.annotations"));
-for my $annotations (@annotations_list) {
- print "$P: $annotations loading annotations\n";
- my %current_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;
+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;
+ }
- /^CONFIG_/ || next;
+ /^#/ && next;
+ chomp;
+ /^$/ && next;
- if ($form == 1) {
- ($config, $value, $options) = split(' ', $_, 3);
- } elsif ($form == 2) {
- ($config, $options) = split(' ', $_, 2);
- }
+ /^CONFIG_/ || next;
- $current_annot{$config} = $current_annot{$config} . ' ' . $options;
+ if ($form == 1) {
+ ($config, $value, $options) = split(' ', $_, 3);
+ } elsif ($form == 2) {
+ ($config, $options) = split(' ', $_, 2);
}
- close(ANNOTATIONS);
- %annot = ( %annot, %current_annot );
+
+ $annot{$config} = $annot{$config} . ' ' . $options;
}
+close(ANNOTATIONS);
my $config;
for $config (keys %annot) {
BugLink: http://bugs.launchpad.net/bugs/1752072 This reverts commit 680157d558f254645f81e417cf905a14b309ba75. Signed-off-by: Marcelo Henrique Cerri <marcelo.cerri@canonical.com> --- debian/scripts/config-check | 45 +++++++++++++++++-------------------- 1 file changed, 20 insertions(+), 25 deletions(-)