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

Marcelo Henrique Cerri marcelo.cerri at canonical.com
Thu Feb 28 16:15:07 UTC 2019


BugLink: http://bugs.launchpad.net/bugs/1752072

This reverts commit 680157d558f254645f81e417cf905a14b309ba75.

Signed-off-by: Marcelo Henrique Cerri <marcelo.cerri at canonical.com>
---
 debian/scripts/config-check | 45 +++++++++++++++++--------------------
 1 file changed, 20 insertions(+), 25 deletions(-)

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) {
-- 
2.17.1




More information about the kernel-team mailing list