summaryrefslogtreecommitdiff
path: root/Master/tlpkg
diff options
context:
space:
mode:
authorNorbert Preining <preining@logic.at>2008-08-27 05:42:39 +0000
committerNorbert Preining <preining@logic.at>2008-08-27 05:42:39 +0000
commit4a3863c73a140e84ecf444948c32252d7ee2ae27 (patch)
tree4568ecbbdb4a769d729568c313c6c3eeced67c8a /Master/tlpkg
parente53e16d615a36b885035d3e25b469930aaf8562a (diff)
fix tlmgr-and-gui-fix-on-mirror patch for better GUI handling
git-svn-id: svn://tug.org/texlive/trunk@10407 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/tlpkg')
-rw-r--r--Master/tlpkg/etc/tlmgr-and-gui-fix-on-mirror.diff56
1 files changed, 45 insertions, 11 deletions
diff --git a/Master/tlpkg/etc/tlmgr-and-gui-fix-on-mirror.diff b/Master/tlpkg/etc/tlmgr-and-gui-fix-on-mirror.diff
index c97a42de0fa..c457ac232b7 100644
--- a/Master/tlpkg/etc/tlmgr-and-gui-fix-on-mirror.diff
+++ b/Master/tlpkg/etc/tlmgr-and-gui-fix-on-mirror.diff
@@ -100,7 +100,7 @@ Index: tlmgr.pl
+#
+sub init_tlmedia {
+ if (($location =~ m/$TeXLiveServerURL/) ||
-+ ($location =~ m/^defaultnet$/i)) {
++ ($location =~ m/^ctan$/i)) {
+ $location = give_ctan_mirror();
+ info("Using mirror $location\n");
+ }
@@ -128,15 +128,49 @@ Index: tlmgrgui/tlmgrgui-real.pl
recreateformats => "Re-create all formats",
updatemaps => "Update font map database",
warningnonetupdate => "No updates found.\n\nYour installation is set up to look on the disk for updates.\n\nIf you want to install from the Internet for this one time only, click on the \"Change\" button above and select \"Default Net Location\" (or any other network location you know to be working).\n\nIf you want to change it permanently, go to the \"Configuration\" Tab and change the default installation source.",
-@@ -667,6 +667,11 @@
+@@ -263,7 +263,6 @@
+ if (defined($opt_location)) {
+ $location = $opt_location;
+ }
+-# our $location = $localtlpdb->option_location;
+
+ our $tlmediasrc;
+ our $tlmediatlpdb;
+@@ -271,6 +270,7 @@
+
+ our $balloon = $mw->Balloon();
+
++push @update_function_list, \&check_location_on_ctan;
+ push @update_function_list, \&init_install_media;
+ push @update_function_list, \&create_update_list;
+
+@@ -665,10 +665,11 @@
+ })->pack(-side => "left", -padx => "2m", -pady => "2m");
+ $f1->pack;
my $f = $sw->Frame;
- my $okbutton = $f->Button(-text => 'Ok',
- -command => sub { $location = $entry->get;
-+ # we want to check that if mirror.ctan.org is used
-+ # that we select a mirror once
-+ if ($location =~ m/$TeXLive::TLConfig::TeXLiveServerURL/) {
-+ $location = TeXLive::TLUtils::give_ctan_mirror();
-+ }
- run_update_functions() ;
- $sw->destroy })->pack(-side => 'left', -padx => "2m", -pady => "2m");
+- my $okbutton = $f->Button(-text => 'Ok',
+- -command => sub { $location = $entry->get;
+- run_update_functions() ;
+- $sw->destroy })->pack(-side => 'left', -padx => "2m", -pady => "2m");
++ my $okbutton = $f->Button(-text => ___"ok",
++ -command => sub { $location = $entry->get;
++ run_update_functions();
++ $sw->destroy;
++ })->pack(-side => 'left', -padx => "2m", -pady => "2m");
my $cancelbutton = $f->Button(-text => 'Cancel',
+ -command => sub { $sw->destroy })->pack(-side => 'right', -padx => "2m", -pady => "2m");
+ $f->pack(-expand => 'x');
+@@ -682,6 +683,13 @@
+ }
+ }
+
++sub check_location_on_ctan {
++ # we want to check that if mirror.ctan.org
++ # is used that we select a mirror once
++ if ($location =~ m/$TeXLive::TLConfig::TeXLiveServerURL/) {
++ $location = TeXLive::TLUtils::give_ctan_mirror();
++ }
++}
+
+ 1;
+