summaryrefslogtreecommitdiff
path: root/Master/tlpkg/dev
diff options
context:
space:
mode:
authorNorbert Preining <preining@logic.at>2012-03-21 09:57:01 +0000
committerNorbert Preining <preining@logic.at>2012-03-21 09:57:01 +0000
commitae24c8b86c79bee7eaf87231d65de94e4a42caac (patch)
tree1e2bcd991a5d918998d69f5de6f107c37c8afe50 /Master/tlpkg/dev
parent526b132ff14d0fca24023ada47b59f45f59c1178 (diff)
update multi source support:
preliminary support for multiple repos in tlmgr gui git-svn-id: svn://tug.org/texlive/trunk@25718 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/tlpkg/dev')
-rw-r--r--Master/tlpkg/dev/dev.multi-source-support-v2.patch133
1 files changed, 129 insertions, 4 deletions
diff --git a/Master/tlpkg/dev/dev.multi-source-support-v2.patch b/Master/tlpkg/dev/dev.multi-source-support-v2.patch
index d50839473a5..cc35476e094 100644
--- a/Master/tlpkg/dev/dev.multi-source-support-v2.patch
+++ b/Master/tlpkg/dev/dev.multi-source-support-v2.patch
@@ -1,7 +1,8 @@
---
- texmf/scripts/texlive/tlmgr.pl | 907 ++++++++++++++++++++++++++++++++++-------
- tlpkg/TeXLive/TLPDB.pm | 691 ++++++++++++++++++++++++++++---
- 2 files changed, 1402 insertions(+), 196 deletions(-)
+ texmf/scripts/texlive/tlmgr.pl | 909 ++++++++++++++++++++++++++++++++------
+ texmf/scripts/texlive/tlmgrgui.pl | 57 +-
+ tlpkg/TeXLive/TLPDB.pm | 691 ++++++++++++++++++++++++++--
+ 3 files changed, 1449 insertions(+), 208 deletions(-)
Index: tlpkg/TeXLive/TLPDB.pm
===================================================================
@@ -984,7 +985,16 @@ Index: tlpkg/TeXLive/TLPDB.pm
Index: texmf/scripts/texlive/tlmgr.pl
===================================================================
--- texmf/scripts/texlive/tlmgr.pl.orig 2012-01-31 23:25:04.175697912 +0900
-+++ texmf/scripts/texlive/tlmgr.pl 2012-02-03 13:08:05.773609454 +0900
++++ texmf/scripts/texlive/tlmgr.pl 2012-03-21 17:29:21.810792133 +0900
+@@ -1,7 +1,7 @@
+ #!/usr/bin/env perl
+ # $Id: tlmgr.pl 24419 2011-10-27 14:06:37Z preining $
+ #
+-# Copyright 2008, 2009, 2010, 2011 Norbert Preining
++# Copyright 2008, 2009, 2010, 2011, 2012 Norbert Preining
+ # This file is licensed under the GNU General Public License version 2
+ # or any later version.
+
@@ -124,6 +124,7 @@
"package-logfile" => "=s",
"persistent-downloads" => "!",
@@ -2194,3 +2204,118 @@ Index: texmf/scripts/texlive/tlmgr.pl
=head1 TAXONOMIES
+Index: texmf/scripts/texlive/tlmgrgui.pl
+===================================================================
+--- texmf/scripts/texlive/tlmgrgui.pl.orig 2011-06-16 21:30:37.000000000 +0900
++++ texmf/scripts/texlive/tlmgrgui.pl 2012-03-21 18:54:41.072492333 +0900
+@@ -1,7 +1,7 @@
+ #!/usr/bin/env perl
+ # $Id: tlmgrgui.pl 23011 2011-06-16 12:30:37Z preining $
+ #
+-# Copyright 2009, 2010 Norbert Preining
++# Copyright 2009, 2010, 2011, 2012 Norbert Preining
+ # This file is licensed under the GNU General Public License version 2
+ # or any later version.
+ #
+@@ -62,6 +62,11 @@
+ my $tlpdb_location;
+ my $cmdline_location;
+ my @critical_updates = ();
++
++my $single_repo_mode = 1;
++my %repos;
++my @tags;
++
+ #
+ # shortcuts for padding, expand/fill, and pack sides, anchors
+ my @p_ii = qw/-padx 2m -pady 2m/;
+@@ -97,6 +102,7 @@
+ my $darktext;
+ my $match_entry;
+ my $loaded_text;
++my $loaded_text_button;
+
+ #
+ # communication between filters and the rest
+@@ -261,14 +267,13 @@
+ -selectmode => "none");
+
+ my $button_frame = $mw->Frame;
+- my $but;
+- $but = $button_frame->Button(-text => __("Load default"),
+- -command => sub { setup_location($tlpdb_location); $but->packForget; });
+- $but->pack(
++ $loaded_text_button = $button_frame->Button(-text => __("Load default"),
++ -command => sub { setup_location($tlpdb_location); });
++ $loaded_text_button->pack(
+ -anchor => 'e', -padx => 0, -pady => 0,
+ -ipadx => 0, -ipady => 0, -side => 'right');
+ $loaded_text = $button_frame->Label(
+- -text => __("Loaded repository:") . " " .__("none"));
++ -text => __("Loaded repository:") . " " . __("none"));
+ $loaded_text->pack(-anchor => 'e', -padx => 0, -pady => 0,
+ -ipadx => 0, -ipady => 0, -side => 'right');
+
+@@ -1554,19 +1559,34 @@
+ sub setup_location {
+ my $loc = shift;
+ $location = $loc;
++ # first check if $location contains multiple locations
++ # in this case we go to virtual mode
++ %repos = repository_to_array($location);
++ @tags = keys %repos;
++ if ($#tags == 0) {
++ $single_repo_mode = 1;
++ } else {
++ $single_repo_mode = 0;
++ }
+ update_loaded_location_string();
+ run_update_functions();
+ }
+
+ sub init_install_media {
+ my $newroot = $location;
+- if (defined($remotetlpdb) && ($remotetlpdb->root eq $newroot)) {
++ if (defined($remotetlpdb) && !$remotetlpdb->is_virtual &&
++ ($remotetlpdb->root eq $newroot)) {
+ # nothing to be done
+ } else {
+ $mw->Busy(-recurse => 1);
+- info(__("Loading remote TeX Live Database\nThis may take some time, please wait!") . "\n");
+- $remotetlpdb = TeXLive::TLPDB->new(root => $newroot);
+- info(__("Completed") . ".\n");
++ if ($#tags == 0) {
++ init_tlmedia();
++ #info(__("Loading remote TeX Live Database\nThis may take some time, please wait!") . "\n");
++ #$remotetlpdb = TeXLive::TLPDB->new(root => $newroot);
++ #info(__("Completed") . ".\n");
++ } else {
++ init_tlmedia();
++ }
+ $mw->Unbusy;
+ if (!defined($remotetlpdb)) {
+ # something went badly wrong, maybe the newroot is wrong?
+@@ -2216,7 +2236,22 @@
+ sub update_loaded_location_string {
+ my $arg = shift;
+ $arg || ($arg = $location);
+- $loaded_text->configure(-text => __("Loaded repository:") . " " . $arg);
++ my %repos = repository_to_array($arg);
++ my @tags = keys %repos;
++ my $locstr;
++ if ($#tags >= 0) {
++ $locstr = $repos{'main'};
++ for my $t (keys %repos) {
++ if ($t ne 'main') {
++ $locstr .= " $repos{$t}";
++ }
++ }
++ $loaded_text_button->configure(-text => __("multiple repositories"));
++ } else {
++ $loaded_text_button->configure(-text => $arg);
++ }
++ $loaded_text->configure(-text => __("Loaded repository:"));
++ $loaded_text_button->configure(-command => sub { show_repositories($arg); });
+ }
+
+ sub run_update_functions {