From 1f71e6c5077e471f6646c7cc174cdf05262930a1 Mon Sep 17 00:00:00 2001 From: Norbert Preining Date: Sat, 3 Feb 2024 07:34:54 +0000 Subject: tlmgr: only keep one hashed database for tlcontrib from mirror.ctan git-svn-id: svn://tug.org/texlive/trunk@69686 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/scripts/texlive/tlmgr.pl | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'Master/texmf-dist/scripts') diff --git a/Master/texmf-dist/scripts/texlive/tlmgr.pl b/Master/texmf-dist/scripts/texlive/tlmgr.pl index e1ec0d505c4..ec6715a38e1 100755 --- a/Master/texmf-dist/scripts/texlive/tlmgr.pl +++ b/Master/texmf-dist/scripts/texlive/tlmgr.pl @@ -7469,12 +7469,17 @@ FROZEN_MSG # save remote database if it is a net location # make sure that the writeout of the tlpdb is done in UNIX mode # since otherwise the checksum will change. + # For the main tlnet and tlcontrib, both of which are distributed + # via mirror.ctan, we make sure that we have only one hashed version + # of the tlpdb saved locally. if (!$local_copy_tlpdb_used && $location =~ m;^(https?|ftp)://;) { my $loc_digest = TeXLive::TLCrypto::tl_short_digest($location); my $loc_copy_of_remote_tlpdb = ($is_main ? "$Master/$InfraLocation/texlive.tlpdb.main.$loc_digest" : - "$Master/$InfraLocation/texlive.tlpdb.$loc_digest"); + ($location =~ m;texlive/tlcontrib/?$; ? + "$Master/$InfraLocation/texlive.tlpdb.tlcontrib.$loc_digest" : + "$Master/$InfraLocation/texlive.tlpdb.$loc_digest")); my $tlfh; if (!open($tlfh, ">:unix", $loc_copy_of_remote_tlpdb)) { # that should be only a debug statement, since a user without @@ -7493,6 +7498,13 @@ FROZEN_MSG unlink($fn); } } + # Do the same for tlcontrib, which is also distributed via mirror. + if ($location =~ m;texlive/tlcontrib/?$;) { + for my $fn (<"$Master/$InfraLocation/texlive.tlpdb.tlcontrib.*">) { + next if ($fn eq $loc_copy_of_remote_tlpdb); + unlink($fn); + } + } } } -- cgit v1.2.3