summaryrefslogtreecommitdiff
path: root/Master/tlpkg/TeXLive
diff options
context:
space:
mode:
Diffstat (limited to 'Master/tlpkg/TeXLive')
-rw-r--r--Master/tlpkg/TeXLive/TLUtils.pm24
1 files changed, 18 insertions, 6 deletions
diff --git a/Master/tlpkg/TeXLive/TLUtils.pm b/Master/tlpkg/TeXLive/TLUtils.pm
index 71df6d1613a..633fa8630da 100644
--- a/Master/tlpkg/TeXLive/TLUtils.pm
+++ b/Master/tlpkg/TeXLive/TLUtils.pm
@@ -877,7 +877,7 @@ sub mkdirhier {
} elsif (defined wantarray) {
return(0);
} else {
- die "$0: $reterror\n";
+ die "$0: $reterror";
}
}
}
@@ -1124,7 +1124,7 @@ sub copy {
chmod $mode, "$outfile";
while ($read = sysread (IN, $buffer, $blocksize)) {
- die "read($infile) failed: $!\n" unless defined $read;
+ die "read($infile) failed: $!" unless defined $read;
$offset = 0;
while ($read) {
$written = syswrite (OUT, $buffer, $read, $offset);
@@ -2399,6 +2399,8 @@ sub setup_programs {
if ($::opt_verbosity >= 1) {
require Data::Dumper;
+ use vars qw($Data::Dumper::Indent $Data::Dumper::Sortkeys
+ $Data::Dumper::Purity); # -w pain
$Data::Dumper::Indent = 1;
$Data::Dumper::Sortkeys = 1; # stable output
$Data::Dumper::Purity = 1; # recursive structures must be safe
@@ -3553,7 +3555,8 @@ sub process_logging_options {
# open log file if one was requested.
if ($opt_logfile) {
- open(TLUTILS_LOGFILE, ">$opt_logfile") || die "open(>$opt_logfile) failed: $!\n";
+ open(TLUTILS_LOGFILE, ">$opt_logfile")
+ || die "open(>$opt_logfile) failed: $!\n";
$::LOGFILE = \*TLUTILS_LOGFILE;
$::LOGFILENAME = $opt_logfile;
}
@@ -4184,7 +4187,7 @@ sub mktexupd {
# check whether files exist
if ($mustexist) {
foreach my $file (keys %files) {
- die "File \"$file\" doesn't exist.\n" if (! -f $file);
+ die "mktexupd: exec file does not exist: $file" if (! -f $file);
}
}
my $delim= (&win32)? ';' : ':';
@@ -4302,10 +4305,19 @@ sub prepend_own_path {
}
+=item C<repository_to_array($r)>
+
+Return hash of tags to urls for space-separated list of repositories
+passed in C<$r>. If passed undef or empty string, die.
+
+=cut
+
sub repository_to_array {
my $r = shift;
my %r;
- my @repos = split ' ', $r;
+ die "internal error, repository_to_array passed nothing (caller="
+ . caller . ")";
+ my @repos = split (' ', $r);
if ($#repos == 0) {
# only one repo, this is the main one!
$r{'main'} = $repos[0];
@@ -4398,7 +4410,7 @@ sub ensure_json_available {
# that didn't work out, use home-grown json
if ($envdefined) {
# environment asks for JSON but cannot be loaded, die!
- tldie("env variable TL_JSONMODE request JSON module but cannot be load!\n");
+ tldie("envvar TL_JSONMODE request JSON module but cannot be loaded!\n");
}
$jsonmode = "texlive";
debug("texlive json module used!\n");