summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2021-07-18 22:13:22 +0000
committerKarl Berry <karl@freefriends.org>2021-07-18 22:13:22 +0000
commita626b6e5d51e25b398d89cb2f679a3743c91a9f5 (patch)
treee80136ef64421840bf2ca32958446d76a90571e5
parentef3242e48c3652c1a7641d6d304f45fed40159a9 (diff)
maillog:Jul 7 23:31:37 tug sendmail[32133]: 167LVCWJ032133: from=<texhax-bounces+r.turner=auckland.ac.nz@tug.org>, size=3336, class=-30, nrcpts=3, msgid=<bc257caf-9f8a-3d7-6f42-86df1922669@tug.org>, proto=ESMTP, daemon=MTA, relay=localhost [127.0.0.1]
maillog:Jul 7 23:31:41 tug sendmail[32499]: 167LVCWJ032133: to=<r.turner@auckland.ac.nz>, delay=00:00:04, xdelay=00:00:04, mailer=esmtp, pri=237336, relay=au-smtp-inbound-2.mimecast.com. [103.13.69.122], dsn=2.0.0, stat=Sent (SmtpThread-15917402-1625693501741@au-mta-95.au.mimecast.lan Received OK [bBwoTzxBNLaVKr_ihVkItg.au95]) git-svn-id: svn://tug.org/texlive/trunk@59982 c570f23f-e606-0410-a88d-b1316a301751
-rwxr-xr-xMaster/texmf-dist/scripts/texlive/fmtutil.pl9
-rw-r--r--Master/tlpkg/TeXLive/TLUtils.pm12
2 files changed, 10 insertions, 11 deletions
diff --git a/Master/texmf-dist/scripts/texlive/fmtutil.pl b/Master/texmf-dist/scripts/texlive/fmtutil.pl
index c3ef51a67f7..410c8bbea66 100755
--- a/Master/texmf-dist/scripts/texlive/fmtutil.pl
+++ b/Master/texmf-dist/scripts/texlive/fmtutil.pl
@@ -36,7 +36,6 @@ my $version = "r$svnrev ($lastchdate)";
use strict;
use Getopt::Long qw(:config no_autoabbrev ignore_case_always);
use File::Basename;
-use File::Copy;
use File::Spec;
use Cwd;
@@ -736,7 +735,7 @@ sub rebuild_one_format {
if ($poolfile && -f $poolfile) {
print_verbose("attempting to create localized format "
. "using pool=$pool and tcx=$tcx.\n");
- File::Copy::copy($poolfile, "$eng.pool");
+ TeXLive::TLUtils::copy("-f", $poolfile, "$eng.pool");
$tcxflag = "-translate-file=$tcx" if ($tcx);
$localpool = 1;
}
@@ -798,7 +797,7 @@ sub rebuild_one_format {
# to make sure that in SElinux enabled cases the rules of
# the destination directory are applied.
# See https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=900580
- if (File::Copy::copy($logfile, "$destdir/$logfile")) {
+ if (TeXLive::TLUtils::copy("-f", $logfile, "$destdir/$logfile")) {
print_info("log file copied to: $destdir/$logfile\n");
} else {
print_deferred_error("cannot copy log $logfile to: $destdir\n")
@@ -846,7 +845,7 @@ sub rebuild_one_format {
# package dependencies for each format. Unfortunately omega-based
# engines gratuitiously changed the extension from .fls to .ofl.
my $recfile = $fmt . ($fmt =~ m/^(aleph|lamed)$/ ? ".ofl" : ".fls");
- if (!File::Copy::copy($recfile, "$destdir/$recfile")) {
+ if (! TeXLive::TLUtils::copy("-f", $recfile, "$destdir/$recfile")) {
print_deferred_error("cannot copy recorder $recfile to: $destdir\n");
}
}
@@ -856,7 +855,7 @@ sub rebuild_one_format {
# we check whether the next command **would** create a new file,
# and if it succeeded, we set the actual flag.
my $possibly_warn = ($opts{'user'} && ! -r $destfile);
- if (File::Copy::copy($fmtfile, $destfile )) {
+ if (TeXLive::TLUtils::copy("-f", $fmtfile, $destfile)) {
print_info("$destfile installed.\n");
$first_time_creation_in_usermode = $possibly_warn;
#
diff --git a/Master/tlpkg/TeXLive/TLUtils.pm b/Master/tlpkg/TeXLive/TLUtils.pm
index 80d136501ef..e1c07b227b2 100644
--- a/Master/tlpkg/TeXLive/TLUtils.pm
+++ b/Master/tlpkg/TeXLive/TLUtils.pm
@@ -1184,14 +1184,14 @@ time stamps are preserved and symlinks are created on Unix systems. On
Windows, C<(-l $file)> will never return 'C<true>' and so symlinks will
be (uselessly) copied as regular files.
-If the argument is C<"-L"> and C<$file> is a symlink, the link is
+If the first argument is C<"-L"> and C<$file> is a symlink, the link is
dereferenced before the copying is done. (If both C<"-f"> and C<"-L">
-are desired, they must be given in that order, although the current code
-has no need to do this.)
+are desired, they must be given in that order, although the codebase
+currently has no need to do this.)
-C<copy> invokes C<mkdirhier> if target directories do not exist. Files
-have mode C<0777> if they are executable and C<0666> otherwise, with
-the set bits in I<umask> cleared in each case.
+C<copy> invokes C<mkdirhier> if target directories do not exist. Files
+start with mode C<0777> if they are executable and C<0666> otherwise,
+with the set bits in I<umask> cleared in each case.
C<$file> can begin with a C<file:/> prefix.