summaryrefslogtreecommitdiff
path: root/Master
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2008-10-22 23:34:39 +0000
committerKarl Berry <karl@freefriends.org>2008-10-22 23:34:39 +0000
commitaff4a0a9550d57eff7ec5e3b40c5288da7b124b8 (patch)
tree2d8fb2d6594716b2a6b0dee37da912ea7504b056 /Master
parenta07631bcbb6aaa84384dcb8eb0529ddb49d79c12 (diff)
TLMedia.pm: message capitalizations.
TLUtils.pm (kpsewhich): remove this function, since '...' fails on Windows. From Ruben Prins, 22 Oct 2008 23:53:37. tlmgr.pl: change the two calls to kpsewhich() to use direct `kpsewhich -var-value=...` invocations, as is done everywhere else. (Also use "re" in logging reinstalls, and msg changes.) Maybe someday we will write a kpse_var_value function to be used everywhere and checks its argument so the single quotes can be safely omitted. git-svn-id: svn://tug.org/texlive/trunk@11029 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master')
-rwxr-xr-xMaster/texmf/scripts/texlive/tlmgr.pl18
-rw-r--r--Master/tlpkg/TeXLive/TLMedia.pm4
-rw-r--r--Master/tlpkg/TeXLive/TLUtils.pm20
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