From e41c74bb995dbc1cec2fbc74763bbb9575021a1d Mon Sep 17 00:00:00 2001 From: Norbert Preining Date: Fri, 29 Apr 2011 12:48:23 +0000 Subject: really update the patch git-svn-id: svn://tug.org/texlive/trunk@22249 c570f23f-e606-0410-a88d-b1316a301751 --- Master/tlpkg/dev/dev.multi-source-support-v2.patch | 83 ++++++++++++++-------- 1 file changed, 53 insertions(+), 30 deletions(-) (limited to 'Master/tlpkg') diff --git a/Master/tlpkg/dev/dev.multi-source-support-v2.patch b/Master/tlpkg/dev/dev.multi-source-support-v2.patch index 9f44881e5a6..b0876034362 100644 --- a/Master/tlpkg/dev/dev.multi-source-support-v2.patch +++ b/Master/tlpkg/dev/dev.multi-source-support-v2.patch @@ -76,18 +76,17 @@ Index: tlpkg/TeXLive/TLPDB.pm my $path = $self->location; mkdirhier(dirname($path)); my $tmppath = "$path.tmp"; -@@ -392,6 +419,10 @@ +@@ -392,6 +419,9 @@ sub media { my $self = shift ; + if ($self->is_virtual) { -+ tlwarn("cannot determine the media of a virtual tlpdb\n"); -+ return; ++ return "virtual"; + } return $self->{'media'}; } -@@ -407,6 +438,18 @@ +@@ -407,6 +437,18 @@ sub available_architectures { my $self = shift; @@ -106,7 +105,7 @@ Index: tlpkg/TeXLive/TLPDB.pm my @archs = $self->setting("available_architectures"); if (! @archs) { # fall back to the old method checking tex\.* -@@ -434,6 +477,10 @@ +@@ -434,6 +476,10 @@ sub add_tlpcontainer { my ($self, $package, $ziplocation, $archrefs, $dest) = @_; @@ -117,7 +116,7 @@ Index: tlpkg/TeXLive/TLPDB.pm my @archs; if (defined($archrefs)) { @archs = @$archrefs; -@@ -499,6 +546,16 @@ +@@ -499,6 +545,16 @@ sub get_package { my ($self,$pkg) = @_; @@ -134,7 +133,7 @@ Index: tlpkg/TeXLive/TLPDB.pm if (defined($self->{'tlps'}{$pkg})) { my $ret = $self->{'tlps'}{$pkg}; return $self->{'tlps'}{$pkg}; -@@ -509,6 +566,35 @@ +@@ -509,6 +565,35 @@ =pod @@ -170,7 +169,7 @@ Index: tlpkg/TeXLive/TLPDB.pm =item C<< $tlpdb->list_packages >> The C function returns the list of all included packages. -@@ -517,6 +603,15 @@ +@@ -517,6 +602,15 @@ sub list_packages { my $self = shift; @@ -186,7 +185,7 @@ Index: tlpkg/TeXLive/TLPDB.pm return (sort keys %{$self->{'tlps'}}); } -@@ -625,6 +720,7 @@ +@@ -625,6 +719,7 @@ =cut @@ -194,7 +193,7 @@ Index: tlpkg/TeXLive/TLPDB.pm sub find_file { my ($self,$fn) = @_; my @ret; -@@ -858,6 +954,10 @@ +@@ -858,6 +953,10 @@ sub root { my $self = shift; @@ -205,7 +204,7 @@ Index: tlpkg/TeXLive/TLPDB.pm if (@_) { $self->{'root'} = shift } return $self->{'root'}; } -@@ -876,7 +976,11 @@ +@@ -876,7 +975,11 @@ =cut sub location { @@ -218,7 +217,7 @@ Index: tlpkg/TeXLive/TLPDB.pm return "$self->{'root'}/$InfraLocation/$DatabaseName"; } -@@ -927,8 +1031,14 @@ +@@ -927,8 +1030,14 @@ sub config_src_container { my $self = shift; @@ -235,7 +234,7 @@ Index: tlpkg/TeXLive/TLPDB.pm if ($d =~ m!^container_split_src_files/(.*)$!) { return "$1"; } -@@ -948,8 +1058,14 @@ +@@ -948,8 +1057,14 @@ sub config_doc_container { my $self = shift; @@ -252,7 +251,7 @@ Index: tlpkg/TeXLive/TLPDB.pm if ($d =~ m!^container_split_doc_files/(.*)$!) { return "$1"; } -@@ -968,8 +1084,14 @@ +@@ -968,8 +1083,14 @@ sub config_container_format { my $self = shift; @@ -269,7 +268,7 @@ Index: tlpkg/TeXLive/TLPDB.pm if ($d =~ m!^container_format/(.*)$!) { return "$1"; } -@@ -988,8 +1110,14 @@ +@@ -988,8 +1109,14 @@ sub config_release { my $self = shift; @@ -286,7 +285,7 @@ Index: tlpkg/TeXLive/TLPDB.pm if ($d =~ m!^release/(.*)$!) { return "$1"; } -@@ -1008,8 +1136,14 @@ +@@ -1008,8 +1135,14 @@ sub config_minrelease { my $self = shift; @@ -303,7 +302,7 @@ Index: tlpkg/TeXLive/TLPDB.pm if ($d =~ m!^minrelease/(.*)$!) { return "$1"; } -@@ -1029,8 +1163,14 @@ +@@ -1029,8 +1162,14 @@ sub config_revision { my $self = shift; @@ -320,7 +319,7 @@ Index: tlpkg/TeXLive/TLPDB.pm if ($d =~ m!^revision/(.*)$!) { return "$1"; } -@@ -1056,12 +1196,12 @@ +@@ -1056,12 +1195,12 @@ sub sizes_of_packages { my ($self, $opt_src, $opt_doc, @packs) = @_; @packs || ( @packs = $self->list_packages() ); @@ -334,7 +333,7 @@ Index: tlpkg/TeXLive/TLPDB.pm if (!defined($tlpobjs{$p})) { warn "STRANGE: $p not to be found in ", $self->root; next; -@@ -1085,7 +1225,7 @@ +@@ -1085,7 +1224,7 @@ $size += $tlpobj->srccontainersize if $opt_src; $size += $tlpobj->doccontainersize if $opt_doc; } else { @@ -343,7 +342,7 @@ Index: tlpkg/TeXLive/TLPDB.pm # installation of src and doc file $size = $tlpobj->runsize; $size += $tlpobj->srcsize if $opt_src; -@@ -1108,6 +1248,16 @@ +@@ -1108,6 +1247,16 @@ sub install_package { my ($self, $pkg, $totlpdb, $nopostinstall, $fallbackmedia) = @_; @@ -360,7 +359,7 @@ Index: tlpkg/TeXLive/TLPDB.pm my $fromtlpdb = $self; my $ret; die("TLPDB not initialized, cannot find tlpdb!") unless (defined($fromtlpdb)); -@@ -1547,7 +1697,12 @@ +@@ -1547,7 +1696,12 @@ sub _set_value_pkg { my ($self,$pkgname,$pre,$key,$value) = @_; my $k = "$pre$key"; @@ -374,7 +373,7 @@ Index: tlpkg/TeXLive/TLPDB.pm my @newdeps; if (!defined($pkg)) { $pkg = new TeXLive::TLPOBJ; -@@ -1585,8 +1740,14 @@ +@@ -1585,8 +1739,14 @@ sub _value_pkg { my ($self,$pkg,$pre,$key) = @_; my $k = "$pre$key"; @@ -391,7 +390,7 @@ Index: tlpkg/TeXLive/TLPDB.pm if ($d =~ m!^$k:(.*)$!) { return "$1"; } -@@ -1699,7 +1860,12 @@ +@@ -1699,7 +1859,12 @@ my ($self, $pre, $hr) = @_; my @allowed = keys %$hr; my %ret; @@ -405,7 +404,7 @@ Index: tlpkg/TeXLive/TLPDB.pm if (defined($pkg)) { foreach my $d ($pkg->depends) { if ($d =~ m!^$pre([^:]*):(.*)!) { -@@ -1848,6 +2014,122 @@ +@@ -1848,6 +2013,122 @@ =back @@ -542,7 +541,29 @@ Index: texmf/scripts/texlive/tlmgr.pl } elsif ($action =~ m/^list$/i) { action_list(); finish(0); -@@ -3119,7 +3122,116 @@ +@@ -1937,7 +1940,12 @@ + # intersection, don't check A\B and B\A + next if $newpkgs_full{$p}; + next if $removals_full{$p}; +- next if ($remotetlpdb->get_package($p)->category ne "Collection"); ++ my $remotetlp = $remotetlpdb->get_package($p); ++ if (!defined($remotetlp)) { ++ tlwarn("Strange, $p mentioned but not found anywhere!\n"); ++ next; ++ } ++ next if ($remotetlp->category ne "Collection"); + my $tlp = $localtlpdb->get_package($p); + if (!defined($tlp)) { + if ($opts{"reinstall-forcibly-removed"}) { +@@ -2904,6 +2912,7 @@ + if (!(@new || @updated)) { + info("tlmgr: no updates available\n"); + if ($remotetlpdb->media ne "NET" ++ && $remotetlpdb->media ne "virtual" + && !$opts{"dry-run"} + && !$opts{"repository"} + ) { +@@ -3119,7 +3128,116 @@ return; } @@ -659,7 +680,7 @@ Index: texmf/scripts/texlive/tlmgr.pl # OPTION # sub action_option { -@@ -4466,6 +4578,45 @@ +@@ -4466,6 +4584,47 @@ # sub init_tlmedia { @@ -686,14 +707,16 @@ Index: texmf/scripts/texlive/tlmgr.pl + $remotetlpdb = TeXLive::TLPDB->new(); + $remotetlpdb->make_virtual; + ++ my $locstr = $repos{'main'}; + for my $t (@tags) { + my $tlmdb = setup_one_remotetlpdb($repos{$t}); + $remotetlpdb->virtual_add_tlpdb($tlmdb, $t); ++ $locstr .= " $repos{$t}" if ($t ne 'main'); + } + # 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$locstr\n" if $::machinereadable; ++ info("tlmgr: package repository $locstr\n"); + +} + @@ -705,7 +728,7 @@ Index: texmf/scripts/texlive/tlmgr.pl if (defined($remotetlpdb) && ($remotetlpdb->root eq $location)) { # nothing to be done return; -@@ -4479,11 +4630,29 @@ +@@ -4479,11 +4638,29 @@ $location =~ s,^$TeXLiveServerURL,$mirrorbase,; } @@ -735,7 +758,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, -@@ -4628,6 +4797,8 @@ +@@ -4628,6 +4805,8 @@ close($tlfh); } } -- cgit v1.2.3