diff options
-rwxr-xr-x | Master/texmf/scripts/texlive/tlmgr.pl | 18 | ||||
-rw-r--r-- | Master/tlpkg/TeXLive/TLMedia.pm | 4 | ||||
-rw-r--r-- | Master/tlpkg/TeXLive/TLUtils.pm | 20 |
3 files changed, 13 insertions, 29 deletions
diff --git a/Master/texmf/scripts/texlive/tlmgr.pl b/Master/texmf/scripts/texlive/tlmgr.pl index 2e7903fa157..bb8cf23c166 100755 --- a/Master/texmf/scripts/texlive/tlmgr.pl +++ b/Master/texmf/scripts/texlive/tlmgr.pl @@ -1239,18 +1239,19 @@ sub action_install { @packs = $tlmediatlpdb->expand_dependencies($localtlpdb, @packs) unless $opt_nodepends; } foreach my $pkg (sort @packs) { + my $re = ""; if (defined($localtlpdb->get_package($pkg))) { if ($opt_reinstall) { - info("re-"); + $re = "re-"; } else { debug("already installed: $pkg\n"); next; } } - info("install: $pkg\n"); + info("${re}install: $pkg\n"); if (!$opt_dry) { merge_into(\%ret, $tlmediasrc->install_package($pkg, $localtlpdb)); - logpackage("install: $pkg"); + logpackage("${re}install: $pkg"); } } if ($opt_dry) { @@ -1448,8 +1449,8 @@ sub action_generate { my $what = shift @ARGV; init_local_db(); - my $TEXMFSYSVAR = kpsewhich("TEXMFSYSVAR"); - my $TEXMFLOCAL = kpsewhich("TEXMFLOCAL"); + chomp (my $TEXMFSYSVAR = `kpsewhich -var-value=TEXMFSYSVAR`); + chomp (my $TEXMFLOCAL = `kpsewhich -var-value=TEXMFLOCAL`); if ($what =~ m/^language(\.dat|\.def)?$/i) { if ($what =~ m/^language(\.dat)?$/i) { @@ -1491,10 +1492,11 @@ sub action_generate { sub init_local_db { my ($should_i_die) = @_; $localtlpdb = TeXLive::TLPDB->new ("root" => $Master); - die("cannot find tlpdb at $Master!") unless (defined($localtlpdb)); + die("cannot find tlpdb in $Master") unless (defined($localtlpdb)); # setup the programs, for win32 we need the shipped wget/lzma etc, so we # pass the location of these files to setup_programs. - my $ret = setup_programs("$Master/tlpkg/installer", $localtlpdb->option_platform); + my $ret = setup_programs("$Master/tlpkg/installer", + $localtlpdb->option_platform); if ($ret == -1) { tlwarn("no binary of lzmadec for $::_platform_ detected.\n"); if (defined($should_i_die) && $should_i_die) { @@ -1608,7 +1610,7 @@ sub action_uninstall { $texmfsysvar = `kpsewhich -var-value=TEXMFSYSVAR`; chomp($texmfsysvar); $texmflocal = `kpsewhich -var-value=TEXMFLOCAL`; chomp($texmflocal); } else { - die("Cannot find tlpdb in $Master!"); + die("cannot find tlpdb in $Master"); } # remove the links missing if ($opt_symlinks) { diff --git a/Master/tlpkg/TeXLive/TLMedia.pm b/Master/tlpkg/TeXLive/TLMedia.pm index 94188f5c0fa..78234641097 100644 --- a/Master/tlpkg/TeXLive/TLMedia.pm +++ b/Master/tlpkg/TeXLive/TLMedia.pm @@ -100,11 +100,11 @@ sub install_package { debug("installed $pkg from fallback"); return $ret; } else { - tlwarn("$0: cannot find package $pkg (in fallback, either)\n"); + tlwarn("$0: Cannot find package $pkg (in fallback, either)\n"); return 0; } } else { - tlwarn("$0: cannot find package $pkg\n"); + tlwarn("$0: Cannot find package $pkg\n"); return 0; } } else { diff --git a/Master/tlpkg/TeXLive/TLUtils.pm b/Master/tlpkg/TeXLive/TLUtils.pm index 3c6ff203103..e501337f545 100644 --- a/Master/tlpkg/TeXLive/TLUtils.pm +++ b/Master/tlpkg/TeXLive/TLUtils.pm @@ -1573,27 +1573,9 @@ sub process_logging_options { =pod - -=item C<kpsewhich($varname)> - -This function expands the variable name using C<kpsewhich --var-value>. The variable name should not have a leading $. The -C<kpsewhich> binary has to be in the path. - -=cut - -sub kpsewhich { - my $var = shift; - my $ret = `kpsewhich -var-value='$var'`; - chomp ($ret); - return $ret; -} - -=pod - =item C<welcome> -The welcome message. +Return the welcome message. =cut |