Cope with different issues found in testing the code for ABI udebs

Deal with various edge cases
This commit is contained in:
Steve McIntyre 2020-09-27 02:14:05 +01:00
parent 692a5012f1
commit b60845a775
1 changed files with 21 additions and 16 deletions

View File

@ -144,23 +144,28 @@ foreach my $arch (@ARCHES) {
} }
} }
close PZ; close PZ;
$output .= "/* First, generic udebs */\n"; $output .= "/* Udebs found in $pz: */\n";
foreach my $udeb (@output_udebs) { if (scalar (@output_udebs) > 0) {
$output .= "$udeb\n"; $output .= "/* Non-kernel udebs */\n";
foreach my $udeb (@output_udebs) {
$output .= "$udeb\n";
}
} }
my $num_this_abi = scalar (@{ $driver_udebs{$highest_kernel_ver}}); if ($highest_kernel_ver != 0) {
$output .= "/* Next: $num_this_abi udebs for kernel/ABI version "; my $num_this_abi = scalar (@{ $driver_udebs{$highest_kernel_ver}});
$output .= number_to_di_ker_abi($highest_kernel_ver); $output .= "/* Next: $num_this_abi udebs for kernel/ABI version ";
$output .= " */\n"; $output .= number_to_di_ker_abi($highest_kernel_ver);
foreach my $udeb (@{ $driver_udebs{$highest_kernel_ver}}) { $output .= " */\n";
$output .= "$udeb\n"; foreach my $udeb (@{ $driver_udebs{$highest_kernel_ver}}) {
} $output .= "$udeb\n";
foreach my $key (keys (%driver_udebs)) { }
if ($key != $highest_kernel_ver) { foreach my $key (keys (%driver_udebs)) {
$num_this_abi = scalar (@{ $driver_udebs{$key}}); if ($key != $highest_kernel_ver) {
$output .= "/* IGNORING $num_this_abi udebs for kernel/ABI version "; $num_this_abi = scalar (@{ $driver_udebs{$key}});
$output .= number_to_di_ker_abi($key); $output .= "/* IGNORING $num_this_abi udebs for kernel/ABI version ";
$output .= " */\n"; $output .= number_to_di_ker_abi($key);
$output .= " */\n";
}
} }
} }
} }