1
1
# !/usr/bin/perl -w
2
2
3
- my $flavour = shift ;
4
- my $prev_abinum = shift ;
5
- my $abinum = shift ;
6
- my $prev_abidir = shift ;
7
- my $abidir = shift ;
3
+ my $abinew = shift ;
4
+ my $abiold = shift ;
8
5
my $skipabi = shift ;
9
6
7
+ $abinew =~ / abi-(.*)/ ;
8
+ my $abinum = $1 ;
9
+
10
10
my $fail_exit = 1;
11
11
my $EE = " EE:" ;
12
12
my $errors = 0;
13
13
my $abiskip = 0;
14
14
15
15
my $count ;
16
16
17
- print " II: Checking ABI for $flavour ...\n " ;
17
+ print " II: Checking ABI...\n " ;
18
18
19
- if (-f " $prev_abidir /ignore"
20
- or -f " $prev_abidir /$flavour .ignore" or " $skipabi " eq " true" ) {
19
+ if ($skipabi ) {
21
20
print " WW: Explicitly asked to ignore ABI, running in no-fail mode\n " ;
22
21
$fail_exit = 0;
23
22
$abiskip = 1;
24
23
$EE = " WW:" ;
25
24
}
26
25
27
- if ($prev_abinum != $abinum ) {
28
- print " II: Different ABI's, running in no-fail mode\n " ;
29
- $fail_exit = 0;
30
- $EE = " WW:" ;
31
- }
32
-
33
- if (not -f " $abidir / $flavour " or not -f " $prev_abidir / $flavour " ) {
26
+ # if ($prev_abinum != $abinum) {
27
+ # print "II: Different ABI's, running in no-fail mode\n";
28
+ # $fail_exit = 0;
29
+ # $EE = "WW:";
30
+ # }
31
+ #
32
+ if (not -f " $abinew " or not -f " $abiold " ) {
34
33
print " EE: Previous or current ABI file missing!\n " ;
35
- print " $abidir / $flavour \n " if not -f " $abidir / $flavour " ;
36
- print " $prev_abidir / $flavour \n " if not -f " $prev_abidir / $flavour " ;
34
+ print " $abinew \n " if not -f " $abinew " ;
35
+ print " $abiold \n " if not -f " $abiold " ;
37
36
38
37
# Exit if the ABI files are missing, but return status based on whether
39
38
# skip ABI was indicated.
@@ -53,7 +52,7 @@ my %module_syms;
53
52
my $ignore = 0;
54
53
print " Reading symbols/modules to ignore..." ;
55
54
56
- for $file (" $prev_abidir /../blacklist " , " $prev_abidir /../../perm -blacklist" ) {
55
+ for $file (" abi -blacklist" ) {
57
56
if (-f $file ) {
58
57
open (IGNORE, " < $file " ) or
59
58
die " Could not open $file " ;
@@ -86,8 +85,8 @@ sub is_ignored($$) {
86
85
# Read new syms first
87
86
print " Reading new symbols ($abinum )..." ;
88
87
$count = 0;
89
- open (NEW, " < $abidir / $flavour " ) or
90
- die " Could not open $abidir / $flavour " ;
88
+ open (NEW, " < $abinew " ) or
89
+ die " Could not open $abinew " ;
91
90
while (<NEW>) {
92
91
chomp ;
93
92
m / ^(\S +)\s (.+)\s (0x[0-9a-f]+)\s (.+)$ / ;
@@ -101,10 +100,10 @@ close(NEW);
101
100
print " read $count symbols.\n " ;
102
101
103
102
# Now the old symbols, checking for missing ones
104
- print " Reading old symbols ( $prev_abinum ) ..." ;
103
+ print " Reading old symbols..." ;
105
104
$count = 0;
106
- open (OLD, " < $prev_abidir / $flavour " ) or
107
- die " Could not open $prev_abidir / $flavour " ;
105
+ open (OLD, " < $abiold " ) or
106
+ die " Could not open $abiold " ;
108
107
while (<OLD>) {
109
108
chomp ;
110
109
m / ^(\S +)\s (.+)\s (0x[0-9a-f]+)\s (.+)$ / ;
@@ -146,8 +145,8 @@ foreach $sym (keys(%symbols)) {
146
145
}
147
146
print " " if $count ;
148
147
print " found $count new symbols\n " ;
149
- if ($count and $prev_abinum == $abinum ) {
150
- print " WW: Found new symbols within same ABI. Not recommended \n " ;
148
+ if ($count ) {
149
+ print " WW: Found new symbols. Not recommended unless ABI was bumped \n " ;
151
150
}
152
151
153
152
print " II: Checking for changes to ABI...\n " ;
0 commit comments