diff mbox series

[bionic/linux-gcp,1/5] Revert "UBUNTU: [Packaging] config-check: allow overlay annotations files"

Message ID 20190228161511.22659-2-marcelo.cerri@canonical.com
State New
Headers show
Series Update linux-gcp annotations file overlay | expand

Commit Message

Marcelo Henrique Cerri Feb. 28, 2019, 4:15 p.m. UTC
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(-)
diff mbox series

Patch

diff --git a/debian/scripts/config-check b/debian/scripts/config-check
index 9caf1e85db93..224be080514a 100755
--- a/debian/scripts/config-check
+++ b/debian/scripts/config-check
@@ -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) {