summaryrefslogtreecommitdiff
path: root/Master/tlpkg/TeXLive/TLPOBJ.pm
diff options
context:
space:
mode:
authorNorbert Preining <preining@logic.at>2007-11-22 00:59:31 +0000
committerNorbert Preining <preining@logic.at>2007-11-22 00:59:31 +0000
commit705aa6c16727ba02f401de3c2778a421bddc3288 (patch)
tree247f7280b4198315fdccd402a6fec9449a88329e /Master/tlpkg/TeXLive/TLPOBJ.pm
parentdfb6bdbf57381dee41c53ad055efe834086443d7 (diff)
sizes are now number of 4k blocks, and number of blocks is computed on
a blocks per file basis. git-svn-id: svn://tug.org/texlive/trunk@5541 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/tlpkg/TeXLive/TLPOBJ.pm')
-rw-r--r--Master/tlpkg/TeXLive/TLPOBJ.pm14
1 files changed, 9 insertions, 5 deletions
diff --git a/Master/tlpkg/TeXLive/TLPOBJ.pm b/Master/tlpkg/TeXLive/TLPOBJ.pm
index be44b5ad5dc..7e8766fb9fe 100644
--- a/Master/tlpkg/TeXLive/TLPOBJ.pm
+++ b/Master/tlpkg/TeXLive/TLPOBJ.pm
@@ -226,12 +226,14 @@ sub recompute_sizes {
sub _recompute_size {
my ($self,$type,$tltree,$arch) = @_;
- my $size = 0;
+ my $nrivblocks = 0;
if ($type eq "bin") {
my %binfiles = %{$self->{'binfiles'}};
if (defined($binfiles{$arch})) {
foreach $f (@{$binfiles{$arch}}) {
- $size += $tltree->size_of($f);
+ my $s = $tltree->size_of($f);
+ $nrivblocks += int($s/$TeXLive::TLConfig::BlockSize);
+ $nrivblocks++ if (($s%$TeXLive::TLConfig::BlockSize) > 0);
}
}
} else {
@@ -239,14 +241,15 @@ sub _recompute_size {
foreach $f (@{$self->{"${type}files"}}) {
my $s = $tltree->size_of($f);
if (defined($s)) {
- $size += $s;
+ $nrivblocks += int($s/$TeXLive::TLConfig::BlockSize);
+ $nrivblocks++ if (($s%$TeXLive::TLConfig::BlockSize) > 0);
} else {
printf STDERR "size for $f not defined, strange ...\n";
}
}
}
}
- return $size;
+ return $nrivblocks;
}
sub writeout {
@@ -799,7 +802,8 @@ I<indented> by one space. They differ only in the first line itself
=item C<srcfiles>, C<runfiles>, C<binfiles>, C<docfiles>
each of these items contains addition the sum of sizes of the
-single files (currently in bytes).
+single files (in number of C<TeXLive::TLConfig::BlockSize> blocks, which
+is currently 4k).
srcfiles size=NNNNNN
runfiles size=NNNNNN