[subversion-commit] SVN tetex-base commit + diffs: r1444 -
tetex-base/trunk/debian
Frank Küster
frank at costa.debian.org
Mon Jun 19 16:21:31 UTC 2006
Author: frank
Date: 2006-06-19 16:21:30 +0000 (Mon, 19 Jun 2006)
New Revision: 1444
Modified:
tetex-base/trunk/debian/searchbase35
Log:
rewrote string formatting, now tabbing works
Modified: tetex-base/trunk/debian/searchbase35
===================================================================
--- tetex-base/trunk/debian/searchbase35 2006-06-18 19:17:23 UTC (rev 1443)
+++ tetex-base/trunk/debian/searchbase35 2006-06-19 16:21:30 UTC (rev 1444)
@@ -30,6 +30,13 @@
% according to its file 00readme.txt"
);
+# string lengths
+my %Length;
+$Length{BaseFile} = 15;
+$Length{FileWithPath} = 40;
+$Length{Zipfile} = 15;
+$Length{License} = 30;
+
my @categories = (\%psnfssRequired);
my $tpmDir = "texmf-dist/tpm/";
@@ -117,23 +124,31 @@
sub getLicenseFromList {
my $file = $_[0];
SWITCH: {
- if ($file =~ m(psnfss-source) ) { return " \t license: LPPL"; last SWITCH };
- if ($file =~ m(urw/base35) ) { return " \t license: GPL"; last SWITCH };
+ if ($file =~ m(psnfss-source) ) { return "license: LPPL"; last SWITCH };
+ if ($file =~ m(urw/base35) ) { return "license: GPL"; last SWITCH };
- return " \t license: unknown";
+ return (30," \t license: unknown");
};
};
sub grepPsnfssArchive {
my $file = $_[0];
+ my $basename = basename($file);
my ($hit, $ReturnLine);
foreach my $archive (@psnfssArchives) {
if (($hit) = grep {/$file/} @{$CTANarchive{$archive}{members}} ) {
my $zipfile = basename($CTANarchive{$archive}{zipfile});
- $ReturnLine =
- "$hit\t in $zipfile\t"
- . getLicensePerArchive($CTANarchive{$archive}{zipfile});
+ my $license;
+ $license = getLicensePerArchive($CTANarchive{$archive}{zipfile});
+ my $format = "%-*s\t%-*s\t%-*s\t%-*s\n";
+ $ReturnLine = sprintf
+ $format,
+ $Length{BaseFile}, $basename,
+ $Length{FileWithPath}, $hit,
+ $Length{Zipfile}, $zipfile,
+ $Length{License}, $license
+ ;
return($ReturnLine);
}
}
@@ -141,14 +156,22 @@
sub grepOtherArchive {
my $file = $_[0];
+ my $basename = basename($file);
my ($hit, $ReturnLine);
foreach my $archive (@otherArchivesTar, @otherArchivesZip) {
if (($hit) = grep {/$file/} @{$CTANarchive{$archive}{members}} ) {
my $zipfile = basename($CTANarchive{$archive}{zipfile});
- $ReturnLine =
- "$hit\t in $zipfile\t"
- . getLicensePerArchive($CTANarchive{$archive}{zipfile});
+ my $license;
+ $license = getLicensePerArchive($CTANarchive{$archive}{zipfile});
+ my $format = "%-*s\t%-*s\t%-*s\t%-*s\n";
+ $ReturnLine = sprintf
+ $format,
+ $Length{BaseFile}, $basename,
+ $Length{FileWithPath}, $hit,
+ $Length{Zipfile}, " ",
+ $Length{License}, $license
+ ;
return($ReturnLine);
}
}
@@ -179,7 +202,16 @@
}
# now look in the CTAN filelist
if ($CTANbyname{$basefile}) {
- $locline = $CTANbyname{$basefile} . getLicenseFromList($CTANbyname{$basefile});
+ my $license;
+ $license = getLicenseFromList($CTANbyname{$basefile});
+ my $format = "%-*s\t%-*s\t%-*s\t%-*s\n";
+ $locline = sprintf
+ $format,
+ $Length{BaseFile}, $basefile,
+ $Length{FileWithPath}, $CTANbyname{$basefile},
+ $Length{Zipfile}, " ",
+ $Length{License}, $license
+ ;
last FINDLOC
}
# now look in some other archives
@@ -190,8 +222,7 @@
}
# prepend the filename
- $locline = $locline
- ? $basefile . "\t" . $locline . "\n"
+ $locline = $locline ? $locline
: $basefile . "\t\t unknown\t license: unknown\n" ;
push @{$AllFilesList{$font}}, $locline;
More information about the Pkg-tetex-commits
mailing list