summaryrefslogtreecommitdiff
path: root/Master
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2008-09-11 21:24:09 +0000
committerKarl Berry <karl@freefriends.org>2008-09-11 21:24:09 +0000
commitc0c80ba5cb9c4cda54e165f116dbf2708eea9065 (patch)
treefd943a543bb8fa5c41dcf1ffa3d7bba748805684 /Master
parenta35d7aed0a378230ad54cdbd9669ba041c60b6c6 (diff)
(init_local_db): do not use abs_path's
normalization of a url to the empty string. (init_tlmedia): always report the installation location after it's been determine. Use "installation location" instead of "source" more consistently in various messages. git-svn-id: svn://tug.org/texlive/trunk@10560 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master')
-rwxr-xr-xMaster/texmf/scripts/texlive/tlmgr.pl31
1 files changed, 18 insertions, 13 deletions
diff --git a/Master/texmf/scripts/texlive/tlmgr.pl b/Master/texmf/scripts/texlive/tlmgr.pl
index 82923739824..1b00f97bd7b 100755
--- a/Master/texmf/scripts/texlive/tlmgr.pl
+++ b/Master/texmf/scripts/texlive/tlmgr.pl
@@ -839,11 +839,11 @@ sub action_option {
if ($loc) {
# normalize the path
$loc = abs_path($loc);
- print "Setting default installation source to $loc!\n";
+ print "Setting default installation location to $loc!\n";
$localtlpdb->option_location($loc);
$localtlpdb->save;
} else {
- print "Default installation source: ", $localtlpdb->option_location, "\n";
+ print "Default installation location: ", $localtlpdb->option_location, "\n";
}
} elsif ($what =~ m/^docfiles$/i) {
# changes the default docfiles
@@ -876,7 +876,7 @@ sub action_option {
print "Create formats on installation: ", $localtlpdb->option_create_formats, "\n";
}
} elsif ($what =~ m/^show$/i) {
- print "Default installation source: ", $localtlpdb->option_location, "\n";
+ print "Default installation location: ", $localtlpdb->option_location, "\n";
print "Create formats on installation: ", ($localtlpdb->option_create_formats ? "yes": "no"), "\n";
print "Install documentation files: ", ($localtlpdb->option_install_docfiles ? "yes": "no"), "\n";
print "Install source files: ", ($localtlpdb->option_install_srcfiles ? "yes": "no"), "\n";
@@ -1012,10 +1012,13 @@ sub action_generate {
return;
}
+# set global $location variable.
+# if we cannot read tlpdb, die if arg SHOULD_I_DIE is true.
+#
sub init_local_db {
my ($should_i_die) = @_;
- $localtlpdb = TeXLive::TLPDB->new ("root" => "$Master");
- die("cannot find tlpdb!") unless (defined($localtlpdb));
+ $localtlpdb = TeXLive::TLPDB->new ("root" => $Master);
+ die("cannot find tlpdb at $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.
if (!setup_programs("$Master/tlpkg/installer", $localtlpdb->option_platform)) {
@@ -1038,7 +1041,11 @@ sub init_local_db {
die("No installation source found, nor in the texlive.tlpdb nor on the cmd line.\nPlease specify one!");
}
# normalize the location
- $location = abs_path($location);
+ my $abs_location = abs_path($location);
+
+ # however, if we were given a url, that will get "normalized" to the
+ # empty string, it not being a path. Restore the original value if so.
+ $location = $abs_location if $abs_location;
}
sub action_gui {
@@ -1206,22 +1213,20 @@ sub action_uninstall {
}
#
-# init_tlmedia
-# initialize a tlmedia object and returns it, or dies
+# initialize the global $tlmediasrc object, or die.
+# uses the global $location.
#
sub init_tlmedia {
if (($location =~ m/$TeXLiveServerURL/) ||
($location =~ m/^ctan$/i)) {
$location = give_ctan_mirror();
- info("Using mirror $location\n");
}
- # $tlmediasrc is a global function
+ info("tlmgr: installation location $location\n");
+ # $tlmediasrc is a global variable
$tlmediasrc = TeXLive::TLMedia->new($location);
die($loadmediasrcerror . $location) unless defined($tlmediasrc);
}
-
-
#
# return all the directories from which all content will be removed
@@ -1516,7 +1521,7 @@ In the second form, if I<value> is missing the setting for I<key> is
displayed. If I<value> is present, I<key> is set to I<value>.
Possible values for I<key> are:
-C<location> (default installation source),
+C<location> (default installation location),
C<formats> (create formats at installation time),
C<docfiles> (install documentation files),
C<srcfiles> (install source files).