summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/scripts
diff options
context:
space:
mode:
authorNorbert Preining <preining@logic.at>2024-02-03 07:34:54 +0000
committerNorbert Preining <preining@logic.at>2024-02-03 07:34:54 +0000
commit1f71e6c5077e471f6646c7cc174cdf05262930a1 (patch)
treec81561fac552b551b34d08199e9bd80377798ff1 /Master/texmf-dist/scripts
parent3603924d92dda78ac41eb8d8078fc1318803ac6e (diff)
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
Diffstat (limited to 'Master/texmf-dist/scripts')
-rwxr-xr-xMaster/texmf-dist/scripts/texlive/tlmgr.pl14
1 files changed, 13 insertions, 1 deletions
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);
+ }
+ }
}
}