mirror of
https://abf.rosa.ru/djam/urpm-tools.git
synced 2025-02-23 17:32:46 +00:00
URPM-repoclosure 1.4.2: updated design of HTML report, removed translations.
This commit is contained in:
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.
|
@ -1,14 +1,14 @@
|
||||||
#!/usr/bin/perl
|
#!/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
|
# 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
|
# Written by Andrey Ponomarenko
|
||||||
#
|
#
|
||||||
# PLATFORMS
|
# PLATFORMS
|
||||||
# =========
|
# =========
|
||||||
# Linux (ROSA, Mandriva)
|
# Linux (ROSA, Mandriva, Mageia)
|
||||||
#
|
#
|
||||||
# REQUIREMENTS
|
# REQUIREMENTS
|
||||||
# ============
|
# ============
|
||||||
|
@ -38,14 +38,14 @@ use File::Copy qw(copy move);
|
||||||
use Data::Dumper;
|
use Data::Dumper;
|
||||||
use strict;
|
use strict;
|
||||||
|
|
||||||
my $TOOL_VERSION = "1.4.1";
|
my $TOOL_VERSION = "1.4.2";
|
||||||
my $CmdName = get_filename($0);
|
my $CmdName = get_filename($0);
|
||||||
|
|
||||||
my ($Help, $ShowVersion, $RPMlist, $RPMdir, $StaticMode,
|
my ($Help, $ShowVersion, $RPMlist, $RPMdir, $StaticMode,
|
||||||
$DynamicMode, $NoClean, $HDlist, $FileDeps, $ReportDir,
|
$DynamicMode, $NoClean, $HDlist, $FileDeps, $ReportDir,
|
||||||
$AddRPMs, $RTitle, $DepHDlists);
|
$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
|
A tool for checking closure of a set of RPM packages
|
||||||
Copyright (C) 2012 ROSA Laboratory
|
Copyright (C) 2012 ROSA Laboratory
|
||||||
License: GNU GPL
|
License: GNU GPL
|
||||||
|
@ -83,7 +83,7 @@ my %EXIT_CODES = (
|
||||||
|
|
||||||
my $HelpMessage = "
|
my $HelpMessage = "
|
||||||
NAME:
|
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
|
A tool for checking closure of a set of RPM packages
|
||||||
|
|
||||||
USAGE:
|
USAGE:
|
||||||
|
@ -885,30 +885,35 @@ sub staticCheck()
|
||||||
$VReport .= " on ".strftime("%b %e %H:%M %Y", localtime(time)).".";
|
$VReport .= " on ".strftime("%b %e %H:%M %Y", localtime(time)).".";
|
||||||
$VReport .= "<br/>\n";
|
$VReport .= "<br/>\n";
|
||||||
|
|
||||||
$VReport .= "<h2>Test Info</h2><hr/>\n";
|
$VReport .= "<h2>Test Info</h2>\n";
|
||||||
|
#$VReport .= "<hr/>\n";
|
||||||
$VReport .= "<table class='summary'>\n";
|
$VReport .= "<table class='summary'>\n";
|
||||||
|
|
||||||
my $UnresolvedLink = "0";
|
my $UnresolvedLink = "0 (0.0%)";
|
||||||
if(my $Num = keys(%Unresolved)) {
|
if(my $Num = keys(%Unresolved)) {
|
||||||
$UnresolvedLink = "<a href='#Unresolved'>".$Num."</a>"." (".show_number($Num*100/$TotalDeps)."%)";
|
$UnresolvedLink = "<a href='#Unresolved'>".$Num."</a>"." (".show_number($Num*100/$TotalDeps)."%)";
|
||||||
}
|
}
|
||||||
$VReport .= "<tr><th>Unresolved<br/>Dependencies</th><td>$UnresolvedLink</td></tr>\n";
|
$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)) {
|
if(my $Num = keys(%Broken)) {
|
||||||
$BrokenLink = "<a href='#Broken'>".$Num."</a>"." (".show_number($Num*100/$TotalPkgs)."%)";
|
$BrokenLink = "<a href='#Broken'>".$Num."</a>"." (".show_number($Num*100/$TotalPkgs)."%)";
|
||||||
}
|
}
|
||||||
$VReport .= "<tr><th>Broken<br/>Packages</th><td>$BrokenLink</td></tr>\n";
|
$VReport .= "<tr><th>Broken<br/>Packages</th><td>$BrokenLink</td></tr>\n";
|
||||||
$VReport .= "</table>\n";
|
$VReport .= "</table>\n";
|
||||||
|
|
||||||
|
$VReport .= "<br/>\n";
|
||||||
|
$VReport .= "<br/>\n";
|
||||||
|
|
||||||
if(my @Ns = sort {lc($a) cmp lc($b)} keys(%Unresolved))
|
if(my @Ns = sort {lc($a) cmp lc($b)} keys(%Unresolved))
|
||||||
{
|
{
|
||||||
my $Title = "Unresolved Dependencies (".($#Ns+1).")";
|
my $Title = "Unresolved Dependencies (".($#Ns+1).")";
|
||||||
$Report .= "\n$Title:\n\n";
|
$Report .= "\n$Title:\n\n";
|
||||||
|
|
||||||
$VReport .= "<a name='Unresolved'></a>\n";
|
$VReport .= "<a name='Unresolved'></a>\n";
|
||||||
$VReport .= "<h2>$Title</h2><hr/>\n";
|
|
||||||
$VReport .= "<table class='report'>\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)
|
foreach my $N (@Ns)
|
||||||
{
|
{
|
||||||
|
@ -919,7 +924,9 @@ sub staticCheck()
|
||||||
my $Dep = showDep($N, $O, $V);
|
my $Dep = showDep($N, $O, $V);
|
||||||
my $Pkg = $Unresolved{$N}{$O}{$V};
|
my $Pkg = $Unresolved{$N}{$O}{$V};
|
||||||
$Report .= $Dep." (required by $Pkg)\n";
|
$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).")";
|
my $Title = "Unresolved Suggests (".($#Ns+1).")";
|
||||||
$Report .= "\n$Title:\n\n";
|
$Report .= "\n$Title:\n\n";
|
||||||
|
|
||||||
$VReport .= "<h2>$Title</h2><hr/>\n";
|
|
||||||
$VReport .= "<table class='report'>\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)
|
foreach my $N (@Ns)
|
||||||
{
|
{
|
||||||
|
@ -948,13 +956,18 @@ sub staticCheck()
|
||||||
my $Dep = showDep($N, $O, $V);
|
my $Dep = showDep($N, $O, $V);
|
||||||
my $Pkg = $UnresolvedSuggested{$N}{$O}{$V};
|
my $Pkg = $UnresolvedSuggested{$N}{$O}{$V};
|
||||||
$Report .= $Dep." (required by $Pkg)\n";
|
$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 .= "</table>";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$VReport .= "<br/>\n";
|
||||||
|
|
||||||
if(my @Ns = sort {lc($a) cmp lc($b)} keys(%Broken))
|
if(my @Ns = sort {lc($a) cmp lc($b)} keys(%Broken))
|
||||||
{
|
{
|
||||||
if($Report) {
|
if($Report) {
|
||||||
|
@ -965,15 +978,18 @@ sub staticCheck()
|
||||||
$Report .= "\n$Title:\n\n";
|
$Report .= "\n$Title:\n\n";
|
||||||
|
|
||||||
$VReport .= "<a name='Broken'></a>\n";
|
$VReport .= "<a name='Broken'></a>\n";
|
||||||
$VReport .= "<h2>$Title</h2><hr/>\n";
|
|
||||||
$VReport .= "<table class='report'>\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)
|
foreach my $N (@Ns)
|
||||||
{
|
{
|
||||||
my $Name = parse_RPMname($N);
|
my $Name = parse_RPMname($N);
|
||||||
$Report .= $Name."\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>";
|
$VReport .= "</table>";
|
||||||
|
@ -981,10 +997,17 @@ sub staticCheck()
|
||||||
|
|
||||||
my $Styles = "
|
my $Styles = "
|
||||||
body {
|
body {
|
||||||
font-family:Arial, sans-serif;
|
margin: 1.5em;
|
||||||
color:Black;
|
color:Black;
|
||||||
font-size:14px;
|
}
|
||||||
padding-left:15px;
|
h1 {
|
||||||
|
font-size: 2em;
|
||||||
|
margin-bottom:5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
h2 {
|
||||||
|
font-size: 1.5em;
|
||||||
|
margin-bottom:0px;
|
||||||
}
|
}
|
||||||
hr {
|
hr {
|
||||||
color:Black;
|
color:Black;
|
||||||
|
@ -992,53 +1015,36 @@ hr {
|
||||||
height:1px;
|
height:1px;
|
||||||
border:0;
|
border:0;
|
||||||
}
|
}
|
||||||
h1 {
|
|
||||||
margin-bottom:3px;
|
|
||||||
padding-bottom:3px;
|
|
||||||
}
|
|
||||||
h2 {
|
|
||||||
margin-bottom:0px;
|
|
||||||
padding-bottom:0px;
|
|
||||||
}
|
|
||||||
table.summary {
|
table.summary {
|
||||||
border-collapse:collapse;
|
border-collapse:collapse;
|
||||||
border:1px outset black;
|
border:1px outset black;
|
||||||
}
|
}
|
||||||
table.summary th {
|
table.summary th {
|
||||||
background-color:#eeeeee;
|
background-color:#EEEEEE;
|
||||||
font-weight:100;
|
font-weight:100;
|
||||||
text-align:left;
|
text-align:left;
|
||||||
font-size:15px;
|
|
||||||
white-space:nowrap;
|
white-space:nowrap;
|
||||||
border:1px inset gray;
|
border:1px inset gray;
|
||||||
padding: 3px;
|
padding: 3px;
|
||||||
}
|
}
|
||||||
table.summary td {
|
table.summary td {
|
||||||
text-align:right;
|
text-align:right;
|
||||||
font-size:16px;
|
|
||||||
white-space:nowrap;
|
white-space:nowrap;
|
||||||
border:1px inset gray;
|
border:1px inset gray;
|
||||||
padding: 3px 5px 3px 10px;
|
padding: 3px 5px 3px 10px;
|
||||||
}
|
}
|
||||||
table.report {
|
tr.even {
|
||||||
border-collapse:collapse;
|
background-color:#CCCCCC;
|
||||||
border:1px outset black;
|
|
||||||
}
|
}
|
||||||
table.report th {
|
table.report th {
|
||||||
background-color:#eeeeee;
|
border-bottom-style:double;
|
||||||
font-weight:bold;
|
font-weight:bold;
|
||||||
text-align:left;
|
text-align:center;
|
||||||
font-size:15px;
|
font-size: 1.3em;
|
||||||
white-space:nowrap;
|
padding:3px;
|
||||||
border:1px inset gray;
|
|
||||||
padding: 3px;
|
|
||||||
}
|
}
|
||||||
table.report td {
|
table.report td {
|
||||||
text-align:left;
|
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);
|
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";
|
</style></head><body>".$VReport."\n".$Footer."\n</body></html>\n";
|
||||||
|
|
||||||
# report
|
# report
|
||||||
if($Report)
|
if($Report or $VReport)
|
||||||
{
|
{
|
||||||
print $Report."\n"; # on the screen
|
print $Report."\n"; # on the screen
|
||||||
writeFile("$RESULTS_DIR/report.html", $VReport);
|
writeFile("$RESULTS_DIR/report.html", $VReport);
|
||||||
|
@ -1164,7 +1170,7 @@ sub scenario()
|
||||||
}
|
}
|
||||||
if($ShowVersion)
|
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);
|
exit(0);
|
||||||
}
|
}
|
||||||
if($HDlist) {
|
if($HDlist) {
|
||||||
|
|
1149
urpm-tools.pot
1149
urpm-tools.pot
File diff suppressed because it is too large
Load diff
Loading…
Add table
Reference in a new issue