@@ -52,38 +52,50 @@ if (-f "$prev_abidir/../modules.ignore") {
# Read new modules first
print " reading new modules...";
$new_count = 0;
-open(NEW, "< $abidir/$flavour.modules") or
- die "Could not open $abidir/$flavour.modules";
-while (<NEW>) {
- chomp;
- $modules{$_} = 1;
- $new_count++;
+@files = ("$abidir/$flavour.modules");
+if (-f "$abidir/$flavour.modules.builtin") {
+ push(@files, "$abidir/$flavour.modules.builtin");
+}
+for $file (@files) {
+ open(NEW, "< $file") or
+ die "Could not open $file";
+ while (<NEW>) {
+ chomp;
+ $modules{$_} = 1;
+ $new_count++;
+ }
+ close(NEW);
}
-close(NEW);
print "read $new_count modules.\n";
# Now the old modules, checking for missing ones
print " reading old modules...";
$old_count = 0;
-open(OLD, "< $prev_abidir/$flavour.modules") or
- die "Could not open $prev_abidir/$flavour.modules";
-while (<OLD>) {
- chomp;
- if (not defined($modules{$_})) {
- print "\n" if not $missing;
- $missing++;
- if (not defined($modules_ignore{$_})) {
- print " MISS: $_\n";
- $errors++;
+@files = ("$prev_abidir/$flavour.modules");
+if (-f "$prev_abidir/$flavour.modules.builtin") {
+ push(@files, "$prev_abidir/$flavour.modules.builtin");
+}
+for $file (@files) {
+ open(OLD, "< $file") or
+ die "Could not open $file";
+ while (<OLD>) {
+ chomp;
+ if (not defined($modules{$_})) {
+ print "\n" if not $missing;
+ $missing++;
+ if (not defined($modules_ignore{$_})) {
+ print " MISS: $_\n";
+ $errors++;
+ } else {
+ print " MISS: $_ (ignored)\n";
+ }
} else {
- print " MISS: $_ (ignored)\n";
+ $modules{$_}++;
}
- } else {
- $modules{$_}++;
+ $old_count++;
}
- $old_count++;
+ close(OLD);
}
-close(OLD);
# Check for new modules
foreach $mod (keys(%modules)) {
if ($modules{$mod} < 2) {
The previous commit introduced a new file modules.builtin that lists all built-in modules. Take the content of that file into account during the ABI check so that modules that changed from 'm' to 'y' don't result in a build failure. Signed-off-by: Juerg Haefliger <juergh@canonical.com> --- debian/scripts/module-check | 56 ++++++++++++++++++++++--------------- 1 file changed, 34 insertions(+), 22 deletions(-)