summaryrefslogtreecommitdiff
path: root/Master/tlpkg/dev
diff options
context:
space:
mode:
authorNorbert Preining <preining@logic.at>2012-01-12 03:47:51 +0000
committerNorbert Preining <preining@logic.at>2012-01-12 03:47:51 +0000
commit9cf367183d42e17dc182e2906dd8428526799ea4 (patch)
treede4d049df1dc17499bcbc067f190c082df7e4190 /Master/tlpkg/dev
parent68d32a22118d1a812898bca2dab0dd31197632ab (diff)
update multi-source patch
git-svn-id: svn://tug.org/texlive/trunk@25077 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/tlpkg/dev')
-rw-r--r--Master/tlpkg/dev/dev.multi-source-support-v2.patch610
1 files changed, 552 insertions, 58 deletions
diff --git a/Master/tlpkg/dev/dev.multi-source-support-v2.patch b/Master/tlpkg/dev/dev.multi-source-support-v2.patch
index 42bc74642eb..fc482b9ffe1 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 25023)
+--- tlpkg/TeXLive/TLPDB.pm (revision 25070)
+++ tlpkg/TeXLive/TLPDB.pm (working copy)
@@ -70,20 +70,31 @@
$tlpdb->settings;
@@ -143,7 +143,7 @@ Index: tlpkg/TeXLive/TLPDB.pm
+ if (defined($self->{'packages'}{$pkg}{'tags'}{$tag})) {
+ return $self->{'packages'}{$pkg}{'tags'}{$tag}{'tlp'};
+ } else {
-+ tlwarn("package $pkg not found in repository $tag\n");
++ debug("TLPDB::get_package: package $pkg not found in repository $tag\n");
+ return;
+ }
+ } else {
@@ -199,12 +199,31 @@ Index: tlpkg/TeXLive/TLPDB.pm
=item C<< $tlpdb->list_packages >>
The C<list_packages> function returns the list of all included packages.
-@@ -527,6 +629,15 @@
+@@ -527,6 +629,34 @@
sub list_packages {
my $self = shift;
++ my $arg = shift;
++ my $showall = 0;
++ if (defined($arg) && ($arg eq "-all")) {
++ $showall = 1;
++ }
+ if ($self->is_virtual) {
-+ return (sort keys %{$self->{'packages'}});
++ if ($showall) {
++ return (sort keys %{$self->{'packages'}});
++ }
++ # we have to be careful here: If a package
++ # is only present in a subsidiary repository
++ # and the package is *not* explicitely
++ # pinned to it, it will not be installable.
++ # This is what we want. But in this case
++ # we don't want it to be listed by default.
++ #
++ my @pps;
++ for my $p (keys %{$self->{'packages'}}) {
++ push @pps, $p if (defined($self->{'packages'}{$p}{'target'}));
++ }
++ return (sort @pps);
+ } else {
+ return $self->_list_packages;
+ }
@@ -215,7 +234,7 @@ Index: tlpkg/TeXLive/TLPDB.pm
return (sort keys %{$self->{'tlps'}});
}
-@@ -544,6 +655,11 @@
+@@ -544,6 +674,11 @@
The next (or first) argument is the target TLPDB, then a list of
packages.
@@ -227,7 +246,7 @@ Index: tlpkg/TeXLive/TLPDB.pm
We return the closure of the package list with respect to the depends
operator. (Sorry, that was for mathematicians.)
-@@ -567,7 +683,8 @@
+@@ -567,7 +702,8 @@
my %install = ();
my @archs = $totlpdb->available_architectures;
for my $p (@_) {
@@ -237,7 +256,7 @@ Index: tlpkg/TeXLive/TLPDB.pm
}
my $changed = 1;
while ($changed) {
-@@ -576,7 +693,7 @@
+@@ -576,7 +712,7 @@
ddebug("pre_select = @pre_select\n");
for my $p (@pre_select) {
next if ($p =~ m/^00texlive/);
@@ -246,7 +265,7 @@ Index: tlpkg/TeXLive/TLPDB.pm
if (!defined($pkg)) {
debug("W: $p is mentioned somewhere but not available, disabling\n");
$install{$p} = 0;
-@@ -602,16 +719,19 @@
+@@ -602,16 +738,19 @@
if ($p_dep =~ m/^(.*)\.ARCH$/) {
my $foo = "$1";
foreach $a (@archs) {
@@ -269,7 +288,7 @@ Index: tlpkg/TeXLive/TLPDB.pm
}
}
}
-@@ -623,7 +743,9 @@
+@@ -623,7 +762,9 @@
$changed = 1;
}
}
@@ -280,7 +299,7 @@ Index: tlpkg/TeXLive/TLPDB.pm
}
=pod
-@@ -635,6 +757,7 @@
+@@ -635,6 +776,7 @@
=cut
@@ -288,7 +307,7 @@ Index: tlpkg/TeXLive/TLPDB.pm
sub find_file {
my ($self,$fn) = @_;
my @ret;
-@@ -868,6 +991,10 @@
+@@ -868,6 +1010,10 @@
sub root {
my $self = shift;
@@ -299,7 +318,7 @@ Index: tlpkg/TeXLive/TLPDB.pm
if (@_) { $self->{'root'} = shift }
return $self->{'root'};
}
-@@ -886,7 +1013,11 @@
+@@ -886,7 +1032,11 @@
=cut
sub location {
@@ -312,7 +331,7 @@ Index: tlpkg/TeXLive/TLPDB.pm
return "$self->{'root'}/$InfraLocation/$DatabaseName";
}
-@@ -937,8 +1068,14 @@
+@@ -937,8 +1087,14 @@
sub config_src_container {
my $self = shift;
@@ -329,7 +348,7 @@ Index: tlpkg/TeXLive/TLPDB.pm
if ($d =~ m!^container_split_src_files/(.*)$!) {
return "$1";
}
-@@ -958,8 +1095,14 @@
+@@ -958,8 +1114,14 @@
sub config_doc_container {
my $self = shift;
@@ -346,7 +365,7 @@ Index: tlpkg/TeXLive/TLPDB.pm
if ($d =~ m!^container_split_doc_files/(.*)$!) {
return "$1";
}
-@@ -978,8 +1121,14 @@
+@@ -978,8 +1140,14 @@
sub config_container_format {
my $self = shift;
@@ -363,7 +382,7 @@ Index: tlpkg/TeXLive/TLPDB.pm
if ($d =~ m!^container_format/(.*)$!) {
return "$1";
}
-@@ -998,8 +1147,14 @@
+@@ -998,8 +1166,14 @@
sub config_release {
my $self = shift;
@@ -380,7 +399,7 @@ Index: tlpkg/TeXLive/TLPDB.pm
if ($d =~ m!^release/(.*)$!) {
return "$1";
}
-@@ -1018,8 +1173,14 @@
+@@ -1018,8 +1192,14 @@
sub config_minrelease {
my $self = shift;
@@ -397,7 +416,7 @@ Index: tlpkg/TeXLive/TLPDB.pm
if ($d =~ m!^minrelease/(.*)$!) {
return "$1";
}
-@@ -1039,8 +1200,14 @@
+@@ -1039,8 +1219,14 @@
sub config_revision {
my $self = shift;
@@ -414,7 +433,7 @@ Index: tlpkg/TeXLive/TLPDB.pm
if ($d =~ m!^revision/(.*)$!) {
return "$1";
}
-@@ -1066,12 +1233,12 @@
+@@ -1066,12 +1252,12 @@
sub sizes_of_packages {
my ($self, $opt_src, $opt_doc, @packs) = @_;
@packs || ( @packs = $self->list_packages() );
@@ -428,7 +447,7 @@ Index: tlpkg/TeXLive/TLPDB.pm
if (!defined($tlpobjs{$p})) {
warn "STRANGE: $p not to be found in ", $self->root;
next;
-@@ -1095,7 +1262,7 @@
+@@ -1095,7 +1281,7 @@
$size += $tlpobj->srccontainersize if $opt_src;
$size += $tlpobj->doccontainersize if $opt_doc;
} else {
@@ -437,7 +456,7 @@ Index: tlpkg/TeXLive/TLPDB.pm
# installation of src and doc file
$size = $tlpobj->runsize;
$size += $tlpobj->srcsize if $opt_src;
-@@ -1110,31 +1277,46 @@
+@@ -1110,31 +1296,46 @@
=pod
@@ -498,7 +517,7 @@ Index: tlpkg/TeXLive/TLPDB.pm
} else {
my $container_src_split = $fromtlpdb->config_src_container;
my $container_doc_split = $fromtlpdb->config_doc_container;
-@@ -1182,7 +1364,7 @@
+@@ -1182,7 +1383,7 @@
next;
}
} elsif (&media eq 'NET') {
@@ -507,7 +526,7 @@ Index: tlpkg/TeXLive/TLPDB.pm
}
$self->_install_package ($container, $reloc, \@installfiles, $totlpdb)
|| return(0);
-@@ -1256,23 +1438,21 @@
+@@ -1256,23 +1457,21 @@
$totlpdb->save;
# compute the return value
TeXLive::TLUtils::announce_execute_actions("enable", $tlpobj);
@@ -545,7 +564,7 @@ Index: tlpkg/TeXLive/TLPDB.pm
}
return 1;
}
-@@ -1525,7 +1705,7 @@
+@@ -1525,7 +1724,7 @@
# the postaction code part cannot be evaluated now since the
# files are already removed.
# Again, desktop integration maps to desktop and menu links
@@ -554,7 +573,7 @@ Index: tlpkg/TeXLive/TLPDB.pm
&TeXLive::TLUtils::do_postaction("remove", $tlp,
$localtlpdb->option("file_assocs"),
$localtlpdb->option("desktop_integration"),
-@@ -1557,7 +1737,12 @@
+@@ -1557,7 +1756,12 @@
sub _set_value_pkg {
my ($self,$pkgname,$pre,$key,$value) = @_;
my $k = "$pre$key";
@@ -568,7 +587,7 @@ Index: tlpkg/TeXLive/TLPDB.pm
my @newdeps;
if (!defined($pkg)) {
$pkg = new TeXLive::TLPOBJ;
-@@ -1595,8 +1780,14 @@
+@@ -1595,8 +1799,14 @@
sub _value_pkg {
my ($self,$pkg,$pre,$key) = @_;
my $k = "$pre$key";
@@ -585,7 +604,7 @@ Index: tlpkg/TeXLive/TLPDB.pm
if ($d =~ m!^$k:(.*)$!) {
return "$1";
}
-@@ -1709,7 +1900,12 @@
+@@ -1709,7 +1919,12 @@
my ($self, $pre, $hr) = @_;
my @allowed = keys %$hr;
my %ret;
@@ -599,7 +618,7 @@ Index: tlpkg/TeXLive/TLPDB.pm
if (defined($pkg)) {
foreach my $d ($pkg->depends) {
if ($d =~ m!^$pre([^:]*):(.*)!) {
-@@ -1858,6 +2054,329 @@
+@@ -1858,6 +2073,338 @@
=back
@@ -615,9 +634,9 @@ Index: tlpkg/TeXLive/TLPDB.pm
+
+#
+# packages are saved:
-+# $self->{$pkgname}{'tags'}{$tag}{'revision'} = $rev
-+# $self->{$pkgname}{'tags'}{$tag}{'tlp'} = $tlp
-+# $self->{$pkgname}{'target'} = $target_tag
++# $self->{'packages'}{$pkgname}{'tags'}{$tag}{'revision'} = $rev
++# $self->{'packages'}{$pkgname}{'tags'}{$tag}{'tlp'} = $tlp
++# $self->{'packages'}{$pkgname}{'target'} = $target_tag
+#
+
+sub is_virtual {
@@ -707,6 +726,15 @@ Index: tlpkg/TeXLive/TLPDB.pm
+
+=cut
+
++sub is_repository {
++ my $self = shift;
++ my $tag = shift;
++ if (!$self->is_virtual) {
++ return ( ($tag eq $self->{'root'}) ? 1 : 0 );
++ }
++ return ( defined($self->{'tlpdbs'}{$tag}) ? 1 : 0 );
++}
++
+
+# returns a list of tag/rev
+sub candidates {
@@ -931,7 +959,7 @@ Index: tlpkg/TeXLive/TLPDB.pm
=head1 OPTIONS
Index: texmf/scripts/texlive/tlmgr.pl
===================================================================
---- texmf/scripts/texlive/tlmgr.pl (revision 25023)
+--- texmf/scripts/texlive/tlmgr.pl (revision 25070)
+++ texmf/scripts/texlive/tlmgr.pl (working copy)
@@ -124,6 +124,7 @@
"package-logfile" => "=s",
@@ -963,7 +991,308 @@ Index: texmf/scripts/texlive/tlmgr.pl
} elsif ($action =~ m/^list$/i) {
action_list();
finish(0);
-@@ -2048,7 +2057,12 @@
+@@ -533,7 +542,7 @@
+ action_dumptlpdb();
+ finish(0);
+ } elsif ($action =~ m/^show$/i) {
+- action_show();
++ action_show(@ARGV);
+ finish(0);
+ } elsif ($action =~ m/^remove$/i) {
+ action_remove();
+@@ -1145,7 +1154,8 @@
+ tlwarn("tlmgr: Cannot load taxonomy file, showing taxonomies not supported.\n");
+ }
+ }
+- foreach my $pkg (@ARGV) {
++ foreach my $ppp (@_) {
++ my ($pkg, $tag) = split '@', $ppp, 2;
+ my $tlpdb = $localtlpdb;
+ my $tlp = $localtlpdb->get_package($pkg);
+ my $installed = 0;
+@@ -1153,126 +1163,179 @@
+ if (!$remotetlpdb) {
+ init_tlmedia();
+ }
+- $tlp = $remotetlpdb->get_package($pkg);
++ if (defined($tag)) {
++ if (!$remotetlpdb->is_virtual) {
++ tlwarn("tlmgr: specifying implicite tags is not allowed for non-virtual databases!\n");
++ next;
++ } else {
++ if (!$remotetlpdb->is_repository($tag)) {
++ tlwarn("tlmgr: no such repository tag defined: $tag\n");
++ next;
++ }
++ }
++ }
++ $tlp = $remotetlpdb->get_package($pkg, $tag);
++ if (!$tlp) {
++ if (defined($tag)) {
++ # we already searched for the package in a specific tag, don't retry
++ # all candidates!
++ tlwarn("tlmgr: Cannot find package $pkg in repository $tag\n");
++ next;
++ }
++ if ($remotetlpdb->is_virtual) {
++ # we might have a package that is available in a
++ # subsidiary repository, but not installable
++ # because it is not pinned
++ # we will list it but warn about this fact
++ my @cand = $remotetlpdb->candidates($pkg);
++ if (@cand) {
++ my $first = shift @cand;
++ if (defined($first)) {
++ tlwarn("strange, we have a first candidate but no tlp: $pkg\n");
++ next;
++ }
++ # already shifted away the first element
++ if ($#cand >= 0) {
++ # recursively showing all tags, but warn
++ print "package: ", $pkg, "\n";
++ print "WARNING: This package is not pinned but present in subsidiary repositories\n";
++ print "WARNING: As long as it is not pinned it is not installable.\n";
++ print "WARNING: Listing all available copies of the package.\n";
++ my @aaa;
++ for my $a (@cand) {
++ my ($t,$r) = split(/\//, $a, 2);
++ push @aaa, "$pkg" . '@' . $t;
++ }
++ action_show(@aaa);
++ next;
++ } else {
++ tlwarn("strange, package listed but no residual candidates: $pkg\n");
++ next;
++ }
++ } else {
++ tlwarn("strange, package listed but no candidates: $pkg\n");
++ next;
++ }
++ }
++ tlwarn("tlmgr: cannot find package $pkg\n");
++ next;
++ }
+ $tlpdb = $remotetlpdb;
+ } else {
+ $installed = 1;
+ }
+- if ($tlp) {
+- my @colls;
+- if ($tlp->category ne "Collection" && $tlp->category ne "Scheme") {
+- @colls = $localtlpdb->needed_by($pkg);
+- if (!@colls) {
+- # not referenced in the local tlpdb, so try the remote here, too
+- if (!$remotetlpdb) {
+- init_tlmedia();
+- }
+- @colls = $remotetlpdb->needed_by($pkg);
++ my @colls;
++ if ($tlp->category ne "Collection" && $tlp->category ne "Scheme") {
++ @colls = $localtlpdb->needed_by($pkg);
++ if (!@colls) {
++ # not referenced in the local tlpdb, so try the remote here, too
++ if (!$remotetlpdb) {
++ init_tlmedia();
+ }
++ @colls = $remotetlpdb->needed_by($pkg);
+ }
+- # some packages might depend on other packages, so do not
+- # include arbitrary package in the list of collections, but
+- # only collectons:
+- @colls = grep {m;^collection-;} @colls;
+- print "package: ", $tlp->name, "\n";
+- print "category: ", $tlp->category, "\n";
+- print "shortdesc: ", $tlp->shortdesc, "\n" if ($tlp->shortdesc);
+- print "longdesc: ", $tlp->longdesc, "\n" if ($tlp->longdesc);
+- print "installed: ", ($installed ? "Yes" : "No"), "\n";
+- print "revision: ", $tlp->revision, "\n" if ($installed);
+- print "cat-version: ", $tlp->cataloguedata->{'version'}, "\n"
+- if $tlp->cataloguedata->{'version'};
+- print "cat-date: ", $tlp->cataloguedata->{'date'}, "\n"
+- if $tlp->cataloguedata->{'date'};
+- print "cat-license: ", $tlp->cataloguedata->{'license'}, "\n"
+- if $tlp->cataloguedata->{'license'};
+- print "collection: ", @colls, "\n" if (@colls);
+- if ($opts{"keyword"} || $opts{"taxonomy"}) {
+- print "keywords: ";
+- if (defined($taxonomy->{'by-package'}{'keyword'}{$pkg})) {
+- print join(', ',@{$taxonomy->{'by-package'}{'keyword'}{$pkg}}), "\n";
+- } else {
+- print "(none found)\n";
+- }
++ }
++ # some packages might depend on other packages, so do not
++ # include arbitrary package in the list of collections, but
++ # only collectons:
++ @colls = grep {m;^collection-;} @colls;
++ print "package: ", $tlp->name, "\n";
++ print "repository: ", $tag, "\n" if (defined($tag));
++ print "category: ", $tlp->category, "\n";
++ print "shortdesc: ", $tlp->shortdesc, "\n" if ($tlp->shortdesc);
++ print "longdesc: ", $tlp->longdesc, "\n" if ($tlp->longdesc);
++ print "installed: ", ($installed ? "Yes" : "No"), "\n";
++ print "revision: ", $tlp->revision, "\n" if ($installed);
++ print "cat-version: ", $tlp->cataloguedata->{'version'}, "\n"
++ if $tlp->cataloguedata->{'version'};
++ print "cat-date: ", $tlp->cataloguedata->{'date'}, "\n"
++ if $tlp->cataloguedata->{'date'};
++ print "cat-license: ", $tlp->cataloguedata->{'license'}, "\n"
++ if $tlp->cataloguedata->{'license'};
++ print "collection: ", @colls, "\n" if (@colls);
++ if ($opts{"keyword"} || $opts{"taxonomy"}) {
++ print "keywords: ";
++ if (defined($taxonomy->{'by-package'}{'keyword'}{$pkg})) {
++ print join(', ',@{$taxonomy->{'by-package'}{'keyword'}{$pkg}}), "\n";
++ } else {
++ print "(none found)\n";
+ }
+- if ($opts{"functionality"} || $opts{"taxonomy"}) {
+- print "function: ";
+- if (defined($taxonomy->{'by-package'}{'functionality'}{$pkg})) {
+- print join(', ',@{$taxonomy->{'by-package'}{'functionality'}{$pkg}}), "\n";
+- } else {
+- print "(none found)\n";
++ }
++ if ($opts{"functionality"} || $opts{"taxonomy"}) {
++ print "function: ";
++ if (defined($taxonomy->{'by-package'}{'functionality'}{$pkg})) {
++ print join(', ',@{$taxonomy->{'by-package'}{'functionality'}{$pkg}}), "\n";
++ } else {
++ print "(none found)\n";
++ }
++ }
++ if ($opts{"characterization"} || $opts{"taxonomy"}) {
++ print "primary characterization: ";
++ if (defined($taxonomy->{'by-package'}{'primary'}{$pkg})) {
++ print $taxonomy->{'by-package'}{'primary'}{$pkg}, "\n";
++ } else {
++ print "(none found)\n";
++ }
++ print "secondary characterization: ";
++ if (defined($taxonomy->{'by-package'}{'secondary'}{$pkg})) {
++ print $taxonomy->{'by-package'}{'secondary'}{$pkg}, "\n";
++ } else {
++ print "(none found)\n";
++ }
++ }
++ if ($opts{"list"}) {
++ if ($tlp->category eq "Collection" || $tlp->category eq "Scheme") {
++ # in the case of collections of schemes we list the deps
++ my @deps = $tlp->depends;
++ if (@deps) {
++ print "depends:\n";
++ for my $d (@deps) {
++ print "\t$d\n";
++ }
+ }
+ }
+- if ($opts{"characterization"} || $opts{"taxonomy"}) {
+- print "primary characterization: ";
+- if (defined($taxonomy->{'by-package'}{'primary'}{$pkg})) {
+- print $taxonomy->{'by-package'}{'primary'}{$pkg}, "\n";
+- } else {
+- print "(none found)\n";
++ print "Included files, by type:\n";
++ # if the package has a .ARCH dependency we also list the files for
++ # those packages
++ my @todo = $tlpdb->expand_dependencies("-only-arch", $tlpdb, ($pkg));
++ for my $d (sort @todo) {
++ my $foo = $tlpdb->get_package($d);
++ if (!$foo) {
++ tlwarn ("\nShould not happen, no dependent package $d\n");
++ next;
+ }
+- print "secondary characterization: ";
+- if (defined($taxonomy->{'by-package'}{'secondary'}{$pkg})) {
+- print $taxonomy->{'by-package'}{'secondary'}{$pkg}, "\n";
+- } else {
+- print "(none found)\n";
++ if ($d ne $pkg) {
++ print "depending package $d:\n";
+ }
+- }
+- if ($opts{"list"}) {
+- if ($tlp->category eq "Collection" || $tlp->category eq "Scheme") {
+- # in the case of collections of schemes we list the deps
+- my @deps = $tlp->depends;
+- if (@deps) {
+- print "depends:\n";
+- for my $d (@deps) {
+- print "\t$d\n";
+- }
+- }
++ if ($foo->runfiles) {
++ print "run files:\n";
++ for my $f (sort $foo->runfiles) { print " $f\n"; }
+ }
+- print "Included files, by type:\n";
+- # if the package has a .ARCH dependency we also list the files for
+- # those packages
+- my @todo = $tlpdb->expand_dependencies("-only-arch", $tlpdb, ($pkg));
+- for my $d (sort @todo) {
+- my $foo = $tlpdb->get_package($d);
+- if (!$foo) {
+- tlwarn ("\nShould not happen, no dependent package $d\n");
+- next;
+- }
+- if ($d ne $pkg) {
+- print "depending package $d:\n";
+- }
+- if ($foo->runfiles) {
+- print "run files:\n";
+- for my $f (sort $foo->runfiles) { print " $f\n"; }
+- }
+- if ($foo->srcfiles) {
+- print "source files:\n";
+- for my $f (sort $foo->srcfiles) { print " $f\n"; }
+- }
+- if ($foo->docfiles) {
+- print "doc files:\n";
+- for my $f (sort $foo->docfiles) {
+- print " $f";
+- my $dfd = $foo->docfiledata;
+- if (defined($dfd->{$f})) {
+- for my $k (keys %{$dfd->{$f}}) {
+- print " $k=\"", $dfd->{$f}->{$k}, '"';
+- }
++ if ($foo->srcfiles) {
++ print "source files:\n";
++ for my $f (sort $foo->srcfiles) { print " $f\n"; }
++ }
++ if ($foo->docfiles) {
++ print "doc files:\n";
++ for my $f (sort $foo->docfiles) {
++ print " $f";
++ my $dfd = $foo->docfiledata;
++ if (defined($dfd->{$f})) {
++ for my $k (keys %{$dfd->{$f}}) {
++ print " $k=\"", $dfd->{$f}->{$k}, '"';
+ }
+- print "\n";
+ }
++ print "\n";
+ }
+- # in case we have them
+- if ($foo->allbinfiles) {
+- print "bin files (all platforms):\n";
+- for my $f (sort $foo->allbinfiles) { print " $f\n"; }
+- }
+ }
++ # in case we have them
++ if ($foo->allbinfiles) {
++ print "bin files (all platforms):\n";
++ for my $f (sort $foo->allbinfiles) { print " $f\n"; }
++ }
+ }
+- print "\n";
+- } else {
+- printf STDERR "tlmgr: cannot find $pkg\n";
+ }
++ print "\n";
+ }
+ return;
+ }
+@@ -2048,7 +2111,12 @@
# intersection, don't check A\B and B\A
next if $newpkgs_full{$p};
next if $removals_full{$p};
@@ -977,7 +1306,7 @@ Index: texmf/scripts/texlive/tlmgr.pl
my $tlp = $localtlpdb->get_package($p);
if (!defined($tlp)) {
if ($opts{"reinstall-forcibly-removed"}) {
-@@ -2149,17 +2163,38 @@
+@@ -2149,17 +2217,38 @@
$ret = 1;
shift;
}
@@ -1019,7 +1348,7 @@ Index: texmf/scripts/texlive/tlmgr.pl
sub action_update {
init_local_db(1);
$opts{"no-depends"} = 1 if $opts{"no-depends-at-all"};
-@@ -2414,20 +2449,33 @@
+@@ -2414,20 +2503,36 @@
next;
}
my $rev = $tlp->revision;
@@ -1052,11 +1381,14 @@ Index: texmf/scripts/texlive/tlmgr.pl
+ 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");
++ if ($opts{"list"}) {
++ # not issueing anything if we keep a package
++ upd_info($pkg, -1, $rev, $mediarevstr, "keep");
++ }
}
}
}
-@@ -2525,6 +2573,8 @@
+@@ -2525,6 +2630,8 @@
}
}
@@ -1065,7 +1397,7 @@ Index: texmf/scripts/texlive/tlmgr.pl
#
# ORDER OF PACKAGE ACTIONS
-@@ -2557,7 +2607,7 @@
+@@ -2557,7 +2664,7 @@
if ($::machinereadable) {
machine_line($p, $FLAG_REMOVE, $rev, "-", "-", "-");
} else {
@@ -1074,7 +1406,7 @@ Index: texmf/scripts/texlive/tlmgr.pl
}
$currnr++;
} else {
-@@ -2569,7 +2619,8 @@
+@@ -2569,7 +2676,8 @@
if ($::machinereadable) {
machine_line($p, $FLAG_REMOVE, $rev, "-", "-", "-");
} else {
@@ -1084,7 +1416,7 @@ Index: texmf/scripts/texlive/tlmgr.pl
}
if (!$opts{"dry-run"}) {
if ($opts{"backup"}) {
-@@ -2585,6 +2636,7 @@
+@@ -2585,6 +2693,7 @@
$localtlpdb->remove_package($p);
logpackage("remove: $p");
}
@@ -1092,7 +1424,7 @@ Index: texmf/scripts/texlive/tlmgr.pl
$currnr++;
}
}
-@@ -2678,19 +2730,39 @@
+@@ -2678,19 +2787,39 @@
my $unwind_package;
my $remove_unwind_container = 0;
my $rev = $tlp->revision;
@@ -1135,7 +1467,7 @@ Index: texmf/scripts/texlive/tlmgr.pl
}
$updated{$pkg} = 1;
next;
-@@ -2731,10 +2803,11 @@
+@@ -2731,10 +2860,11 @@
}
if ($::machinereadable) {
@@ -1149,7 +1481,7 @@ Index: texmf/scripts/texlive/tlmgr.pl
}
$donesize += $sizes{$pkg};
$currnr++;
-@@ -2777,7 +2850,7 @@
+@@ -2777,7 +2907,7 @@
}
if ($remotetlpdb->install_package($pkg, $localtlpdb)) {
# installation succeeded because we got a reference
@@ -1158,7 +1490,7 @@ Index: texmf/scripts/texlive/tlmgr.pl
unlink($unwind_package) if $remove_unwind_container;
# remember successful update
$updated{$pkg} = 1;
-@@ -2805,7 +2878,7 @@
+@@ -2805,7 +2935,7 @@
# now in fact we should do some cleanup, removing files and
# dirs from the new package before re-installing the old one.
# TODO
@@ -1167,7 +1499,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
-@@ -2846,12 +2919,25 @@
+@@ -2846,12 +2976,25 @@
unless $::machinereadable;
} else {
# install new packages
@@ -1194,7 +1526,7 @@ Index: texmf/scripts/texlive/tlmgr.pl
my ($estrem, $esttot);
if (!$opts{"list"}) {
($estrem, $esttot) = TeXLive::TLUtils::time_estimate($totalsize,
-@@ -2861,14 +2947,16 @@
+@@ -2861,14 +3004,16 @@
my @maargs = ($pkg, $FLAG_AUTOINSTALL, "-", $mediatlp->revision, $sizes{$pkg});
if (!$opts{"list"}) {
push @maargs, $estrem, $esttot;
@@ -1214,7 +1546,7 @@ Index: texmf/scripts/texlive/tlmgr.pl
}
}
$currnr++;
-@@ -2876,7 +2964,7 @@
+@@ -2876,7 +3021,7 @@
next if ($opts{"dry-run"} || $opts{"list"});
if ($remotetlpdb->install_package($pkg, $localtlpdb)) {
# installation succeeded because we got a reference
@@ -1223,7 +1555,7 @@ Index: texmf/scripts/texlive/tlmgr.pl
$nrupdated++;
} else {
tlwarn("$0: couldn't install new package $pkg\n");
-@@ -3023,6 +3111,7 @@
+@@ -3023,6 +3168,7 @@
if (!(@new || @updated)) {
info("tlmgr: no updates available\n");
if ($remotetlpdb->media ne "NET"
@@ -1231,7 +1563,7 @@ Index: texmf/scripts/texlive/tlmgr.pl
&& !$opts{"dry-run"}
&& !$opts{"repository"}
) {
-@@ -3101,6 +3190,14 @@
+@@ -3101,6 +3247,14 @@
@packs = $remotetlpdb->expand_dependencies($localtlpdb, @packs) unless $opts{"no-depends"};
}
#
@@ -1246,7 +1578,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
-@@ -3108,7 +3205,7 @@
+@@ -3108,7 +3262,7 @@
my @inst_packs;
my @inst_colls;
my @inst_schemes;
@@ -1255,7 +1587,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;
-@@ -3127,7 +3224,11 @@
+@@ -3127,7 +3281,11 @@
my @todo;
for my $pkg (@inst_packs, @inst_colls, @inst_schemes) {
my $pkgrev = 0;
@@ -1268,7 +1600,7 @@ Index: texmf/scripts/texlive/tlmgr.pl
if (!defined($mediatlp)) {
tlwarn("package $pkg not present in package repository.\n");
next;
-@@ -3175,13 +3276,26 @@
+@@ -3175,13 +3333,26 @@
my ($estrem, $esttot) = TeXLive::TLUtils::time_estimate($totalsize,
$donesize, $starttime);
my $kb = int($sizes{$pkg} / 1024) + 1;
@@ -1298,7 +1630,77 @@ Index: texmf/scripts/texlive/tlmgr.pl
logpackage("${re}install: $pkg");
}
$donesize += $sizes{$pkg};
-@@ -3238,7 +3352,152 @@
+@@ -3204,7 +3375,7 @@
+ # we list them, otherwise we go direct into tlmgr show $pkg mode
+ if ($what !~ m/^(collection|scheme)/i) {
+ tlwarn("(switching to show mode)\n");
+- action_show();
++ action_show(@ARGV);
+ return;
+ }
+ } else {
+@@ -3223,7 +3394,11 @@
+ } elsif ($what =~ m/^scheme/i) {
+ @whattolist = $tlm->schemes;
+ } else {
+- @whattolist = $tlm->list_packages;
++ if ($remotetlpdb->is_virtual) {
++ @whattolist = $tlm->list_packages("-all");
++ } else {
++ @whattolist = $tlm->list_packages;
++ }
+ }
+ foreach (@whattolist) {
+ next if ($_ =~ m/^00texlive/);
+@@ -3232,13 +3407,199 @@
+ } else {
+ print " ";
+ }
+- my $foo = $tlm->get_package($_)->shortdesc;
++ my $tlp = $tlm->get_package($_);
++ if (!$tlp) {
++ if ($remotetlpdb->is_virtual) {
++ # we might have the case that a package is present in a
++ # subsidiary repository, but not pinned, so it will
++ # not be found by ->get_package
++ # In this case we list all repositories shipping it,
++ # but warn that it is not pinned and thus not reachable.
++ my @cand = $remotetlpdb->candidates($_);
++ if (@cand) {
++ my $first = shift @cand;
++ if (defined($first)) {
++ tlwarn("strange, we have a first candidate but no tlp: $_\n");
++ next;
++ }
++ # already shifted away the first element
++ if ($#cand >= 0) {
++ print "$_: --- no installable candidate found, \n";
++ print " but present in subsidiary repositories without a pin.\n";
++ print " This package is not reachable without pinning.\n";
++ print " Repositories containing this package:\n";
++ for my $a (@cand) {
++ my ($t,$r) = split(/\//, $a, 2);
++ my $tlp = $remotetlpdb->get_package($_, $t);
++ my $foo = $tlp->shortdesc;
++ print " $t: ", defined($foo) ? $foo : "(shortdesc missing)" , "\n";
++ }
++ next;
++ } else {
++ tlwarn("strange, package listed but no residual candidates: $_\n");
++ next;
++ }
++ } else {
++ tlwarn("strange, package listed but no candidates: $_\n");
++ next;
++ }
++ } else {
++ tlwarn("strange, package cannot be found in remote tlpdb: $_\n");
++ next;
++ }
++ }
++ my $foo = $tlp->shortdesc;
+ print "$_: ", defined($foo) ? $foo : "(shortdesc missing)" , "\n";
+ }
return;
}
@@ -1451,7 +1853,7 @@ Index: texmf/scripts/texlive/tlmgr.pl
# OPTION
#
sub action_option {
-@@ -4601,6 +4860,82 @@
+@@ -4601,6 +4962,82 @@
#
sub init_tlmedia
{
@@ -1534,7 +1936,7 @@ Index: texmf/scripts/texlive/tlmgr.pl
if (defined($remotetlpdb) && ($remotetlpdb->root eq $location)) {
# nothing to be done
return;
-@@ -4614,11 +4949,29 @@
+@@ -4614,11 +5051,29 @@
$location =~ s,^$TeXLiveServerURL,$mirrorbase,;
}
@@ -1564,7 +1966,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,
-@@ -4763,8 +5116,30 @@
+@@ -4763,8 +5218,30 @@
close($tlfh);
}
}
@@ -1595,7 +1997,7 @@ Index: texmf/scripts/texlive/tlmgr.pl
# finish handles the -pause option (wait for input from stdin),
-@@ -5561,7 +5936,43 @@
+@@ -5561,7 +6038,43 @@
=back
@@ -1639,7 +2041,7 @@ Index: texmf/scripts/texlive/tlmgr.pl
=head2 option
=over 4
-@@ -6198,7 +6609,27 @@
+@@ -6198,7 +6711,119 @@
GUI and a simplified GUI with only the important and mostly used
settings.
@@ -1662,7 +2064,99 @@ Index: texmf/scripts/texlive/tlmgr.pl
+want to be sure not to break anything, consider continuing
+using multiple invocations of tlmgr.
+
++When using multiple repositories, one has to be the main repository,
++which distributes most of the TeX Live packages. If you convert
++from a single repository installation to a multiple repository
++installation (by calling tlmgr repository add), the previously
++set repository will be set as the main repository.
++
++By default, even if multiple repositories are configured, packages
++are B<only> installed from the main repository, as long as
++packages are not explicitely pinned to a different repository.
++That also means by simply adding another repository you will
++B<not> be able to install the packages from there, you first
++have to specify which packages should be taken from a
++different repository by specifying some pinning rules.
++
++=head2 Pinning
++
++Pinning a package is done by editing (adding) a file
++
++ TEXMFLOCAL/tlpkg/pinning.txt
++
++which contains lines
++
++ repo:pkg[,pkg]
++
++In this line the C<repo> is either the full URL saved in the
++list or repositories, or one of the tags given. The C<pkg>
++are shell style globs for packages.
++
++By default everything is pinned to the main repository, so
++you can imagine that at the end of the file pinning.txt there
++is a line
++
++ main:*
++
++If a package C<foo> is pinned to a repository, any package
++C<foo> in any other repository, even if it has a higher
++revision number, will not be considered as installable
++candidate.
++
++=head2 Usage example with tlcontrib
++
++- check current repository:
++
++ $ tlmgr repository list
++ List of repositories (with tags if set):
++ /var/www/norbert/tlnet
++
++- add tlcontrib repository (and give it a short name)
++
++ $ tlmgr repository add http://tlcontrib.metatex.org/2011 tlcontrib
++
++- check repositories:
++
++ $ tlmgr repository list
++ List of repositories (with tags if set):
++ http://tlcontrib.metatex.org/2011 (tlcontrib)
++ /var/www/norbert/tlnet (main)
++
++
++- add a pinning to get cowfont from tlcontrib:
++
++ $ mkdir -p `kpsewhich -var-value TEXMFLOCAL`/tlpkg
++ $ echo "tlcontrib:cowfont" > `kpsewhich -var-value TEXMFLOCAL`/tlpkg/pinning.txt
++
++- check that we can find cowfont:
++
++ $ tlmgr show cowfont
++ tlmgr: using pinning file .../tlpkg/pinning.txt
++ tlmgr: package repository /var/www/norbert/tlnet http://tlcontrib.metatex.org/2011
++ package: cowfont
++ category: Package
++ ...
++
++- install cowfont and context (which is needed!)
++
++ $ tlmgr install context cowfont
++ tlmgr: using pinning file .../tlpkg/pinning.txt
++ tlmgr: package repository /var/www/norbert/tlnet http://tlcontrib.metatex.org/2011
++ [1/11, ??:??/??:??] install: context.x86_64-linux @main [84k]
++ [2/11, 00:00/00:00] install: context @main [4274k]
++ [3/11, 00:01/00:02] install: cowfont @tlcontrib [655k]
++ [4/11, 00:05/00:09] install: metapost.x86_64-linux @main [198k]
++ [5/11, 00:05/00:09] install: metapost @main [72k]
++ [6/11, 00:05/00:09] install: mptopdf.x86_64-linux @main [1k]
++ [7/11, 00:06/00:11] install: mptopdf @main [37k]
++ [8/11, 00:06/00:11] install: stmaryrd @main [163k]
++ [9/11, 00:07/00:12] install: xetex.x86_64-linux @main [4442k]
++ [10/11, 00:08/00:08] install: xetex @main [46k]
++ [11/11, 00:08/00:08] install: xetexconfig @main [13k]
++ ...
+
++In the last part you see that the cowfont is installed from
++the tlcontrib part (@tlcontrib).
+
=head1 TAXONOMIES