summaryrefslogtreecommitdiff
path: root/Master/tlpkg/dev
diff options
context:
space:
mode:
Diffstat (limited to 'Master/tlpkg/dev')
-rw-r--r--Master/tlpkg/dev/dev.multi-source-support-v2.patch241
1 files changed, 214 insertions, 27 deletions
diff --git a/Master/tlpkg/dev/dev.multi-source-support-v2.patch b/Master/tlpkg/dev/dev.multi-source-support-v2.patch
index 0702f389450..42bc74642eb 100644
--- a/Master/tlpkg/dev/dev.multi-source-support-v2.patch
+++ b/Master/tlpkg/dev/dev.multi-source-support-v2.patch
@@ -1,6 +1,6 @@
Index: tlpkg/TeXLive/TLPDB.pm
===================================================================
---- tlpkg/TeXLive/TLPDB.pm (revision 24382)
+--- tlpkg/TeXLive/TLPDB.pm (revision 25023)
+++ tlpkg/TeXLive/TLPDB.pm (working copy)
@@ -70,20 +70,31 @@
$tlpdb->settings;
@@ -455,10 +455,10 @@ Index: tlpkg/TeXLive/TLPDB.pm
+ my ($self, $pkg, $totlpdb, $tag) = @_;
+ if ($self->is_virtual) {
+ if (defined($tag)) {
-+ if (defined($self->{'packages'}{$pkg}{'tags'}{$t})) {
-+ return $self->{'tlpdbs'}{$t}->install_package($pkg, $totlpdb);
++ if (defined($self->{'packages'}{$pkg}{'tags'}{$tag})) {
++ return $self->{'tlpdbs'}{$tag}->install_package($pkg, $totlpdb);
+ } else {
-+ tlwarn("package $pkg not found in repository $t\n");
++ tlwarn("package $pkg not found in repository $tag\n");
+ return;
+ }
+ } else {
@@ -931,7 +931,7 @@ Index: tlpkg/TeXLive/TLPDB.pm
=head1 OPTIONS
Index: texmf/scripts/texlive/tlmgr.pl
===================================================================
---- texmf/scripts/texlive/tlmgr.pl (revision 24382)
+--- texmf/scripts/texlive/tlmgr.pl (revision 25023)
+++ texmf/scripts/texlive/tlmgr.pl (working copy)
@@ -124,6 +124,7 @@
"package-logfile" => "=s",
@@ -941,7 +941,16 @@ Index: texmf/scripts/texlive/tlmgr.pl
"pause" => 1,
"print-platform|print-arch" => 1,
"version" => 1,
-@@ -483,6 +484,12 @@
+@@ -135,6 +136,8 @@
+ "option" => { },
+ "conf" => { },
+ "version" => { },
++ "repository" => { },
++ "candidate" => { },
+ "backup" => { "backupdir" => "=s",
+ "clean" => ":-99",
+ "all" => 1,
+@@ -504,6 +507,12 @@
} elsif ($action =~ m/^option$/i) {
action_option();
finish(0);
@@ -954,7 +963,7 @@ Index: texmf/scripts/texlive/tlmgr.pl
} elsif ($action =~ m/^list$/i) {
action_list();
finish(0);
-@@ -2027,7 +2034,12 @@
+@@ -2048,7 +2057,12 @@
# intersection, don't check A\B and B\A
next if $newpkgs_full{$p};
next if $removals_full{$p};
@@ -968,7 +977,7 @@ Index: texmf/scripts/texlive/tlmgr.pl
my $tlp = $localtlpdb->get_package($p);
if (!defined($tlp)) {
if ($opts{"reinstall-forcibly-removed"}) {
-@@ -2128,12 +2140,15 @@
+@@ -2149,17 +2163,38 @@
$ret = 1;
shift;
}
@@ -987,7 +996,103 @@ Index: texmf/scripts/texlive/tlmgr.pl
$str .= "\n";
return($str) if $ret;
print $str;
-@@ -2657,19 +2672,32 @@
+ }
+
++sub upd_info {
++ my ($pkg, $kb, $lrev, $mrev, $txt) = @_;
++ my $flen = 25;
++ my $kbstr = ($kb >= 0 ? " [${kb}k]" : "");
++ my $kbstrlen = length($kbstr);
++ my $pkglen = length($pkg);
++ my $is = sprintf("%-10s ", "$txt:");
++ if ($pkglen + $kbstrlen > $flen) {
++ $is .= "$pkg$kbstr: ";
++ } else {
++ $is .= sprintf ('%*2$s', $pkg, -($flen-$kbstrlen));
++ $is .= "$kbstr: ";
++ }
++ $is .= sprintf("local: %6s, source: %8s",
++ $lrev, $mrev);
++ info("$is\n");
++}
++
+ sub action_update {
+ init_local_db(1);
+ $opts{"no-depends"} = 1 if $opts{"no-depends-at-all"};
+@@ -2414,20 +2449,33 @@
+ next;
+ }
+ my $rev = $tlp->revision;
+- my $mediatlp = $remotetlpdb->get_package($pkg);
++ my $mediatlp;
++ my $maxtag;
++ if ($remotetlpdb->is_virtual) {
++ ($maxtag, undef, $mediatlp, undef) =
++ $remotetlpdb->virtual_candidate($pkg);
++ } else {
++ $mediatlp = $remotetlpdb->get_package($pkg);
++ }
+ if (!defined($mediatlp)) {
+ debug("$pkg cannot be found in $location\n");
+ next;
+ }
+ my $mediarev = $mediatlp->revision;
++ my $mediarevstr = $mediarev;
++ my @addargs = ();
++ if ($remotetlpdb->is_virtual) {
++ push @addargs, $maxtag;
++ $mediarevstr .= "\@$maxtag";
++ }
+ if ($rev < $mediarev) {
+ $updated{$pkg} = 0; # will be changed to one on successful update
+ } elsif ($rev > $mediarev) {
+ if ($::machinereadable) {
+ push @addlines,
+- machine_line("-ret", $pkg, $FLAG_REVERSED_UPDATE, $rev, $mediarev, "-");
++ machine_line("-ret", $pkg, $FLAG_REVERSED_UPDATE, $rev, $mediarev, "-", @addargs);
+ } else {
+- info("$pkg: local: $rev, source: $mediarev (reverse, keep)\n");
++ upd_info($pkg, -1, $rev, $mediarevstr, "keep");
+ }
+ }
+ }
+@@ -2525,6 +2573,8 @@
+ }
+ }
+
++ # parameters for field width
++ my $totalnrdigits = length("$totalnr");
+
+ #
+ # ORDER OF PACKAGE ACTIONS
+@@ -2557,7 +2607,7 @@
+ if ($::machinereadable) {
+ machine_line($p, $FLAG_REMOVE, $rev, "-", "-", "-");
+ } else {
+- info("$p: local: $rev, source: <absent> (auto-remove)\n");
++ upd_info($p, -1, $rev, "<absent>", "a-remove");
+ }
+ $currnr++;
+ } else {
+@@ -2569,7 +2619,8 @@
+ if ($::machinereadable) {
+ machine_line($p, $FLAG_REMOVE, $rev, "-", "-", "-");
+ } else {
+- info("[$currnr/$totalnr] auto-remove: $p\n");
++ info("[" . sprintf ('%*2$s', $currnr, $totalnrdigits) .
++ "/$totalnr] auto-remove: $p ... ");
+ }
+ if (!$opts{"dry-run"}) {
+ if ($opts{"backup"}) {
+@@ -2585,6 +2636,7 @@
+ $localtlpdb->remove_package($p);
+ logpackage("remove: $p");
+ }
++ info("done\n") unless $::machinereadable;
+ $currnr++;
+ }
+ }
+@@ -2678,19 +2730,39 @@
my $unwind_package;
my $remove_unwind_container = 0;
my $rev = $tlp->revision;
@@ -1019,11 +1124,18 @@ Index: texmf/scripts/texlive/tlmgr.pl
} else {
my $kb = int($sizes{$pkg} / 1024) + 1;
- info("$pkg [${kb}k]: local: $rev, source: $mediarev (update)\n");
-+ info("$pkg [${kb}k]: local: $rev, source: $mediarevstr (update)\n");
++ upd_info($pkg, $kb, $rev, $mediarevstr, "update");
++ if ($remotetlpdb->is_virtual) {
++ my @cand = $remotetlpdb->candidates($pkg);
++ shift @cand; # remove the top element
++ if (@cand) {
++ print "\tother candidates: @cand\n";
++ }
++ }
}
$updated{$pkg} = 1;
next;
-@@ -2710,10 +2738,10 @@
+@@ -2731,10 +2803,11 @@
}
if ($::machinereadable) {
@@ -1032,11 +1144,12 @@ Index: texmf/scripts/texlive/tlmgr.pl
} else {
my $kb = int ($sizes{$pkg} / 1024) + 1;
- info("[$currnr/$totalnr, $estrem/$esttot] update: $pkg [${kb}k] ($rev -> $mediarev)");
-+ info("[$currnr/$totalnr, $estrem/$esttot] update: $pkg [${kb}k] ($rev -> $mediarevstr)");
++ info("[" . sprintf ('%*2$s', $currnr, $totalnrdigits) .
++ "/$totalnr, $estrem/$esttot] update: $pkg [${kb}k] ($rev -> $mediarevstr)");
}
$donesize += $sizes{$pkg};
$currnr++;
-@@ -2756,7 +2784,7 @@
+@@ -2777,7 +2850,7 @@
}
if ($remotetlpdb->install_package($pkg, $localtlpdb)) {
# installation succeeded because we got a reference
@@ -1045,7 +1158,7 @@ Index: texmf/scripts/texlive/tlmgr.pl
unlink($unwind_package) if $remove_unwind_container;
# remember successful update
$updated{$pkg} = 1;
-@@ -2784,7 +2812,7 @@
+@@ -2805,7 +2878,7 @@
# now in fact we should do some cleanup, removing files and
# dirs from the new package before re-installing the old one.
# TODO
@@ -1054,7 +1167,7 @@ Index: texmf/scripts/texlive/tlmgr.pl
tlwarn("\n\nInstallation of new version of $pkg did fail, trying to unwind.\n");
if (win32()) {
# w32 is notorious for not releasing a file immediately
-@@ -2825,12 +2853,25 @@
+@@ -2846,12 +2919,25 @@
unless $::machinereadable;
} else {
# install new packages
@@ -1081,7 +1194,7 @@ Index: texmf/scripts/texlive/tlmgr.pl
my ($estrem, $esttot);
if (!$opts{"list"}) {
($estrem, $esttot) = TeXLive::TLUtils::time_estimate($totalsize,
-@@ -2840,14 +2881,16 @@
+@@ -2861,14 +2947,16 @@
my @maargs = ($pkg, $FLAG_AUTOINSTALL, "-", $mediatlp->revision, $sizes{$pkg});
if (!$opts{"list"}) {
push @maargs, $estrem, $esttot;
@@ -1094,14 +1207,14 @@ Index: texmf/scripts/texlive/tlmgr.pl
my $kb = int($sizes{$pkg} / 1024) + 1;
if ($opts{"list"}) {
- info("$pkg [${kb}k]: local: <absent>, source: " . $mediatlp->revision . " (auto-install)\n");
-+ info("$pkg [${kb}k]: local: <absent>, source: $mediarevstr (auto-install)\n");
++ upd_info($pkg, $kb, "<absent>", $mediarevstr, "a-install");
} else {
- info("[$currnr/$totalnr, $estrem/$esttot] auto-install: $pkg [${kb}k]\n");
+ info("[$currnr/$totalnr, $estrem/$esttot] auto-install: $pkg ($mediarevstr) [${kb}k]\n");
}
}
$currnr++;
-@@ -2855,7 +2898,7 @@
+@@ -2876,7 +2964,7 @@
next if ($opts{"dry-run"} || $opts{"list"});
if ($remotetlpdb->install_package($pkg, $localtlpdb)) {
# installation succeeded because we got a reference
@@ -1110,7 +1223,7 @@ Index: texmf/scripts/texlive/tlmgr.pl
$nrupdated++;
} else {
tlwarn("$0: couldn't install new package $pkg\n");
-@@ -3002,6 +3045,7 @@
+@@ -3023,6 +3111,7 @@
if (!(@new || @updated)) {
info("tlmgr: no updates available\n");
if ($remotetlpdb->media ne "NET"
@@ -1118,7 +1231,7 @@ Index: texmf/scripts/texlive/tlmgr.pl
&& !$opts{"dry-run"}
&& !$opts{"repository"}
) {
-@@ -3080,6 +3124,14 @@
+@@ -3101,6 +3190,14 @@
@packs = $remotetlpdb->expand_dependencies($localtlpdb, @packs) unless $opts{"no-depends"};
}
#
@@ -1133,7 +1246,7 @@ Index: texmf/scripts/texlive/tlmgr.pl
# installation order of packages:
# first all normal packages, then collections, then schemes
# isn't already installed, but the collection already updated, it will
-@@ -3087,7 +3139,7 @@
+@@ -3108,7 +3205,7 @@
my @inst_packs;
my @inst_colls;
my @inst_schemes;
@@ -1142,7 +1255,7 @@ Index: texmf/scripts/texlive/tlmgr.pl
# we do name checking here, not to load all tlpobj again and again
if ($pkg =~ m/^scheme-/) {
push @inst_schemes, $pkg;
-@@ -3106,7 +3158,11 @@
+@@ -3127,7 +3224,11 @@
my @todo;
for my $pkg (@inst_packs, @inst_colls, @inst_schemes) {
my $pkgrev = 0;
@@ -1155,7 +1268,7 @@ Index: texmf/scripts/texlive/tlmgr.pl
if (!defined($mediatlp)) {
tlwarn("package $pkg not present in package repository.\n");
next;
-@@ -3154,13 +3210,26 @@
+@@ -3175,13 +3276,26 @@
my ($estrem, $esttot) = TeXLive::TLUtils::time_estimate($totalsize,
$donesize, $starttime);
my $kb = int($sizes{$pkg} / 1024) + 1;
@@ -1185,7 +1298,7 @@ Index: texmf/scripts/texlive/tlmgr.pl
logpackage("${re}install: $pkg");
}
$donesize += $sizes{$pkg};
-@@ -3217,7 +3286,150 @@
+@@ -3238,7 +3352,152 @@
return;
}
@@ -1292,6 +1405,8 @@ Index: texmf/scripts/texlive/tlmgr.pl
+ return;
+ }
+ if ($what eq "set") {
++ # TODO TODO
++ # we have to make sure that there is ONE main repository!!!
+ %repos = repository_to_array("@ARGV");
+ $localtlpdb->option("location", array_to_repository(%repos));
+ $localtlpdb->save;
@@ -1336,7 +1451,7 @@ Index: texmf/scripts/texlive/tlmgr.pl
# OPTION
#
sub action_option {
-@@ -4578,6 +4790,82 @@
+@@ -4601,6 +4860,82 @@
#
sub init_tlmedia
{
@@ -1419,7 +1534,7 @@ Index: texmf/scripts/texlive/tlmgr.pl
if (defined($remotetlpdb) && ($remotetlpdb->root eq $location)) {
# nothing to be done
return;
-@@ -4591,11 +4879,29 @@
+@@ -4614,11 +4949,29 @@
$location =~ s,^$TeXLiveServerURL,$mirrorbase,;
}
@@ -1449,7 +1564,7 @@ Index: texmf/scripts/texlive/tlmgr.pl
# 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
# agrees load the local copy if present instead of the remote one,
-@@ -4740,8 +5046,30 @@
+@@ -4763,8 +5116,30 @@
close($tlfh);
}
}
@@ -1480,3 +1595,75 @@ Index: texmf/scripts/texlive/tlmgr.pl
# finish handles the -pause option (wait for input from stdin),
+@@ -5561,7 +5936,43 @@
+
+ =back
+
++=head2 repositoy
+
++=over 4
++
++=item B<repository list>
++
++=item B<repository add I<path> [I<tag>]>
++
++=item B<repository remove I<path|tag>>
++
++=item B<repository set I<path>[#I<tag>] [I<path>[#I<tag>] ...]>
++
++This action manages the list of repositories. See L</"MULTIPLE REPOSITORIES">
++below for detailed explanations.
++
++The first form list all configured repositories and the respective tags
++if set. The second form adds a repository (and optionally attaching a
++tag) to the list of repositories. The third from removes a repository,
++either by full path/url, or by tag. The last form sets the list
++of repositories to the items given on the command line, not keeping
++previous settings. Be reminded that one of the repositories has to
++be tagged as B<main>, otherwise all operations will fail.
++
++=back
++
++=head2 candidates
++
++=over 4
++
++=item B<candidates I<pkg>>
++
++Shows the list of available candidates for package I<pkg>. See
++L</"MULTIPLE REPOSITORIES"> below for details.
++
++
++=back
++
+ =head2 option
+
+ =over 4
+@@ -6198,7 +6609,27 @@
+ GUI and a simplified GUI with only the important and mostly used
+ settings.
+
++=head1 MULTIPLE REPOSITORIES
+
++Most packages are distributed via the main TeX Live repository, but
++sometimes local repositories are used to provide local packages
++(like commercial fonts, internal styles), as well as alternative
++package repositories for packages that cannot be included in
++proper TeX Live due to license or other reasons.
++
++Without multiple repository support using these additional repositories
++needed an extra invocation and temporarily setting the installation
++source to this additional repository. By setting up all the
++repositories as sources of packages one does not need to
++use multiple invocations of tlmgr anymore.
++
++B<Warning:> Although support for multiple repositories has been
++tested extensively, it does not guarantee proper operation. If you
++want to be sure not to break anything, consider continuing
++using multiple invocations of tlmgr.
++
++
++
+ =head1 TAXONOMIES
+
+ tlmgr allows searching and listing of various categorizations, which we