diff options
Diffstat (limited to 'Master/tlpkg/TeXLive/TLPOBJ.pm')
-rw-r--r-- | Master/tlpkg/TeXLive/TLPOBJ.pm | 47 |
1 files changed, 44 insertions, 3 deletions
diff --git a/Master/tlpkg/TeXLive/TLPOBJ.pm b/Master/tlpkg/TeXLive/TLPOBJ.pm index f911f2a6cff..61f766d8e19 100644 --- a/Master/tlpkg/TeXLive/TLPOBJ.pm +++ b/Master/tlpkg/TeXLive/TLPOBJ.pm @@ -179,6 +179,18 @@ sub from_fh { $self->doccontainersize("$1"); $lastcmd = "doccontainersize"; next; + } elsif ($line =~ /^containermd5\s+([a-f0-9]+)\s*/o) { + $self->containermd5("$1"); + $lastcmd = "containermd5"; + next; + } elsif ($line =~ /^srccontainermd5\s+([a-f0-9]+)\s*/o) { + $self->srccontainermd5("$1"); + $lastcmd = "srccontainermd5"; + next; + } elsif ($line =~ /^doccontainermd5\s+([a-f0-9]+)\s*/o) { + $self->doccontainermd5("$1"); + $lastcmd = "doccontainermd5"; + next; } elsif ($line =~ /^catalogue\s+(.*)\s*/o) { $self->catalogue("$1"); $lastcmd = "catalogue"; @@ -305,9 +317,15 @@ sub writeout { if (defined($self->{'containersize'})) { print $fd "containersize $self->{'containersize'}\n"; } + if (defined($self->{'containermd5'})) { + print $fd "containermd5 $self->{'containermd5'}\n"; + } if (defined($self->{'doccontainersize'})) { print $fd "doccontainersize $self->{'doccontainersize'}\n"; } + if (defined($self->{'doccontainermd5'})) { + print $fd "doccontainermd5 $self->{'doccontainermd5'}\n"; + } if (defined($self->{'docfiles'}) && (@{$self->{'docfiles'}})) { print $fd "docfiles size=$self->{'docsize'}\n"; foreach my $f (sort @{$self->{'docfiles'}}) { @@ -324,6 +342,9 @@ sub writeout { if (defined($self->{'srccontainersize'})) { print $fd "srccontainersize $self->{'srccontainersize'}\n"; } + if (defined($self->{'srccontainermd5'})) { + print $fd "srccontainermd5 $self->{'srccontainermd5'}\n"; + } if (defined($self->{'srcfiles'}) && (@{$self->{'srcfiles'}})) { print $fd "srcfiles size=$self->{'srcsize'}\n"; foreach (sort @{$self->{'srcfiles'}}) { @@ -587,12 +608,13 @@ sub make_container { } # compute the size my $size = (stat "$destdir/$tarname.lzma") [7]; + my $m = TeXLive::TLUtils::tlmd5("$destdir/$tarname.lzma"); # cleaning up unlink("$tlpobjdir/$self->{'name'}.tlpobj"); rmdir("$tlpobjdir") if $removetlpobjdir; chdir($cwd); ddebug("Done $containername\n"); - return($size); + return($size,$m); } @@ -907,6 +929,21 @@ sub doccontainersize { if (@_) { $self->{'doccontainersize'} = shift } return ( defined($self->{'doccontainersize'}) ? $self->{'doccontainersize'} : -1 ); } +sub containermd5 { + my $self = shift; + if (@_) { $self->{'containermd5'} = shift } + return ( defined($self->{'containermd5'}) ? $self->{'containermd5'} : "" ); +} +sub srccontainermd5 { + my $self = shift; + if (@_) { $self->{'srccontainermd5'} = shift } + return ( defined($self->{'srccontainermd5'}) ? $self->{'srccontainermd5'} : "" ); +} +sub doccontainermd5 { + my $self = shift; + if (@_) { $self->{'doccontainermd5'} = shift } + return ( defined($self->{'doccontainermd5'}) ? $self->{'doccontainermd5'} : "" ); +} sub srcsize { my $self = shift; if (@_) { $self->{'srcsize'} = shift } @@ -1165,13 +1202,17 @@ architectures as keys, similar to the C<runfiles> functions (see above). Futhermore, if the tlpobj is contained ina tlpdb which describes a media where the files are distributed in packed format (usually as .tar.lzma), -there are 3 more possible keys: +there are 6 more possible keys: $tlpobj->containersize $tlpobj->doccontainersize $tlpobj->srccontainersize + $tlpobj->containermd5 + $tlpobj->doccontainermd5 + $tlpobj->srccontainermd5 -describing the respective sizes in bytes. The latter two are only present +describing the respective sizes and md5sums in bytes and as hex string, resp. +The latter two are only present if src/doc file container splitting is activated for that install medium. =head1 OTHER FUNCTIONS |