diff options
author | Karl Berry <karl@freefriends.org> | 2016-04-21 19:08:52 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2016-04-21 19:08:52 +0000 |
commit | 5aa28567dca799a746db5c20e400edcfc4031be1 (patch) | |
tree | 58ef62fb29b5c4f38158036b3d640c42ce73f2df /Master/tlpkg/TeXLive/TLPDB.pm | |
parent | 525c559215b4d53a04b0f291b9c45619bc0f0f21 (diff) |
TLCrypto.pm: new module with all the functions using digests/gpg,
extracted from TLUtils.pm.
TLUtils.pm: functions moved from here, change calls.
TLConfig.pm: doc.
TLPDB.pm, TLPOBJ.pm,
install-tl, tlmgr.pl: use TLCrypto, change calls, doc.
git-svn-id: svn://tug.org/texlive/trunk@40652 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/tlpkg/TeXLive/TLPDB.pm')
-rw-r--r-- | Master/tlpkg/TeXLive/TLPDB.pm | 22 |
1 files changed, 7 insertions, 15 deletions
diff --git a/Master/tlpkg/TeXLive/TLPDB.pm b/Master/tlpkg/TeXLive/TLPDB.pm index 2e85fb82e1f..638ed15e826 100644 --- a/Master/tlpkg/TeXLive/TLPDB.pm +++ b/Master/tlpkg/TeXLive/TLPDB.pm @@ -7,15 +7,8 @@ package TeXLive::TLPDB; my $svnrev = '$Revision$'; -my $_modulerevision; -if ($svnrev =~ m/: ([0-9]+) /) { - $_modulerevision = $1; -} else { - $_modulerevision = "unknown"; -} -sub module_revision { - return $_modulerevision; -} +my $_modulerevision = ($svnrev =~ m/: ([0-9]+) /) ? $1 : "unknown"; +sub module_revision { return $_modulerevision; } =pod @@ -370,7 +363,7 @@ sub from_file { # # before we open and proceed, verify the downloaded file if ($params{'verify'} && $media ne 'local_uncompressed') { - my ($r, $m) = TeXLive::TLUtils::verify_checksum($tlpdbfile, "$path.$TeXLive::TLConfig::ChecksumExtension"); + my ($r, $m) = TeXLive::TLCrypto::verify_checksum($tlpdbfile, "$path.$TeXLive::TLConfig::ChecksumExtension"); if ($r == 1) { tldie("$0: checksum error when downloading $tlpdbfile from $path: $m\n"); } elsif ($r == 2) { @@ -388,7 +381,7 @@ sub from_file { open($retfh, "<$tlpdbfile") || die "$0: open($tlpdbfile) failed: $!"; } else { if ($params{'verify'} && $media ne 'local_uncompressed') { - my ($r, $m) = TeXLive::TLUtils::verify_checksum($path, "$path.$TeXLive::TLConfig::ChecksumExtension"); + my ($r, $m) = TeXLive::TLCrypto::verify_checksum($path, "$path.$TeXLive::TLConfig::ChecksumExtension"); if ($r == 1) { tldie("$0: checksum error when downloading $tlpdbfile from $path: $m\n"); } elsif ($r == 2) { @@ -2733,10 +2726,9 @@ C<00texlive.config.tlpsrc>. =head1 SEE ALSO -The modules L<TeXLive::TLPSRC>, L<TeXLive::TLPOBJ>, -L<TeXLive::TLTREE>, L<TeXLive::TLUtils> and the -document L<Perl-API.txt> and the specification in the TeX Live -repository trunk/Master/tlpkg/doc/. +The modules L<TeXLive::TLPSRC>, L<TeXLive::TLPOBJ>, L<TeXLive::TLTREE>, +L<TeXLive::TLUtils>, etc., and the documentation in the repository: +C<Master/tlpkg/doc/>. =head1 AUTHORS AND COPYRIGHT |