Skip to content

Commit

Permalink
Added version to the meta data of ABI dumps. Fixed index of libraries.
Browse files Browse the repository at this point in the history
  • Loading branch information
lvc committed May 26, 2016
1 parent 1d99549 commit c07404f
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 7 deletions.
27 changes: 20 additions & 7 deletions abi-tracker.pl
Original file line number Diff line number Diff line change
Expand Up @@ -608,7 +608,8 @@ ($$)
print STDERR "WARNING: TotalSymbols property is missed, reading ABI dump for ".$Dump->{"Object"}." ($V) ...\n";
$Dump->{"TotalSymbols"} = countSymbols($Dump);
}
elsif(not defined $Dump->{"TotalSymbolsFiltered"})
elsif(not defined $Dump->{"Version"}
or cmpVersions_S($Dump->{"Version"}, "1.7")<0)
{ # TotalSymbols is fixed in 1.7
print STDERR "WARNING: TotalSymbols property contains obsolete data, reading ABI dump for ".$Dump->{"Object"}." ($V) ...\n";
$Dump->{"TotalSymbols"} = countSymbols($Dump);
Expand Down Expand Up @@ -1468,12 +1469,15 @@ ($)
my $TotalSymbols = countSymbols($DB->{"ABIDump"}{$V}{$Md5});
$DB->{"ABIDump"}{$V}{$Md5}{"TotalSymbols"} = $TotalSymbols;

$DB->{"ABIDump"}{$V}{$Md5}{"Version"} = $TOOL_VERSION;

my @Meta = ();

push(@Meta, "\"Object\": \"".$RPath."\"");
push(@Meta, "\"Lang\": \"".$ABI->{"Language"}."\"");
push(@Meta, "\"TotalSymbols\": \"".$TotalSymbols."\"");
push(@Meta, "\"PublicABI\": \"1\"");
push(@Meta, "\"Version\": \"".$TOOL_VERSION."\"");

writeFile($Dir."/".$Md5."/meta.json", "{\n ".join(",\n ", @Meta)."\n}");
}
Expand Down Expand Up @@ -3252,25 +3256,33 @@ ()
#$Content .= "<th>Maintainer</th>\n";
$Content .= "</tr>\n";

my %LibAttr = ();
foreach my $L (sort @Libs)
{
my $DB = eval(readFile("db/$L/$DB_NAME"));

my $Title = $L;
if(defined $DB->{"Title"}) {
$Title = $DB->{"Title"};
}

$LibAttr{$L}{"Title"} = $Title;
$LibAttr{$L}{"Maintainer"} = $DB->{"Maintainer"};
$LibAttr{$L}{"MaintainerUrl"} = $DB->{"MaintainerUrl"};
}

foreach my $L (sort {lc($LibAttr{$a}{"Title"}) cmp lc($LibAttr{$b}{"Title"})} @Libs)
{
$Content .= "<tr>\n";
$Content .= "<td class='sl'>$Title</td>\n";
$Content .= "<td class='sl'>".$LibAttr{$L}{"Title"}."</td>\n";
$Content .= "<td><a href='timeline/$L/index.html'>timeline</a></td>\n";

#my $M = $DB->{"Maintainer"};

#if(defined $DB->{"MaintainerUrl"}) {
# $M = "<a href='".$DB->{"MaintainerUrl"}."'>$M</a>";
#my $M = $LibAttr{$L}{"Maintainer"};
#if(my $MUrl = $LibAttr{$L}{"MaintainerUrl"}) {
# $M = "<a href='".$MUrl."'>$M</a>";
#}

#$Content .= "<td>$M</td>\n";

$Content .= "</tr>\n";
}

Expand Down Expand Up @@ -3386,6 +3398,7 @@ ()
$Info{"Object"} = $Meta->{"Object"};
$Info{"Lang"} = $Meta->{"Lang"};
$Info{"TotalSymbols"} = $Meta->{"TotalSymbols"};
$Info{"Version"} = $Meta->{"Version"};

$DB->{"ABIDump"}{$V}{$Md5} = \%Info;
}
Expand Down
1 change: 1 addition & 0 deletions modules/ignore.tags
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,4 @@ BSON_GNUC_DEPRECATED_FOR
BSON_GNUC_CONST
BSON_GNUC_DEPRECATED
SFTP_DEPRECATED
MagickExport

0 comments on commit c07404f

Please sign in to comment.