summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Master/tlpkg/etc/tlmgr-and-gui-fix-on-mirror.diff176
1 files changed, 0 insertions, 176 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
deleted file mode 100644
index c457ac232b7..00000000000
--- a/Master/tlpkg/etc/tlmgr-and-gui-fix-on-mirror.diff
+++ /dev/null
@@ -1,176 +0,0 @@
-Index: tlmgr.pl
-===================================================================
---- tlmgr.pl (revision 10402)
-+++ tlmgr.pl (working copy)
-@@ -37,7 +37,7 @@
- use TeXLive::TLUtils;
- use TeXLive::TLWinGoo;
- use TeXLive::TLPostActions;
--TeXLive::TLUtils->import( qw(kpsewhich member win32 merge_into copy log) );
-+TeXLive::TLUtils->import( qw(kpsewhich member info give_ctan_mirror win32 merge_into copy log debug) );
- use Cwd qw/abs_path/;
- use Pod::Usage;
- use Getopt::Long qw(:config no_autoabbrev require_order);
-@@ -416,8 +416,7 @@
- my $installed = 0;
- if (!$tlp) {
- if (!$tlmediatlpdb) {
-- $tlmediasrc = TeXLive::TLMedia->new($location);
-- die($loadmediasrcerror . $location) unless defined($tlmediasrc);
-+ init_tlmedia();
- $tlmediatlpdb = $tlmediasrc->tlpdb;
- }
- $tlp = $tlmediatlpdb->get_package($pkg);
-@@ -449,8 +448,7 @@
- my $tlpdb;
- init_local_db();
- if ($opt_global) {
-- $tlmediasrc = TeXLive::TLMedia->new($location);
-- die($loadmediasrcerror . $location) unless defined($tlmediasrc);
-+ init_tlmedia();
- $tlpdb = $tlmediasrc->tlpdb;
- } else {
- $tlpdb = $localtlpdb;
-@@ -612,8 +610,7 @@
- "backupdir=s" => \$opt_backupdir,
- "dry-run" => \$opt_dry) or pod2usage(2);
- my %ret;
-- $tlmediasrc = TeXLive::TLMedia->new($location);
-- die($loadmediasrcerror . $location) unless defined($tlmediasrc);
-+ init_tlmedia();
- my $mediatlpdb = $tlmediasrc->tlpdb;
- my @todo;
- if ($opt_all || $opt_list) {
-@@ -636,7 +633,7 @@
- my $rev = $tlp->revision;
- my $mediatlp = $mediatlpdb->get_package($pkg);
- if (!defined($mediatlp)) {
-- print "$pkg cannot be found in $location\n";
-+ debug("$pkg cannot be found in $location\n");
- next;
- }
- my $mediarev = $mediatlp->revision;
-@@ -763,8 +760,7 @@
- GetOptions("no-depends" => \$opt_nodepends,
- "dry-run" => \$opt_dry) or pod2usage(2);
- my %ret;
-- $tlmediasrc = TeXLive::TLMedia->new($location);
-- die($loadmediasrcerror . $location) unless defined($tlmediasrc);
-+ init_tlmedia();
- foreach my $pkg (@ARGV) {
- if ($opt_dry) {
- print "install: $pkg\n";
-@@ -784,8 +780,7 @@
- init_local_db();
- my $what = shift @ARGV;
- $what || ($what = "");
-- $tlmediasrc = TeXLive::TLMedia->new($location);
-- die($loadmediasrcerror . $location) unless defined($tlmediasrc);
-+ init_tlmedia();
- my @whattolist;
- if ($what =~ m/^collection/i) {
- @whattolist = $tlmediasrc->tlpdb->collections;
-@@ -881,8 +876,7 @@
- if ($what =~ m/^list$/i) {
- # list the available architectures
- # initialize the TLMedia from $location
-- $tlmediasrc = TeXLive::TLMedia->new($location);
-- die($loadmediasrcerror . $location) unless defined($tlmediasrc);
-+ init_tlmedia();
- my $mediatlpdb = $tlmediasrc->tlpdb;
- my @already_installed_arch = $localtlpdb->available_architectures;
- print "Available architectures:\n";
-@@ -897,8 +891,7 @@
- print "You can add new architectures with tlmgr arch add arch1 arch2\n";
- exit(0);
- } elsif ($what =~ m/^add$/i) {
-- $tlmediasrc = TeXLive::TLMedia->new($location);
-- die($loadmediasrcerror . $location) unless defined($tlmediasrc);
-+ init_tlmedia();
- my $mediatlpdb = $tlmediasrc->tlpdb;
- my @already_installed_arch = $localtlpdb->available_architectures;
- my @available_arch = $mediatlpdb->available_architectures;
-@@ -1183,7 +1176,24 @@
- system("rmdir", "--ignore-fail-on-non-empty", "$texdir");
- }
-
-+#
-+# init_tlmedia
-+# initialize a tlmedia object and returns it, or dies
-+#
-+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
-+ $tlmediasrc = TeXLive::TLMedia->new($location);
-+ die($loadmediasrcerror . $location) unless defined($tlmediasrc);
-+}
-
-+
-+
-+
- #
- # return all the directories from which all content will be removed
- #
-Index: tlmgrgui/tlmgrgui-real.pl
-===================================================================
---- tlmgrgui/tlmgrgui-real.pl (revision 10402)
-+++ tlmgrgui/tlmgrgui-real.pl (working copy)
-@@ -116,7 +116,7 @@
- loadremotetlpdbwait => "Loading remote TeX Live Database\nThis may take some time, please wait!",
- runupdater => "Some package cannot be updated using the GUI!\nPlease run TEXROOT/tlpkg/installer/updater.bat once,\notherwise the updates will not be complete!\nNOTE: You have to QUIT this program first!",
- actions => "Actions",
-- reinitlsr => "Re-initalise file database",
-+ reinitlsr => "Re-initialize file database",
- 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.",
-@@ -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;
-- 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;
-