summaryrefslogtreecommitdiff
path: root/Master
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2011-05-09 21:54:37 +0000
committerKarl Berry <karl@freefriends.org>2011-05-09 21:54:37 +0000
commit5f96f22a50edb09022126c459b60bf62451f4040 (patch)
tree1b2f1b3be11e8925fb361a80c4c06b84a32d1eb5 /Master
parente47a1d0b480dfb19fad0512c7425ac98d83b566a (diff)
cleanup/archive
git-svn-id: svn://tug.org/texlive/trunk@22388 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master')
-rw-r--r--Master/tlpkg/dev/README17
-rw-r--r--Master/tlpkg/dev/archive/dev.split-desktop-integration.README (renamed from Master/tlpkg/dev/dev.split-desktop-integration.README)0
-rw-r--r--Master/tlpkg/dev/archive/dev.split-desktop-integration.patch (renamed from Master/tlpkg/dev/dev.split-desktop-integration.patch)0
-rw-r--r--Master/tlpkg/dev/archive/dev.usermode-tlmgr.README (renamed from Master/tlpkg/dev/dev.usermode-tlmgr.README)0
-rw-r--r--Master/tlpkg/dev/archive/dev.usermode-tlmgr.patch (renamed from Master/tlpkg/dev/dev.usermode-tlmgr.patch)0
-rw-r--r--Master/tlpkg/dev/dev.multi-source-support.README127
-rw-r--r--Master/tlpkg/dev/dev.multi-source-support.patch722
-rw-r--r--Master/tlpkg/dev/dev.multi-source-support.patches/001-extend-tlpdb-option-location-field-add-action128
-rw-r--r--Master/tlpkg/dev/dev.multi-source-support.patches/010-add-action-candidates-mediahash243
-rw-r--r--Master/tlpkg/dev/dev.multi-source-support.patches/020-add-pinning-file-support156
-rw-r--r--Master/tlpkg/dev/dev.multi-source-support.patches/series3
-rw-r--r--Master/tlpkg/dev/tlwingoonew/README3
-rw-r--r--Master/tlpkg/dev/tlwingoonew/testw32132
-rwxr-xr-xMaster/tlpkg/dev/tlwingoonew/testw32.bat5
14 files changed, 5 insertions, 1531 deletions
diff --git a/Master/tlpkg/dev/README b/Master/tlpkg/dev/README
index 34e56a51890..df815ce9872 100644
--- a/Master/tlpkg/dev/README
+++ b/Master/tlpkg/dev/README
@@ -4,18 +4,10 @@ $Id$
lib
tlpkg libraries in other languages, none usable
-dev.multi-source-support.patch
-dev.multi-source-support.README
- see dev.multi-source-support.README
-
dev.tempfile-for-tlpdb.patch
trial to make symlink attacks harder by using tmpfiles instead
of the always same filename when downloading the tlpdb.xz
-dev.usermode-tlmgr.patch
-dev.usermode-tlmgr.README
- see dev.usermode-tlmgr.README
-
makeself-runscript.sh
a run.sh for a makeself (tlmgr-update-latest.sh) that even
allows installation of texlive by installing the bare bone
@@ -32,16 +24,17 @@ mktextex.pl
mktexupd.texlua
rewrite of mktexupd in texlua
+srclist.txt
+ List of duplicated files to keep in sync. Read by cron.tl.
+
tlmgr1.pl-with-recreate-tlpdb
version of tlmgr.pl as shipped with TL2008 DVD, but with the
recreate-tlpdb action added, so that people can go back to
some working state after the tlpdb has been hosed.
tlnet-disabled-packages.txt
- this file collects packages that should NOT be updated in
- tlnet, read by tl-update-containers.
-
- This is probably the wrong place for this file, but where else?
+ this file specifies packages that should NOT be updated in
+ tlnet. It is read by tl-update-containers.
tlrepo-from-minimals.pl
Semi-working (WIP) script that automatically creates a
diff --git a/Master/tlpkg/dev/dev.split-desktop-integration.README b/Master/tlpkg/dev/archive/dev.split-desktop-integration.README
index ee3c6005306..ee3c6005306 100644
--- a/Master/tlpkg/dev/dev.split-desktop-integration.README
+++ b/Master/tlpkg/dev/archive/dev.split-desktop-integration.README
diff --git a/Master/tlpkg/dev/dev.split-desktop-integration.patch b/Master/tlpkg/dev/archive/dev.split-desktop-integration.patch
index 3020684ffea..3020684ffea 100644
--- a/Master/tlpkg/dev/dev.split-desktop-integration.patch
+++ b/Master/tlpkg/dev/archive/dev.split-desktop-integration.patch
diff --git a/Master/tlpkg/dev/dev.usermode-tlmgr.README b/Master/tlpkg/dev/archive/dev.usermode-tlmgr.README
index 9f1ae445d77..9f1ae445d77 100644
--- a/Master/tlpkg/dev/dev.usermode-tlmgr.README
+++ b/Master/tlpkg/dev/archive/dev.usermode-tlmgr.README
diff --git a/Master/tlpkg/dev/dev.usermode-tlmgr.patch b/Master/tlpkg/dev/archive/dev.usermode-tlmgr.patch
index 1ae6bbe98ed..1ae6bbe98ed 100644
--- a/Master/tlpkg/dev/dev.usermode-tlmgr.patch
+++ b/Master/tlpkg/dev/archive/dev.usermode-tlmgr.patch
diff --git a/Master/tlpkg/dev/dev.multi-source-support.README b/Master/tlpkg/dev/dev.multi-source-support.README
deleted file mode 100644
index e0b3af6f3aa..00000000000
--- a/Master/tlpkg/dev/dev.multi-source-support.README
+++ /dev/null
@@ -1,127 +0,0 @@
-Multi source support in TeX Live
---------------------------------
-(Work in progress)
-
-(completely independent from generalized revisions)
-[karl: good.]
-
-1) extension of the location part in 00texlive-installation.config
-------------------------------------------------------------------
-
-Every line can contain an aditional tag ([a-z0-9,]+) after the actual location,
-examples:
- depend location:http://mirror.ctan.org/systems/texlive/tlnet/2008 ctan
- depend location:http://server.local.uni/texlive/packages department
-
-done
-[karl: how do these lines get added? tool, manual editing of tlpdb?]
-[norbert: tlmgr location url1 url2=tag1 url3 url4=tag2 ...
- # sets url1, url2 with tag tag1, url3, and url4 with tag2
- # as the list of available locations
- # backward compatibility with former usage
- tlmgr location add ...
- # adds locations to the list of available locs
- tlmgr location remove ...
- # removes locations ...
-]
-[k2: well, there is no "location" action now, so compatibility isn't an issue.
-having this new action seems like a good idea. tlmgr option location foo
-will just become a synonm for tlmgr location add foo. yes?]
-
-2) invocation of tlmgr/installation
------------------------------------
-
-Normally tlmgr will install the candidate with the highest revision number.
-[karl: ok, given pinning below. otherwise i don't like it.]
-[norbert: Why, can you explain why you don't like that the highest revision
- number wins?]
-[k2: because it is random, except in the one case where you want to use
- it. that is, i understand that you want to copy a tl package, make
- some local fixes, and install it locally, keeping track of the rev
- number. that's fine for you. but there's no way most people are
- going to bother with that. if mojca sets up a context repo, say,
- those revision numbers are (should be) completely independent of tl's
- revision numbers. therefore, all the context packages should be
- pinned to the context repo, so the context repo always wins. without
- pinning, it would be an unmaintainable situation.]
-
-That will be achieved by
- tlmgr install package
-
-If you want to install a package from a specific mirror you can do
- tlmgr install package/TAG
- (tlmgr install package/SOURCE)
-where TAG is the tag given above, and SOURCE is the full source address.
-So continuing the above example we could call
- tlmgr install package/department
-or
- tlmgr install package/http://server.local.uni/texlive/packages
-(maybe we don't allow the later form ...?)
-[karl: well, if it's done, then I see no reason not to support it.]
-
-done
-
-3) pinning
-----------
-
-tlmgr will evaluate an additional config file
- ROOT/tlpkg/pinning
-or the one given via cmdline
- tlmgr -pins /path/to/pinning/file
-[karl: maybe it should be found in texmf-local/tlpkg? look there
- before ROOT/tlpkg but allow both? maybe other places too. have to think
- about it. Also, the filename should be something clearer, perhaps
- tlpkgpins.txt.]
-[norbert: agreed, that texmf-local might be a better place. should be
- thought out]
-
-That file contains lines
- package:tag:pin
-where package is a package name or * (or regexp? or glob context* eg?)
-[glob is better than regexp in this case I think]
-and tag is [a-z0-9,]+ as for tags above, or *,
-and pin is an integer between 0 and 1000.
-
-Now the evaluation *which* package will be installed will be done as follows:
-
-1) create the list of candidates, i.e., all tlpobj from different sources
- where the name matches the one to be installed
-[karl: if a package is pinned to a single source (99% case, seems to
- me), the other sources (e.g., default ctan) won't even be considered, right?]
-
-[norbert: well, it depends. There will be a default pin value of say 500,
- and you can give pin values lower than 500 to prefer packages from other
- sources, or higher pin values to prefer these sources]
-
-[k2: I understand there is all this flexibility, but that's not my
-point. I envision the single most common use of this (by far) to say
-"get package foo from my special location bar", where foo is a local
-font, or tlmgr from tlcritical. In these cases, the user will set a
-single location. And then it would be a waste of time for tlmgr to even
-consider looking at the default location (tlnet) for foo. It should not
-even be a candidate.]
-
-
-2) compute the pins of all the candidates
-
-3) if there are different pins cancel those candidates with a non-maximal pin
- (i.e., let pin_max = max { pin(candidate) : candidate in candidates },
- and new candidates are those with pin(candidate) = pin_max)
-
-4) within all the remaining candidates choose the one with the highest
- revision number
-
-
-========================================
-
-Consequences of the above:
-- no source: part necessary in the revisions
-- packages can be pinned to a specific source, and will not be updated
- even if another source ships a higher version number
-- no changes to the general server infrastructure are needed
-- default installations continue as before
-- normal installations with multiple sources but without pinning will
- simply *do*the*right*thing*, namely install the highest revision number.
-[karl: it's unclear to me that that is the right thing, in general, but
- I can see how it is the right thing in some cases, e.g., yours, so fine.]
-[norbert: see above ... I don't see the wrong point ;-) ]
diff --git a/Master/tlpkg/dev/dev.multi-source-support.patch b/Master/tlpkg/dev/dev.multi-source-support.patch
deleted file mode 100644
index 9e96668d938..00000000000
--- a/Master/tlpkg/dev/dev.multi-source-support.patch
+++ /dev/null
@@ -1,722 +0,0 @@
---- /src/TeX/texlive-svn/Master/tlpkg/TeXLive/TLPDB.pm 2008-09-06 19:11:52.000000000 +0200
-+++ tlpkg/TeXLive/TLPDB.pm 2008-09-09 15:11:23.000000000 +0200
-@@ -819,26 +819,25 @@
- =cut
-
- sub _set_option_value {
-- my ($self,$key,$value) = @_;
-+ my ($self,$key,@values) = @_;
- my $pkg = $self->{'tlps'}{'00texlive-installation.config'};
- my @newdeps;
- if (!defined($pkg)) {
- $pkg = new TeXLive::TLPOBJ;
- $pkg->name("00texlive-installation.config");
- $pkg->category("TLCore");
-- push @newdeps, "$key:$value";
-+ for my $v (@values) {
-+ push @newdeps, "$key:$v";
-+ }
- } else {
- my $found = 0;
- foreach my $d ($pkg->depends) {
-- if ($d =~ m!^$key:!) {
-- $found = 1;
-- push @newdeps, "$key:$value";
-- } else {
-+ if ($d !~ m!^$key:!) {
- push @newdeps, $d;
- }
- }
-- if (!$found) {
-- push @newdeps, "$key:$value";
-+ for my $v (@values) {
-+ push @newdeps, "$key:$v";
- }
- }
- $pkg->depends(@newdeps);
-@@ -847,13 +846,14 @@
-
- sub _option_value {
- my ($self,$key) = @_;
-+ my @l = ();
- if (defined($self->{'tlps'}{'00texlive-installation.config'})) {
- foreach my $d ($self->{'tlps'}{'00texlive-installation.config'}->depends) {
- if ($d =~ m!^$key:(.*)$!) {
-- return "$1";
-+ push @l, "$1";
- }
- }
-- return "";
-+ return(wantarray ? @l : (@l ? $l[0] : "") );
- }
- return;
- }
-@@ -889,15 +889,74 @@
- if (@_) { $self->_set_option_value("opt_paper", shift); }
- return $self->_option_value("opt_paper");
- }
--sub option_location {
-- my $self = shift;
-- if (@_) { $self->_set_option_value("location", shift); }
-- my $loc = $self->_option_value("location");
-- if ($loc eq "__MASTER__") {
-- return $self->root;
-+#
-+=pod
-+
-+=item C<< $tlpdb->option_locations >>
-+
-+Returns a list of tag and locations, so can be assigned to a hash.
-+
-+=cut
-+
-+sub option_locations {
-+ my $self = shift;
-+ if (@_) {
-+ my %foo = @_;
-+ my @l = ();
-+ for my $k (keys %foo) {
-+ if ($k eq $foo{$k}) {
-+ # no specific tag
-+ push @l, "$k";
-+ } else {
-+ push @l, "$foo{$k} $k";
-+ }
-+ }
-+ $self->_set_option_value("location", @l);
- }
-- return $self->_option_value("location");
-+ my @locs = $self->_option_value("location");
-+ # the locations might contain a tag, the lines are of format
-+ # location tag
-+ my @ret = ();
-+ for my $l (@locs) {
-+ my $loc;
-+ my $tag;
-+ if ($l =~ m/^([^ ]+)[[:space:]]+(.*)[[:space:]]*$/) {
-+ $loc = "$1";
-+ $tag = "$2";
-+ debug("reading locations, found loc=$loc, tag=$tag\n");
-+ } else {
-+ $loc = $tag = $l;
-+ }
-+ # we return a hash as list ...
-+ if ($loc eq "__MASTER__") {
-+ push @ret, $self->root, $self->root;
-+ } else {
-+ push @ret, $tag, $loc;
-+ }
-+ }
-+ return(@ret);
-+}
-+
-+sub add_locations {
-+ my ($self, %locs) = @_;
-+ my %foo = $self->option_locations;
-+ for my $l (keys %locs) {
-+ $foo{$l} = $locs{$l};
-+ }
-+ $self->option_locations(%foo);
-+ return(%foo);
-+}
-+
-+sub remove_locations {
-+ my ($self, %locs) = @_;
-+ my %foo = $self->option_locations;
-+ for my $l (keys %locs) {
-+ delete $foo{$l}
-+ }
-+ $self->option_locations(%foo);
-+ return(%foo);
- }
-+
- sub option_sys_bin {
- my $self = shift;
- if (@_) { $self->_set_option_value("opt_sys_bin", shift); }
---- /src/TeX/texlive-svn/Master/texmf/scripts/texlive/tlmgr.pl 2008-09-08 17:19:03.000000000 +0200
-+++ texmf/scripts/texlive/tlmgr.pl 2008-09-10 15:54:25.000000000 +0200
-@@ -48,15 +48,19 @@
-
- # used variables
- # the TLMedia from which we install/update
--my $tlmediasrc;
-+my %tlmediasrc;
- # the tlpdb of the install media
--my $tlpdb;
-+my %tlmediatlpdb;
-+# flag indicating that the tlmedia has been loaded
-+my $tlmedia_loaded = 0;
-+# hash with *all* installable packages as keys and source as value
-+my %media_packages;
- # the local tlpdb
- my $localtlpdb;
- # a hash for saving the options saved into the local tlpdb
- my %options;
- # the location from where we install
--my $location;
-+my %locations;
-
- # option handling
- my $opt_location;
-@@ -133,6 +137,8 @@
- merge_into(\%ret, action_install());
- } elsif ($action =~ m/^update$/i) {
- merge_into(\%ret, action_update());
-+} elsif ($action =~ m/^candidates$/i) {
-+ action_candidates();
- } elsif ($action =~ m/^backup$/i) {
- merge_into(\%ret, action_backup());
- } elsif ($action =~ m/^restore$/i) {
-@@ -414,15 +420,13 @@
- }
- init_local_db();
- foreach my $pkg (@ARGV) {
-- my $tlmediatlpdb;
- my $tlp = $localtlpdb->get_package($pkg);
- my $installed = 0;
- if (!$tlp) {
-- if (!$tlmediatlpdb) {
-- init_tlmedia();
-- $tlmediatlpdb = $tlmediasrc->tlpdb;
-+ init_tlmedia();
-+ if (defined($media_packages{$pkg})) {
-+ $tlp = $tlmediatlpdb{$media_packages{$pkg}}->get_package($pkg);
- }
-- $tlp = $tlmediatlpdb->get_package($pkg);
- } else {
- $installed = 1;
- }
-@@ -432,6 +436,7 @@
- print "ShortDesc: ", $tlp->shortdesc, "\n" if ($tlp->shortdesc);
- print "LongDesc: ", $tlp->longdesc, "\n" if ($tlp->longdesc);
- print "Installed: ", ($installed?"Yes\n":"No\n");
-+ print "Source: ", $media_packages{$pkg}, "\n" if (!$installed);
- print "\n";
- } else {
- printf STDERR "Cannot find $pkg\n";
-@@ -448,17 +453,22 @@
- "file" => \$opt_file) or pod2usage(2);
- my $r = shift @ARGV;
- my $ret = "";
-- my $tlpdb;
-+ my @tlpdbs;
-+ my %packs;
- init_local_db();
- if ($opt_global) {
- init_tlmedia();
-- $tlpdb = $tlmediasrc->tlpdb;
-+ for my $p (keys %media_packages) {
-+ $packs{$p} = $tlmediatlpdb{$media_packages{$p}};
-+ }
- } else {
-- $tlpdb = $localtlpdb;
-+ for my $p ($localtlpdb->list_packages) {
-+ $packs{$p} = $localtlpdb;
-+ }
- }
-- foreach my $pkg ($tlpdb->list_packages) {
-+ for my $pkg (keys %packs) {
- if ($opt_file) {
-- my @ret = grep(m;$r;, $tlpdb->get_package($pkg)->all_files);
-+ my @ret = grep(m;$r;, $packs{$pkg}->get_package($pkg)->all_files);
- if (@ret) {
- print "$pkg:\n";
- foreach (@ret) {
-@@ -467,9 +477,9 @@
- }
- } else {
- next if ($pkg =~ m/\./);
-- my $t = $tlpdb->get_package($pkg)->shortdesc;
-+ my $t = $packs{$pkg}->get_package($pkg)->shortdesc;
- $t |= "";
-- my $lt = $tlpdb->get_package($pkg)->longdesc;
-+ my $lt = $packs{$pkg}->get_package($pkg)->longdesc;
- $lt |= "";
- if (($pkg =~ m/$r/) || ($t =~ m/$r/) || ($lt =~ m/$r/)) {
- $ret .= " $pkg - $t\n";
-@@ -614,7 +624,6 @@
- "dry-run" => \$opt_dry) or pod2usage(2);
- my %ret;
- init_tlmedia();
-- my $mediatlpdb = $tlmediasrc->tlpdb;
- my @todo;
- if ($opt_all || $opt_list) {
- @todo = $localtlpdb->list_packages;
-@@ -625,19 +634,22 @@
- # we check for new packages
- # loop over all installed collections
- for my $c ($localtlpdb->collections) {
-- my $tlc = $mediatlpdb->get_package($c);
-- if (!defined($tlc)) {
-+ my ($maxsrc, $maxrev) = install_candidate($c);
-+ if (!defined($maxsrc)) {
- debug("collection $c has disappeared from the network!\n");
-- } else {
-- # take all the dependencies of the installed collection
-- # *as*found* in the network tlpdb
-- for my $d ($tlc->depends) {
-- my $tlp = $localtlpdb->get_package($d);
-- if (!defined($tlp)) {
-- # there is a dep that is either new or has been forcibly removed
-- # report it as new/forcibly removed
-- info("package $d ($c) is new (or has been forcibly removed)\n");
-- }
-+ next;
-+ }
-+ my $tlc = $tlmediatlpdb{$maxsrc}->get_package($c);
-+ if (!defined($tlc)) {
-+ debug("That should not happen!!!\n");
-+ next;
-+ }
-+ for my $d ($tlc->depends) {
-+ my $tlp = $localtlpdb->get_package($d);
-+ if (!defined($tlp)) {
-+ # there is a dep that is either new or has been forcibly removed
-+ # report it as new/forcibly removed
-+ info("package $d ($c) is new (or has been forcibly removed)\n");
- }
- }
- }
-@@ -655,18 +667,22 @@
- next;
- }
- my $rev = $tlp->revision;
-- my $mediatlp = $mediatlpdb->get_package($pkg);
-- if (!defined($mediatlp)) {
-- debug("$pkg cannot be found in $location\n");
-+ my ($maxsrc, $maxrev) = install_candidate($pkg);
-+ if (!defined($maxsrc)) {
-+ debug("$pkg cannot be found in any of " . values(%locations). "\n");
- next;
- }
-- my $mediarev = $mediatlp->revision;
-- if ($rev < $mediarev) {
-+ # if $maxsrc is defined then there is an installation candidate with
-+ # an higher revision number
-+ if ($rev < $maxrev) {
-+ my $tlmediasrc = $tlmediasrc{$maxsrc};
-+ my $tlmediatlpdb = $tlmediatlpdb{$maxsrc};
-+ my $mediarev = $maxrev;
- $nrupdated++;
- if ($opt_list) {
-- print "$pkg: local: $rev, source: $mediarev\n";
-+ print "$pkg: local: $rev, source: $mediarev ($maxsrc)\n";
- } elsif ($opt_dry) {
-- print "Installing $pkg\n";
-+ print "Installing $pkg ($maxsrc)\n";
- } else {
- # first remove the package, then reinstall it
- # this way we get rid of useless files
-@@ -706,7 +722,7 @@
- # these packages cannot be upgrade on win32
- # so we have to create a update program
- my $media = $tlmediasrc->media;
-- my $remoteroot = $mediatlpdb->root;
-+ my $remoteroot = $tlmediatlpdb->root;
- my $root = $localtlpdb->root;
- my $temp = "$root/temp";
- TeXLive::TLUtils::mkdirhier($temp);
-@@ -740,8 +756,8 @@
- print "update: $pkg done\n";
- }
- }
-- } elsif ($rev > $mediarev) {
-- print "$pkg: revision in $location is less then local revision, not updating!\n";
-+ } else {
-+ debug("$pkg: no installation candidate with higher rev found!\n");
- next;
- }
- }
-@@ -761,17 +777,50 @@
- );
- tlwarn("UPDATER has been created, please execute tlpkg\\installer\\updater.bat\n");
- }
-- if (($nrupdated == 0) && ($tlmediasrc->media ne "NET") && $opt_all) {
-- # for all but net updates we warn if nothing is updated
-- tlwarn("\nYour installation is set up to look on the disk for updates.\n");
-- tlwarn("If you want to install from the Internet for this one time only, run\n");
-- tlwarn(" tlmgr -location $TeXLiveURL\n");
-- tlwarn("\nIf you want to change the default for all future updates, run\n");
-- tlwarn(" tlmgr option location $TeXLiveURL\n\n");
-+ if (($nrupdated == 0) && $opt_all) {
-+ my $any_net = 0;
-+ for my $tm (values(%tlmediasrc)) {
-+ if ($tm->media eq "NET") {
-+ $any_net = 1;
-+ last;
-+ }
-+ }
-+ if (!$any_net) {
-+ # for all but net updates we warn if nothing is updated
-+ tlwarn("\nTEXT OUTDATED NEEDS REMARK FOR MULTIPLE LOCATIONS!!!\n");
-+ tlwarn("\nYour installation is set up to look on the disk for updates.\n");
-+ tlwarn("If you want to install from the Internet for this one time only, run\n");
-+ tlwarn(" tlmgr -location $TeXLiveURL\n");
-+ tlwarn("\nIf you want to change the default for all future updates, run\n");
-+ tlwarn(" tlmgr option location $TeXLiveURL\n\n");
-+ }
- }
- return(\%ret);
- }
-
-+sub action_candidates {
-+ init_local_db(1);
-+ init_tlmedia();
-+ foreach my $pkg (@ARGV) {
-+ my @l = ();
-+ for my $s (keys %tlmediasrc) {
-+ my $tlp = $tlmediatlpdb{$s}->get_package($pkg);
-+ if ($tlp) {
-+ push @l, "$s (" . $tlp->revision . ")";
-+ }
-+ }
-+ if (@l) {
-+ print "$pkg:\n";
-+ for my $f (@l) {
-+ print "\t$f\n";
-+ }
-+ } else {
-+ print "No installation candidate for $pkg\ņ";
-+ }
-+ }
-+}
-+
-+
- sub action_install {
- if ($opt_gui) {
- action_gui("install");
-@@ -786,11 +835,38 @@
- my %ret;
- init_tlmedia();
- foreach my $pkg (@ARGV) {
-+ my $package = $pkg;
-+ my $tag;
-+ my $maxsrc;
-+ if ($pkg =~ m!^([^/]+)/(.*)$!) {
-+ $package = "$1";
-+ $tag = "$2";
-+ if (defined($tlmediatlpdb{$tag})) {
-+ if (defined($tlmediatlpdb{$tag}->get_package($package))) {
-+ # we can actually install from there
-+ $maxsrc = $tag;
-+ } else {
-+ tlwarn("Package $package not found in source $tag\n");
-+ tlwarn("Skipping installation of $pkg\n");
-+ next;
-+ }
-+ } else {
-+ tlwarn("The tag $tag for installing $package is not defined!\n");
-+ tlwarn("Skipping installation of $pkg\n");
-+ next;
-+ }
-+ } else {
-+ ($maxsrc) = install_candidate($pkg);
-+ if (!defined($maxsrc)) {
-+ tlwarn("No installation candidate for $pkg found!\n");
-+ }
-+ }
-+
- if ($opt_dry) {
-- print "install: $pkg\n";
-+ print "install: $package (from $maxsrc)\n";
- } else {
- # install the packages and run postinstall actions (that is the 0)
-- merge_into(\%ret, $tlmediasrc->install_package($pkg, $localtlpdb, $opt_nodepends, 0));
-+ merge_into(\%ret, $tlmediasrc{$maxsrc}->install_package($package, $localtlpdb, $opt_nodepends, 0));
- }
- }
- if ($opt_dry) {
-@@ -805,13 +881,17 @@
- my $what = shift @ARGV;
- $what || ($what = "");
- init_tlmedia();
-- my @whattolist;
-+ my @whattolist = ();
- if ($what =~ m/^collection/i) {
-- @whattolist = $tlmediasrc->tlpdb->collections;
-+ for my $s (values %tlmediatlpdb) {
-+ push @whattolist, $s->collections;
-+ }
- } elsif ($what =~ m/^scheme/i) {
-- @whattolist = $tlmediasrc->tlpdb->schemes;
-+ for my $s (values %tlmediatlpdb) {
-+ push @whattolist, $s->schemes;
-+ }
- } else {
-- @whattolist = $tlmediasrc->tlpdb->list_packages;
-+ @whattolist = keys(%media_packages);
- }
- foreach (@whattolist) {
- if (defined($localtlpdb->get_package($_))) {
-@@ -819,7 +899,7 @@
- } else {
- print " ";
- }
-- my $foo = $tlmediasrc->tlpdb->get_package($_)->shortdesc;
-+ my $foo = $tlmediatlpdb{$media_packages{$_}}->get_package($_)->shortdesc;
- print "$_: ", defined($foo) ? $foo : "(shortdesc missing)" , "\n";
- }
- return;
-@@ -833,17 +913,68 @@
- $what = "show" unless defined($what);
- init_local_db();
- if ($what =~ m/^location$/i) {
-- # changes the default location
-- my $loc = shift @ARGV;
-- if ($loc) {
-- # normalize the path
-- $loc = abs_path($loc);
-- print "Setting default installation source to $loc!\n";
-- $localtlpdb->option_location($loc);
-- $localtlpdb->save;
-+ # the location argument is treated as follows
-+ # location loc1 loc2 loc3
-+ # location loc1,loc2,loc3
-+ # sets the list of locations to these three
-+ # location add loc1 [loc2 ...]
-+ # add the location loc to the list
-+ # location remove loc1 [loc2 ...]
-+ # remove the location from the list
-+ my $first = shift @ARGV;
-+ $first || ($first = "show");
-+ my $mode = "replace";
-+ my @locargs = ();
-+ if ($first =~ m/^add$/i) { $mode = "add"; }
-+ elsif ($first =~ m/^remove$/i) { $mode = "remove"; }
-+ else { push @locargs, $first unless ($first eq "show"); }
-+ push @locargs, @ARGV;
-+ my @locs;
-+ for my $a (@locargs) {
-+ push @locs, split(/,/,$a);
-+ }
-+ my %locs;
-+ for my $l (@locs) {
-+ if ($l =~ m;^(.+)=(.+)$;) {
-+ $locs{$2} = "$1";
-+ } else {
-+ $locs{$l} = $l;
-+ }
-+ }
-+ if ($mode eq "add") {
-+ if (@locs) {
-+ print "Adding @locs to the list of installation sources!\n";
-+ $localtlpdb->add_locations(%locs);
-+ } else {
-+ tlwarn("Need some argument for location add!\n");
-+ exit(1);
-+ }
-+ } elsif ($mode eq "remove") {
-+ if (@locs) {
-+ print "Removing @locs from the list of installation sources!\n";
-+ $localtlpdb->remove_locations(%locs);
-+ } else {
-+ tlwarn("Need some argument for location remove!\n");
-+ exit(1);
-+ }
- } else {
-- print "Default installation source: ", $localtlpdb->option_location, "\n";
-+ if (@locs) {
-+ print "Settings @locs as list of installation sources!\n";
-+ $localtlpdb->option_locations(%locs);
-+ } else {
-+ my %lo = $localtlpdb->option_locations;
-+ for my $t (keys %lo) {
-+ print "Installation source: ";
-+ if ($t eq $lo{$t}) {
-+ # no tag specified
-+ print "$t\n";
-+ } else {
-+ print "$lo{$t} (tag $t)\n";
-+ }
-+ }
-+ }
- }
-+ $localtlpdb->save;
- } elsif ($what =~ m/^docfiles$/i) {
- # changes the default docfiles
- my $loc = shift @ARGV;
-@@ -903,10 +1034,16 @@
- # list the available architectures
- # initialize the TLMedia from $location
- init_tlmedia();
-- my $mediatlpdb = $tlmediasrc->tlpdb;
-+ # collect all available architectures from all media sources
-+ my %avail_archs;
-+ for my $tlpdb (values %tlmediatlpdb) {
-+ for my $a ($tlpdb->available_architectures) {
-+ $avail_archs{$a} = 1;
-+ }
-+ }
- my @already_installed_arch = $localtlpdb->available_architectures;
- print "Available architectures:\n";
-- foreach my $a ($mediatlpdb->available_architectures) {
-+ foreach my $a (keys %avail_archs) {
- if (member($a,@already_installed_arch)) {
- print "(i) $a\n";
- } else {
-@@ -918,9 +1055,15 @@
- exit(0);
- } elsif ($what =~ m/^add$/i) {
- init_tlmedia();
-- my $mediatlpdb = $tlmediasrc->tlpdb;
-+ # collect all available architectures from all media sources
-+ my %avail_archs;
-+ for my $tlpdb (values %tlmediatlpdb) {
-+ for my $a ($tlpdb->available_architectures) {
-+ $avail_archs{$a} = 1;
-+ }
-+ }
- my @already_installed_arch = $localtlpdb->available_architectures;
-- my @available_arch = $mediatlpdb->available_architectures;
-+ my @available_arch = keys %avail_archs;
- my @todoarchs;
- foreach my $a (@ARGV) {
- if (TeXLive::TLUtils::member($a, @already_installed_arch)) {
-@@ -943,7 +1086,13 @@
- if ($opt_dry) {
- print "Installing $pkg.$a\n";
- } else {
-- merge_into(\%ret, $tlmediasrc->install_package("$pkg.$a", $localtlpdb, 0, 0));
-+ my ($maxsrc) = install_candidate("$pkg.$a");
-+ if (defined($maxsrc)) {
-+ debug("pkg = $pkg, maxsrc = $maxsrc\n");
-+ merge_into(\%ret, $tlmediasrc{$maxsrc}->install_package("$pkg.$a", $localtlpdb, 0, 0));
-+ } else {
-+ tlwarn("No installation candidate for $pkg on $a found!\n");
-+ }
- }
- }
- }
-@@ -951,9 +1100,14 @@
- }
- if (TeXLive::TLUtils::member('win32', @todoarchs)) {
- # install the necessary win32 stuff
-- merge_into (\%ret, $tlmediasrc->install_package("bin-tlperl.win32", $localtlpdb, 1, 0));
-- merge_into (\%ret, $tlmediasrc->install_package("bin-tlgs.win32", $localtlpdb, 1, 0));
-- merge_into (\%ret, $tlmediasrc->install_package("bin-tlpsv.win32", $localtlpdb, 1, 0));
-+ for my $p (qw/bin-tlperl bin-tlgs bin-tlpsv/) {
-+ my ($maxsrc) = install_candidate("bin-tlperl.win32");
-+ if (defined($maxsrc)) {
-+ merge_into (\%ret, $tlmediasrc{$maxsrc}->install_package("$p.win32", $localtlpdb, 1, 0));
-+ } else {
-+ tlwarn("No installation candidate for $p on win32 found!\n");
-+ }
-+ }
- }
- # update the option_archs list of installed archs
- my @larchs = $localtlpdb->option_available_architectures;
-@@ -1026,18 +1180,30 @@
- }
- }
- # let cmd line options override the settings in localtlpdb
-- my $loc = $localtlpdb->option_location;
-- if (defined($loc)) {
-- $location = $loc;
-- }
-+ %locations = $localtlpdb->option_locations;
- if (defined($opt_location)) {
-- $location = $opt_location;
-+ %locations = ();
-+ for my $c (split /,/, $opt_location) {
-+ $locations{$c} = $c;
-+ }
- }
-- if (!defined($location)) {
-+ if (! keys(%locations)) {
- 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);
-+ # normalize all paths
-+ for my $c (keys %locations) {
-+ if ($c eq $locations{$c}) {
-+ my $newc = abs_path($c);
-+ if ($c ne $newc) {
-+ delete $locations{$c};
-+ $locations{$newc} = $newc;
-+ }
-+ } else {
-+ my $foo = $locations{$c};
-+ $foo = abs_path($foo);
-+ $locations{$c} = $foo;
-+ }
-+ }
- }
-
- sub action_gui {
-@@ -1209,18 +1375,66 @@
- # 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 if $tlmedia_loaded;
-+ my $found = 0;
-+ for my $t (keys %locations) {
-+ my $l = $locations{$t};
-+ my $location = $l;
-+ if (($location =~ m/$TeXLiveServerURL/) ||
-+ ($location =~ m/^ctan$/i)) {
-+ $location = give_ctan_mirror();
-+ info("Using mirror $location\n");
-+ }
-+ # $tlmediasrc is a global function
-+ $tlmediasrc{$t} = TeXLive::TLMedia->new($location);
-+ if (defined($tlmediasrc{$t})) {
-+ $found++;
-+ $tlmediatlpdb{$t} = $tlmediasrc{$t}->tlpdb;
-+ } else {
-+ info($loadmediasrcerror . $location);
-+ }
-+ }
-+ if (!$found) {
-+ # we didn't find any useable installation media, die here!
-+ die("Cannot find any useable installation source in one of the following locations:\n", values(%locations), "\nStopping here!");
-+ }
-+ # now we initialize the %media_packages
-+ my @allpkgs;
-+ for my $s (keys %tlmediasrc) {
-+ # will create duplicate entries, but who cares, we are doing hashing then
-+ push @allpkgs, $tlmediatlpdb{$s}->list_packages;
-+ }
-+ for my $p (@allpkgs) {
-+ next if defined($media_packages{$p});
-+ next if ($p =~ m/00texlive/);
-+ ($media_packages{$p}) = install_candidate($p);
-+ }
-+ $tlmedia_loaded = 1;
- }
-
-
--
-+#
-+#
-+sub install_candidate {
-+ my $pkg = shift;
-+ my $maxrev = -1;
-+ my $maxsrc;
-+ for my $s (keys %tlmediasrc) {
-+ my $tlp = $tlmediatlpdb{$s}->get_package($pkg);
-+ if ($tlp) {
-+ my $r = $tlp->revision;
-+ if ($maxrev < $r) {
-+ $maxrev = $r;
-+ $maxsrc = $s;
-+ }
-+ }
-+ }
-+ if ($maxsrc) {
-+ # something was found ($maxsrc, $maxrev, $maxtlp, $maxtlmedia)
-+ return ($maxsrc, $maxrev, $tlmediatlpdb{$maxsrc}->get_package($pkg), $tlmediasrc{$maxsrc});
-+ }
-+ return;
-+}
-
- #
- # return all the directories from which all content will be removed
diff --git a/Master/tlpkg/dev/dev.multi-source-support.patches/001-extend-tlpdb-option-location-field-add-action b/Master/tlpkg/dev/dev.multi-source-support.patches/001-extend-tlpdb-option-location-field-add-action
deleted file mode 100644
index aa280988c7d..00000000000
--- a/Master/tlpkg/dev/dev.multi-source-support.patches/001-extend-tlpdb-option-location-field-add-action
+++ /dev/null
@@ -1,128 +0,0 @@
-Allow more than one repository in the tlpdb/option-location field
-The format is:
- repo1[#tag] repo2[#tag] ...
-the tags are optional.
-This patch only adds support for a new action "repository" that lists,
-adds, removes, sets repositories according to this format.
-It does not change tlmgr to allow actually working with it.
----
- texmf/scripts/texlive/tlmgr.pl | 99 +++++++++++++++++++++++++++++++++++++++++
- 1 file changed, 99 insertions(+)
-
-Index: Master/texmf/scripts/texlive/tlmgr.pl
-===================================================================
---- Master.orig/texmf/scripts/texlive/tlmgr.pl 2010-05-02 01:31:56.000000000 +0900
-+++ Master/texmf/scripts/texlive/tlmgr.pl 2010-05-02 01:32:12.000000000 +0900
-@@ -455,6 +455,9 @@
- } elsif ($action =~ m/^option$/i) {
- action_option();
- finish(0);
-+ } elsif ($action =~ m/^repository$/i) {
-+ action_repository();
-+ finish(0);
- } elsif ($action =~ m/^list$/i) {
- action_list();
- finish(0);
-@@ -2839,6 +2842,102 @@
- return;
- }
-
-+# REPOSITORY
-+#
-+# this action manages the list of repositories
-+# tlmgr repository list -> lists repositories
-+# tlmgr repository add path [tag] -> add repository with optional tag
-+# tlmgr repository remove [path|tag] -> removes repository or tag
-+# tlmgr repository set path[#tag] [path[#tag] ...] -> sets the list
-+#
-+
-+sub array_to_repository {
-+ my %r = @_;
-+ my @ret;
-+ for my $k (keys %r) {
-+ my $v = $r{$k};
-+ if ($k eq $v) {
-+ push @ret, $k;
-+ } else {
-+ push @ret, "$v#$k";
-+ }
-+ }
-+ return "@ret";
-+}
-+sub repository_to_array {
-+ my $r = shift;
-+ my %r;
-+ for my $rr (split ' ', $r) {
-+ if ($rr =~ m/^([^#]+)#(.*)$/) {
-+ $r{$2} = $1;
-+ } else {
-+ $r{$rr} = $rr;
-+ }
-+ }
-+ return %r;
-+}
-+sub action_repository {
-+ init_local_db();
-+ my $what = shift @ARGV;
-+ my %repos = repository_to_array($localtlpdb->option("location"));
-+ if ($what =~ m/^list$/i) {
-+ print "List of repositories (with tags if set):\n";
-+ for my $k (keys %repos) {
-+ my $v = $repos{$k};
-+ print "\t$v";
-+ if ($k ne $v) {
-+ print " ($k)";
-+ }
-+ print "\n";
-+ }
-+ return;
-+ }
-+ if ($what eq "add") {
-+ my $p = shift @ARGV;
-+ if (!defined($p)) {
-+ tlwarn("You need to give a new repository aas argument to add\n");
-+ return;
-+ }
-+ my $t = shift @ARGV;
-+ $t = $p if (!defined($t));
-+ if (defined($repos{$t})) {
-+ tlwarn("This repository or its tag is already defined, no action\n");
-+ return;
-+ }
-+ # TODO more checks needed?
-+ $repos{$t} = $p;
-+ $localtlpdb->option("location", array_to_repository(%repos));
-+ $localtlpdb->save;
-+ return;
-+ }
-+ if ($what eq "remove") {
-+ my $p = shift @ARGV;
-+ if (!defined($p)) {
-+ tlwarn("Which repository should be removed?\n");
-+ return;
-+ }
-+ my $found = 0;
-+ for my $k (keys %repos) {
-+ if ($k eq $p || $repos{$k} eq $p) {
-+ $found = 1;
-+ delete $repos{$k};
-+ }
-+ }
-+ if (!$found) {
-+ tlwarn("Cannot find the repository $p\n");
-+ } else {
-+ $localtlpdb->option("location", array_to_repository(%repos));
-+ $localtlpdb->save;
-+ }
-+ return;
-+ }
-+ if ($what eq "set") {
-+ %repos = repository_to_array("@ARGV");
-+ $localtlpdb->option("location", array_to_repository(%repos));
-+ $localtlpdb->save;
-+ }
-+}
-+
-
- # OPTION
- #
diff --git a/Master/tlpkg/dev/dev.multi-source-support.patches/010-add-action-candidates-mediahash b/Master/tlpkg/dev/dev.multi-source-support.patches/010-add-action-candidates-mediahash
deleted file mode 100644
index bbfee51b84e..00000000000
--- a/Master/tlpkg/dev/dev.multi-source-support.patches/010-add-action-candidates-mediahash
+++ /dev/null
@@ -1,243 +0,0 @@
-Add tlmediasrcs etc hashes that collect all the available hashes, and
-add init_tlmedias that initializes all these hashs.
-Adapt init_tlmedia to work in both cases (old style/new style)
-add action "candidates" for checking which packages are available
----
- texmf/scripts/texlive/tlmgr.pl | 123 ++++++++++++++++++++++++++++++++++-------
- 1 file changed, 102 insertions(+), 21 deletions(-)
-
-Index: Master/texmf/scripts/texlive/tlmgr.pl
-===================================================================
---- Master.orig/texmf/scripts/texlive/tlmgr.pl 2010-05-02 02:02:39.000000000 +0900
-+++ Master/texmf/scripts/texlive/tlmgr.pl 2010-05-02 02:02:43.000000000 +0900
-@@ -91,8 +91,13 @@
-
- our %config; # hash of config settings from config file
- our $tlmediasrc; # media from which we install/update
-+our %tlmediasrcs;
- our $tlmediatlpdb;
-+our %tlmediatlpdbs;
- our $location; # location from which the new packages come
-+our %locations;
-+# hash with *all* installable packages as keys and source as value
-+our %media_packages;
- our $localtlmedia; # local installation which we are munging
- our $localtlpdb; # local installation which we are munging
-
-@@ -458,6 +463,9 @@
- } elsif ($action =~ m/^repository$/i) {
- action_repository();
- finish(0);
-+ } elsif ($action =~ m/^candidates$/i) {
-+ action_candidates();
-+ finish(0);
- } elsif ($action =~ m/^list$/i) {
- action_list();
- finish(0);
-@@ -3120,6 +3128,32 @@
- }
-
-
-+# CANDIDATES
-+#
-+sub action_candidates {
-+ init_local_db(1);
-+ init_tlmedias();
-+ foreach my $pkg (@ARGV) {
-+ my @l = ();
-+ for my $s (keys %tlmediasrcs) {
-+ info("trying $s ...\n");
-+ my $tlp = $tlmediatlpdbs{$s}->get_package($pkg);
-+ if ($tlp) {
-+ push @l, "$s (" . $tlp->revision . ")";
-+ }
-+ }
-+ if (@l) {
-+ info("$pkg:\n");
-+ for my $f (@l) {
-+ info("\t$f\n");
-+ }
-+ } else {
-+ info("No installation candidate for $pkg\n");
-+ }
-+ }
-+}
-+
-+
- # ARCH
- #
- sub action_arch {
-@@ -4228,28 +4262,53 @@
- }
-
-
-+sub init_tlmedias
-+{
-+ %locations = repository_to_array($localtlpdb->option("location"));
-+ for my $l (keys %locations) {
-+ printf "Init $l\n";
-+ init_tlmedia($l);
-+ }
-+}
-+
- # initialize the global $tlmediasrc object, or die.
- # uses the global $location.
- #
- sub init_tlmedia
- {
-- if (defined($tlmediatlpdb) && ($tlmediatlpdb->root eq $location)) {
-+ my $tag = shift;
-+ # defaults for normal operation with one location setting
-+ my $loc = $location;
-+ my $tlmdb = $tlmediatlpdb;
-+ # if a tag is given, so called via init_tlmedias, redefine the settings
-+ if (defined($tag)) {
-+ $loc = $locations{$tag};
-+ $tlmdb = $tlmediatlpdbs{$tag};
-+ }
-+
-+
-+ if (defined($tlmdb) && ($tlmdb->root eq $loc)) {
- # nothing to be done
- return;
- }
-
- # choose a mirror if we are asked.
-- if ($location =~ m/^ctan$/i) {
-- $location = give_ctan_mirror();
-- } elsif ($location =~ m,^$TeXLiveServerURL,) {
-+ if ($loc =~ m/^ctan$/i) {
-+ $loc = give_ctan_mirror();
-+ } elsif ($loc =~ m,^$TeXLiveServerURL,) {
- my $mirrorbase = TeXLive::TLUtils::give_ctan_mirror_base();
-- $location =~ s,^$TeXLiveServerURL,$mirrorbase,;
-+ $loc =~ s,^$TeXLiveServerURL,$mirrorbase,;
-+ }
-+ #
-+ # if we are in the normal case do not forget to update the locations
-+ if (!defined($tag)) {
-+ $location = $loc;
- }
-
- # this "location-url" line should not be changed since GUI programs
- # depend on it:
-- print "location-url\t$location\n" if $::machinereadable;
-- info("tlmgr: package repository $location\n");
-+ print "location-url\t$loc\n" if $::machinereadable;
-+ info("tlmgr: package repository $loc\n");
-
- # if we talk about a net location try to download the hash of the tlpdb
- # - if that is possible, check for the locally saved file and if the hash
-@@ -4260,9 +4319,9 @@
- # not work
-
- my $local_copy_tlpdb_used = 0;
-- if ($location =~ m;^(http|ftp)://;) {
-+ if ($loc =~ m;^(http|ftp)://;) {
- # first check that the saved tlpdb is present at all
-- my $loc_digest = Digest::MD5::md5_hex($location);
-+ my $loc_digest = Digest::MD5::md5_hex($loc);
- my $loc_copy_of_remote_tlpdb =
- "$Master/$InfraLocation/texlive.tlpdb.$loc_digest";
- ddebug("loc_digest = $loc_digest\n");
-@@ -4271,7 +4330,7 @@
- ddebug("loc copy found!\n");
- # we found the tlpdb matching the current location
- # check for the remote hash
-- my $path = "$location/$InfraLocation/$DatabaseName.md5";
-+ my $path = "$loc/$InfraLocation/$DatabaseName.md5";
- ddebug("remote path of digest = $path\n");
- my $fh = TeXLive::TLUtils::download_file($path, "|");
- my $rem_digest;
-@@ -4288,8 +4347,14 @@
- END_NO_INTERNET
- # above text duplicated in TLPDB.pm, sorry.
-
-- $tlmediasrc = TeXLive::TLMedia->new(-location => $location,
-- -tlpdbfile => $loc_copy_of_remote_tlpdb);
-+ if (defined($tag)) {
-+ $tlmediasrcs{$tag} = TeXLive::TLMedia->new(-location => $loc,
-+ -tlpdbfile => $loc_copy_of_remote_tlpdb);
-+ } else {
-+ $tlmediasrc = TeXLive::TLMedia->new(-location => $loc,
-+ -tlpdbfile => $loc_copy_of_remote_tlpdb);
-+ }
-+
- $local_copy_tlpdb_used = 1;
- } else {
- ddebug("found remote digest: $rem_digest\n");
-@@ -4297,8 +4362,13 @@
- ddebug("rem_copy_digest = $rem_copy_digest\n");
- if ($rem_copy_digest eq $rem_digest) {
- debug("md5 of local copy identical with remote hash\n");
-- $tlmediasrc = TeXLive::TLMedia->new(-location => $location,
-+ if (defined($tag)) {
-+ $tlmediasrcs{$tag} = TeXLive::TLMedia->new(-location => $loc,
- -tlpdbfile => $loc_copy_of_remote_tlpdb);
-+ } else {
-+ $tlmediasrc = TeXLive::TLMedia->new(-location => $loc,
-+ -tlpdbfile => $loc_copy_of_remote_tlpdb);
-+ }
- $local_copy_tlpdb_used = 1;
- }
- }
-@@ -4306,23 +4376,34 @@
- }
- if (!$local_copy_tlpdb_used) {
- # $tlmediasrc is a global variable
-- $tlmediasrc = TeXLive::TLMedia->new(-location => $location);
-+ if (defined($tag)) {
-+ $tlmediasrcs{$tag} = TeXLive::TLMedia->new(-location => $loc);
-+ } else {
-+ $tlmediasrc = TeXLive::TLMedia->new(-location => $loc);
-+ }
-+ }
-+ if (defined($tag)) {
-+ die($loadmediasrcerror . $location) unless defined($tlmediasrcs{$tag});
-+ $tlmediatlpdbs{$tag} = $tlmediasrcs{$tag}->tlpdb;
-+ $tlmdb = $tlmediatlpdbs{$tag};
-+ } else {
-+ die($loadmediasrcerror . $location) unless defined($tlmediasrc);
-+ $tlmediatlpdb = $tlmediasrc->tlpdb;
-+ $tlmdb = $tlmediatlpdb;
- }
-- die($loadmediasrcerror . $location) unless defined($tlmediasrc);
-- $tlmediatlpdb = $tlmediasrc->tlpdb;
- # if the release from the remote TLPDB does not agree with the
- # TLConfig::ReleaseYear in the first 4 places break out here.
- # Why only the first four places: some optional network distributions
- # might use
- # release/2009-foobar
-- my $texlive_release = $tlmediatlpdb->config_release;
-+ my $texlive_release = $tlmdb->config_release;
- if (!defined($texlive_release) ||
- $texlive_release !~ m/^$TeXLive::TLConfig::ReleaseYear/) {
- die "The release version of the installation source and the installation media\ndo not agree: source: $texlive_release, media: $TeXLive::TLConfig::ReleaseYear\nPlease fix your location $location";
- }
-
- # check for being frozen
-- if ($tlmediatlpdb->option("frozen")) {
-+ if ($tlmdb->option("frozen")) {
- my $frozen_msg = <<FROZEN;
- TeX Live $TeXLive::TLConfig::ReleaseYear is frozen and will not be
- updated anymore. This happens in preparation for a new release.
-@@ -4337,8 +4418,8 @@
- # save remote database if it is a net location
- # make sure that the writeout of the tlpdb is done in UNIX mode
- # since otherwise the sha256 will change.
-- if (!$local_copy_tlpdb_used && $location =~ m;^(http|ftp)://;) {
-- my $loc_digest = Digest::MD5::md5_hex($location);
-+ if (!$local_copy_tlpdb_used && $loc =~ m;^(http|ftp)://;) {
-+ my $loc_digest = Digest::MD5::md5_hex($loc);
- my $loc_copy_of_remote_tlpdb =
- "$Master/$InfraLocation/texlive.tlpdb.$loc_digest";
- my $tlfh;
-@@ -4349,7 +4430,7 @@
- &debug("Cannot save remote TeX Live database to $loc_copy_of_remote_tlpdb: $!\n");
- } else {
- &debug("writing out tlpdb to $loc_copy_of_remote_tlpdb\n");
-- $tlmediatlpdb->writeout($tlfh);
-+ $tlmdb->writeout($tlfh);
- close($tlfh);
- }
- }
diff --git a/Master/tlpkg/dev/dev.multi-source-support.patches/020-add-pinning-file-support b/Master/tlpkg/dev/dev.multi-source-support.patches/020-add-pinning-file-support
deleted file mode 100644
index fabbfc6ad49..00000000000
--- a/Master/tlpkg/dev/dev.multi-source-support.patches/020-add-pinning-file-support
+++ /dev/null
@@ -1,156 +0,0 @@
-add support for TEXMFSYSCONFIG/tlmgr/pinning
-show the available pins in tlmgr candidate and mark the winning one with *
----
- texmf/scripts/texlive/tlmgr.pl | 102 +++++++++++++++++++++++++++++++++++++++--
- 1 file changed, 99 insertions(+), 3 deletions(-)
-
-Index: Master/texmf/scripts/texlive/tlmgr.pl
-===================================================================
---- Master.orig/texmf/scripts/texlive/tlmgr.pl 2010-05-05 03:22:16.000000000 +0900
-+++ Master/texmf/scripts/texlive/tlmgr.pl 2010-05-05 03:22:24.000000000 +0900
-@@ -71,6 +71,7 @@
-
- use Cwd qw/abs_path/;
- use Digest::MD5;
-+use Text::Glob qw( match_glob);
- use Pod::Usage;
- use Getopt::Long qw(:config no_autoabbrev permute);
- use strict;
-@@ -90,6 +91,7 @@
- binmode(STDERR, ":utf8");
-
- our %config; # hash of config settings from config file
-+our %Pin; # $pin{$tag}{$package}
- our $tlmediasrc; # media from which we install/update
- our %tlmediasrcs;
- our $tlmediatlpdb;
-@@ -333,6 +335,9 @@
- # load the config file and set the config options
- # load it BEFORE starting downloads as we seet persistent-downloads there!
- load_config_file();
-+ #
-+ # load pinning file
-+ load_pinning_file();
-
- #
- # if we are asked to use persistent connections try to start it here
-@@ -3134,18 +3139,28 @@
- init_local_db(1);
- init_tlmedias();
- foreach my $pkg (@ARGV) {
-- my @l = ();
-+ my %pkgpin = ();
-+ my %revs = ();
-+ my $maxsrc = "";
-+ my $maxpin = "-1";
- for my $s (keys %tlmediasrcs) {
- info("trying $s ...\n");
- my $tlp = $tlmediatlpdbs{$s}->get_package($pkg);
- if ($tlp) {
-- push @l, "$s (" . $tlp->revision . ")";
-+ $revs{$s} = $tlp->revision;
-+ $pkgpin{$s} = get_pin($s,$pkg);
-+ if ($maxpin < $pkgpin{$s}) {
-+ $maxsrc = $s;
-+ $maxpin = $pkgpin{$s};
-+ }
- }
- }
-+ my @l = sort keys %pkgpin;
- if (@l) {
- info("$pkg:\n");
- for my $f (@l) {
-- info("\t$f\n");
-+ info(($f eq $maxsrc ? "\t*" : "\t "));
-+ info("$f ($revs{$f}) [$pkgpin{$f}]\n");
- }
- } else {
- info("No installation candidate for $pkg\n");
-@@ -4541,6 +4556,87 @@
- close(TLC);
- }
-
-+#
-+# pinning file handling
-+# location
-+# TEXMFSYSCONFIG/tlmgr/pinning
-+# (it is only globally useful!)
-+# format
-+# # are comments
-+# empty lines are ignored
-+# package:tag:pin
-+# where package is a glob, tag a tag (no * allowed, what for!),
-+# pin between 0 and 1000
-+# tags identify repositories, so they can also be the urls
-+#
-+#
-+# Format in memory:
-+# $Pin{$tag}{$package} but $tag can NOT be "*"
-+#
-+sub load_pinning_file
-+{
-+ #
-+ chomp (my $TEXMFSYSCONFIG = `kpsewhich -var-value=TEXMFSYSCONFIG`);
-+ my $fn = "$TEXMFSYSCONFIG/tlmgr/pinning";
-+ if (-r $fn) {
-+ if (!open(TLC, "<$fn")) {
-+ tlwarn("Cannot open $fn: $!");
-+ return;
-+ }
-+ while (<TLC>) {
-+ if (m/^\s*$/) { next; }
-+ if (m/^\s*#/) { next; }
-+ # TODO
-+ # check that we can enter all URL chars in [\w-]+ ?!
-+ if (m/^\s*([*\w-]+)\s*:\s*([\w-]+)\s*:\s*([*\w-]+)\s*$/) {
-+ my $package = $1;
-+ my $tag = $2;
-+ my $pin = $3;
-+ if ($pin !~ m/^[0-9]+/) {
-+ tlwarn("Pin $pin is not numeric, ignoring it.\n");
-+ next;
-+ }
-+ if ($pin < 0 || $pin > 1000) {
-+ tlwarn ("Pin $pin out of range (0-1000), ignoring.\n");
-+ next;
-+ }
-+ $Pin{$tag}{$package} = $pin;
-+ next;
-+ }
-+ tlwarn("I cannot understand the following line in $fn:\n$_\n");
-+ next;
-+ }
-+ close(TLC);
-+ }
-+}
-+
-+sub match_package
-+{
-+ my ($package, $p) = @_;
-+ return 1 if match_glob( $p, $package);
-+}
-+
-+#
-+# compute the pin of $package/$tag
-+sub get_pin
-+{
-+ my ($tag, $package) = @_;
-+ # the following three pins collect that pins set by:
-+ my $pin;
-+ if (defined($Pin{$tag})) {
-+ # for this tag some pin specifications are provided, go through
-+ # all of them and check them
-+ my %foo = %{$Pin{$tag}};
-+ for my $p (keys %foo) {
-+ $pin = $foo{$p} if match_package($package, $p);
-+ }
-+ return $pin if defined($pin);
-+ }
-+ # default pin
-+ return 500;
-+}
-+
-+
- # if the packagelog variable is set then write to PACKAGELOG filehandle
- #
- sub logpackage
diff --git a/Master/tlpkg/dev/dev.multi-source-support.patches/series b/Master/tlpkg/dev/dev.multi-source-support.patches/series
deleted file mode 100644
index 401444ab933..00000000000
--- a/Master/tlpkg/dev/dev.multi-source-support.patches/series
+++ /dev/null
@@ -1,3 +0,0 @@
-001-extend-tlpdb-option-location-field-add-action
-010-add-action-candidates-mediahash
-020-add-pinning-file-support
diff --git a/Master/tlpkg/dev/tlwingoonew/README b/Master/tlpkg/dev/tlwingoonew/README
deleted file mode 100644
index 5ea6bc33add..00000000000
--- a/Master/tlpkg/dev/tlwingoonew/README
+++ /dev/null
@@ -1,3 +0,0 @@
-Testing:
-
-- put testw32[.bat] in root of installation or svn/rsync checkout
diff --git a/Master/tlpkg/dev/tlwingoonew/testw32 b/Master/tlpkg/dev/tlwingoonew/testw32
deleted file mode 100644
index 63ed256a11c..00000000000
--- a/Master/tlpkg/dev/tlwingoonew/testw32
+++ /dev/null
@@ -1,132 +0,0 @@
-#!/usr/bin/env perl
-BEGIN {
- $^W = 1;
- my $Master;
- my $me = $0;
- $me =~ s!\\!/!g if $^O =~ /^MSWin(32|64)$/i;
- if ($me =~ m!/!) {
- ($Master = $me) =~ s!(.*)/[^/]*$!$1!;
- } else {
- $Master = ".";
- }
- $::installerdir = $Master;
- unshift (@INC, "$::installerdir/tlpkg");
-}
-
-$::opt_verbosity=2;
-
-use TeXLive::TLWinGoo;
-Win32::TieRegistry->import( qw( $Registry
-));
-# REG_SZ REG_EXPAND_SZ KEY_READ KEY_WRITE KEY_ALL_ACCESS
-# KEY_ENUMERATE_SUB_KEYS
-$Registry->Delimiter('/');
-$Registry->ArrayValues(0);
-
-sub print_reg {
- my $k = shift;
- $kb = $k;
- $kb =~ s!/!\\!g;
- if (defined($Registry->{"LMachine/$k/"})) {
- print "\nHKLM/$k/:\n";
- print `reg query HKLM\\$kb /s`;
- } else {
- print "\nHKLM/$k/: no such entry\n";
- }
- #print $out;
- if (defined($Registry->{"CUser/$k/"})) {
- print "\nHKCU/$k/:\n";
- print `reg query HKCU\\$kb /s`;
- } else {
- print "\nHKCU/$k/: no such entry\n";
- }
- #print $out;
-}
-
-$regpath = "Software/Classes/test";
-$testkey = {
- '/' => "default_value",
- '/a' => "another value"
-};
-
-TeXLive::TLWinGoo::do_write_regkey(2, $regpath, $testkey);
-print_reg($regpath);
-
-# extensions
-
-$regpath = 'Software/Classes/';
-$ext = '.tex';
-
-register_extension(0, $ext, 'texfile');
-print_reg("$regpath$ext");
-
-register_extension(1, $ext, 'texfile');
-print_reg("$regpath$ext");
-
-register_extension(2, $ext, 'TL.TeXworks.edit');
-print_reg("$regpath$ext");
-
-register_extension(1, $ext, 'texfile');
-print_reg("$regpath$ext");
-
-unregister_extension(0, $ext, 'texfile');
-print_reg("$regpath$ext");
-
-unregister_extension(1, $ext, 'TL.TeXworks.edit');
-print_reg("$regpath$ext");
-
-unregister_extension(1, $ext, 'texfile');
-print_reg("$regpath$ext");
-
-register_extension(1, $ext, 'texfile');
-print_reg("$regpath$ext");
-
-unregister_extension(2, $ext, 'TL.TeXworks.edit');
-print_reg("$regpath$ext");
-
-# file types
-
-$filetype = 'TL.TeXworks.edit';
-
-register_file_type('TL.TeXworks.edit', "\"$::installerdir/bin/win32/texworks.exe\" \"%1\"");
-print_reg("$regpath$filetype");
-
-unregister_file_type('TL.TeXworks.edit');
-print_reg("$regpath$filetype");
-
-# applications
-
-$regpath = "Software/Classes/Applications/";
-$prog = "texworks.exe";
-$path = "$::installerdir/bin/win32/texworks.exe";
-$exts = ['.tex','.sty','.cls','.ltx'];
-
-register_application($prog, $path, $exts);
-print_reg("$regpath$prog");
-
-unregister_application($prog);
-print_reg("$regpath$prog");
-
-$prog = "bitmap2eps.exe";
-$path = "$::installerdir/bin/win32/bitmap2eps.exe";
-$exts = ['.png','.jpg','.gif','.bmp'];
-
-register_application($prog, $path, $exts);
-print_reg("$regpath$prog");
-
-unregister_application($prog);
-print_reg("$regpath$prog");
-
-# openwithlist
-
-$regpath = "Software/Classes/";
-$ext = ".gif";
-$prog = "bitmap2eps.exe";
-
-add_to_openwithlist($ext, $prog);
-print_reg("$regpath$ext");
-
-remove_from_openwithlist($ext, $prog);
-print_reg("$regpath$ext");
-
-update_assocs();
diff --git a/Master/tlpkg/dev/tlwingoonew/testw32.bat b/Master/tlpkg/dev/tlwingoonew/testw32.bat
deleted file mode 100755
index c8388718456..00000000000
--- a/Master/tlpkg/dev/tlwingoonew/testw32.bat
+++ /dev/null
@@ -1,5 +0,0 @@
-@echo off
-setlocal enableextensions
-set path=%~dp0bin\win32;%path%
-set PERL5LIB=%~dp0tlpkg\tlperl\lib
-%~dp0tlpkg\tlperl\bin\perl.exe %~dpn0