@@ -13,9 +13,9 @@ if (-f "$prev_abidir/ignore.modules"
exit(0);
}
-if (not -f "$abidir/$flavour.modules" or not -f
+if (not -d "$abidir/$flavour.modules" or not -f
"$prev_abidir/$flavour.modules") {
- print "previous or current modules file missing!\n";
+ print "previous or current modules file/directory missing!\n";
print " $abidir/$flavour.modules\n";
print " $prev_abidir/$flavour.modules\n";
if (defined($skipmodule)) {
@@ -52,10 +52,11 @@ 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>) {
+opendir(NEW, "$abidir/$flavour.modules") or
+ die "Could not open directory $abidir/$flavour.modules";
+while (readdir NEW) {
chomp;
+ next if /^\./; # Ignore '.' and '..'
$modules{$_} = 1;
$new_count++;
}
The previous commits converted the ABI from a single modules file to a directory containing per-module files. Handle that for the current/new ABI. Signed-off-by: Juerg Haefliger <juergh@canonical.com> --- debian/scripts/module-check | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-)