URPM-repoclosure 1.4.2: updated design of HTML report, removed translations.

This commit is contained in:
Andrey Ponomarenko 2012-09-14 12:33:26 +04:00
parent 04909f493a
commit fd7f73b621
4 changed files with 53 additions and 2583 deletions

File diff suppressed because it is too large Load diff

Binary file not shown.

View file

@ -1,14 +1,14 @@
#!/usr/bin/perl
########################################################
# URPM Repo Closure Checker 1.4.1 for Linux
# URPM Repo Closure Checker 1.4.2 for Linux
# A tool for checking closure of a set of RPM packages
#
# Copyright (C) 2012 ROSA Laboratory
# Copyright (C) 2011-2012 ROSA Laboratory
# Written by Andrey Ponomarenko
#
# PLATFORMS
# =========
# Linux (ROSA, Mandriva)
# Linux (ROSA, Mandriva, Mageia)
#
# REQUIREMENTS
# ============
@ -38,14 +38,14 @@ use File::Copy qw(copy move);
use Data::Dumper;
use strict;
my $TOOL_VERSION = "1.4.1";
my $TOOL_VERSION = "1.4.2";
my $CmdName = get_filename($0);
my ($Help, $ShowVersion, $RPMlist, $RPMdir, $StaticMode,
$DynamicMode, $NoClean, $HDlist, $FileDeps, $ReportDir,
$AddRPMs, $RTitle, $DepHDlists);
my $ShortUsage = "URPM Repo Closure Checker $TOOL_VERSION for Mandriva Linux
my $ShortUsage = "URPM Repo Closure Checker $TOOL_VERSION
A tool for checking closure of a set of RPM packages
Copyright (C) 2012 ROSA Laboratory
License: GNU GPL
@ -83,7 +83,7 @@ my %EXIT_CODES = (
my $HelpMessage = "
NAME:
URPM Repo Closure Checker $TOOL_VERSION for Mandriva Linux
URPM Repo Closure Checker $TOOL_VERSION
A tool for checking closure of a set of RPM packages
USAGE:
@ -885,30 +885,35 @@ sub staticCheck()
$VReport .= " on ".strftime("%b %e %H:%M %Y", localtime(time)).".";
$VReport .= "<br/>\n";
$VReport .= "<h2>Test Info</h2><hr/>\n";
$VReport .= "<h2>Test Info</h2>\n";
#$VReport .= "<hr/>\n";
$VReport .= "<table class='summary'>\n";
my $UnresolvedLink = "0";
my $UnresolvedLink = "0 (0.0%)";
if(my $Num = keys(%Unresolved)) {
$UnresolvedLink = "<a href='#Unresolved'>".$Num."</a>"." (".show_number($Num*100/$TotalDeps)."%)";
}
$VReport .= "<tr><th>Unresolved<br/>Dependencies</th><td>$UnresolvedLink</td></tr>\n";
my $BrokenLink = "0";
my $BrokenLink = "0 (0.0%)";
if(my $Num = keys(%Broken)) {
$BrokenLink = "<a href='#Broken'>".$Num."</a>"." (".show_number($Num*100/$TotalPkgs)."%)";
}
$VReport .= "<tr><th>Broken<br/>Packages</th><td>$BrokenLink</td></tr>\n";
$VReport .= "</table>\n";
$VReport .= "<br/>\n";
$VReport .= "<br/>\n";
if(my @Ns = sort {lc($a) cmp lc($b)} keys(%Unresolved))
{
my $Title = "Unresolved Dependencies (".($#Ns+1).")";
$Report .= "\n$Title:\n\n";
$VReport .= "<a name='Unresolved'></a>\n";
$VReport .= "<h2>$Title</h2><hr/>\n";
$VReport .= "<table class='report'>\n";
$VReport .= "<tr><th>Dependency</th><th>Required by</th></tr>\n";
$VReport .= "<tr><th>Dependency Name (".($#Ns+1).")</th><th>Required by Package</th></tr>\n";
my $Num = 1;
foreach my $N (@Ns)
{
@ -919,7 +924,9 @@ sub staticCheck()
my $Dep = showDep($N, $O, $V);
my $Pkg = $Unresolved{$N}{$O}{$V};
$Report .= $Dep." (required by $Pkg)\n";
$VReport .= "<tr><td>$Dep</td><td>$Pkg</td></tr>\n";
my $Class = " class='even'";
$Class = "" if($Num++ % 2 != 0);
$VReport .= "<tr$Class><td>$Dep</td><td>$Pkg</td></tr>\n";
}
}
}
@ -935,9 +942,10 @@ sub staticCheck()
my $Title = "Unresolved Suggests (".($#Ns+1).")";
$Report .= "\n$Title:\n\n";
$VReport .= "<h2>$Title</h2><hr/>\n";
$VReport .= "<table class='report'>\n";
$VReport .= "<tr><th>Dependency</th><th>Suggested by</th></tr>\n";
$VReport .= "<tr><th>Dependency Name (".($#Ns+1).")</th><th>Suggested by Package</th></tr>\n";
my $Num = 1;
foreach my $N (@Ns)
{
@ -948,13 +956,18 @@ sub staticCheck()
my $Dep = showDep($N, $O, $V);
my $Pkg = $UnresolvedSuggested{$N}{$O}{$V};
$Report .= $Dep." (required by $Pkg)\n";
$VReport .= "<tr><td>$Dep</td><td>$Pkg</td></tr>\n";
my $Class = " class='even'";
$Class = "" if($Num++ % 2 != 0);
$VReport .= "<tr$Class><td>$Dep</td><td>$Pkg</td></tr>\n";
}
}
}
$VReport .= "</table>";
}
$VReport .= "<br/>\n";
if(my @Ns = sort {lc($a) cmp lc($b)} keys(%Broken))
{
if($Report) {
@ -965,15 +978,18 @@ sub staticCheck()
$Report .= "\n$Title:\n\n";
$VReport .= "<a name='Broken'></a>\n";
$VReport .= "<h2>$Title</h2><hr/>\n";
$VReport .= "<table class='report'>\n";
$VReport .= "<tr><th>Package</th></tr>\n";
$VReport .= "<tr><th>Broken Packages (".($#Ns+1).")</th></tr>\n";
my $Num = 1;
foreach my $N (@Ns)
{
my $Name = parse_RPMname($N);
$Report .= $Name."\n";
$VReport .= "<tr><td>$Name</td></tr>\n";
my $Class = " class='even'";
$Class = "" if($Num++ % 2 != 0);
$VReport .= "<tr$Class><td>$Name</td></tr>\n";
}
$VReport .= "</table>";
@ -981,10 +997,17 @@ sub staticCheck()
my $Styles = "
body {
font-family:Arial, sans-serif;
margin: 1.5em;
color:Black;
font-size:14px;
padding-left:15px;
}
h1 {
font-size: 2em;
margin-bottom:5px;
}
h2 {
font-size: 1.5em;
margin-bottom:0px;
}
hr {
color:Black;
@ -992,53 +1015,36 @@ hr {
height:1px;
border:0;
}
h1 {
margin-bottom:3px;
padding-bottom:3px;
}
h2 {
margin-bottom:0px;
padding-bottom:0px;
}
table.summary {
border-collapse:collapse;
border:1px outset black;
}
table.summary th {
background-color:#eeeeee;
background-color:#EEEEEE;
font-weight:100;
text-align:left;
font-size:15px;
white-space:nowrap;
border:1px inset gray;
padding: 3px;
}
table.summary td {
text-align:right;
font-size:16px;
white-space:nowrap;
border:1px inset gray;
padding: 3px 5px 3px 10px;
}
table.report {
border-collapse:collapse;
border:1px outset black;
tr.even {
background-color:#CCCCCC;
}
table.report th {
background-color:#eeeeee;
border-bottom-style:double;
font-weight:bold;
text-align:left;
font-size:15px;
white-space:nowrap;
border:1px inset gray;
padding: 3px;
text-align:center;
font-size: 1.3em;
padding:3px;
}
table.report td {
text-align:left;
font-size:16px;
white-space:nowrap;
border:1px inset gray;
padding: 3px;
}";
my $Footer = "<hr/><div style='width:99%;font-size:11px;' align='right'><i>Generated on ".(localtime time);
@ -1056,7 +1062,7 @@ table.report td {
</style></head><body>".$VReport."\n".$Footer."\n</body></html>\n";
# report
if($Report)
if($Report or $VReport)
{
print $Report."\n"; # on the screen
writeFile("$RESULTS_DIR/report.html", $VReport);
@ -1164,7 +1170,7 @@ sub scenario()
}
if($ShowVersion)
{
print "URPM Repo Closure Checker $TOOL_VERSION for Mandriva Linux\nCopyright (C) 2012 ROSA Laboratory\nLicense: GPL <http://www.gnu.org/licenses/>\nThis program is free software: you can redistribute it and/or modify it.\n\nWritten by Andrey Ponomarenko.\n";
print "URPM Repo Closure Checker $TOOL_VERSION\nCopyright (C) 2012 ROSA Laboratory\nLicense: GPL <http://www.gnu.org/licenses/>\nThis program is free software: you can redistribute it and/or modify it.\n\nWritten by Andrey Ponomarenko.\n";
exit(0);
}
if($HDlist) {

File diff suppressed because it is too large Load diff