diff options
author | Norbert Preining <preining@logic.at> | 2008-08-21 18:17:53 +0000 |
---|---|---|
committer | Norbert Preining <preining@logic.at> | 2008-08-21 18:17:53 +0000 |
commit | 07c9d41be5a40484e80b962ce1de39aa1afa8b17 (patch) | |
tree | 640b95ade0e434b9cbf849432072e42c82400de5 /Master/tlpkg | |
parent | 4ab0e098ab15e8dcaeef87533f1481400a7b323a (diff) |
add some patches which should/will/hopefully be included at some point
git-svn-id: svn://tug.org/texlive/trunk@10393 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/tlpkg')
-rw-r--r-- | Master/tlpkg/etc/include-schemes.diff | 27 | ||||
-rw-r--r-- | Master/tlpkg/etc/installed_avail_archs.diff | 219 | ||||
-rw-r--r-- | Master/tlpkg/etc/tl-update-containers.diff | 81 |
3 files changed, 327 insertions, 0 deletions
diff --git a/Master/tlpkg/etc/include-schemes.diff b/Master/tlpkg/etc/include-schemes.diff new file mode 100644 index 00000000000..d7799a3836e --- /dev/null +++ b/Master/tlpkg/etc/include-schemes.diff @@ -0,0 +1,27 @@ +Index: install-tl +=================================================================== +--- install-tl (revision 10152) ++++ install-tl (working copy) +@@ -490,6 +490,22 @@ + &$h(); + } + do_postinst_stuff(); ++ # now we save every scheme that is fully covered by the stuff we have ++ # installed to the $localtlpdb ++ foreach my $s ($tlpdb->schemes) { ++ my $stlp = $tlpdb->get_package($s); ++ die ("That cannot happen, $s not defined in tlpdb") unless defined($stlp); ++ my $incit = 1; ++ foreach my $d ($stlp->depends) { ++ if (!defined($localtlpdb->get_package($d))) { ++ $incit = 0; ++ last; ++ } ++ } ++ if ($incit) { ++ $localtlpdb->add_tlpobj($stlp); ++ } ++ } + $localtlpdb->save unless $vars{'from_dvd'}; + foreach $h (@::end_install_hook) { + &$h(); diff --git a/Master/tlpkg/etc/installed_avail_archs.diff b/Master/tlpkg/etc/installed_avail_archs.diff new file mode 100644 index 00000000000..95fe5bb9460 --- /dev/null +++ b/Master/tlpkg/etc/installed_avail_archs.diff @@ -0,0 +1,219 @@ +Index: install-tl +=================================================================== +--- install-tl (revision 10389) ++++ install-tl (working copy) +@@ -921,7 +921,7 @@ + if ($vars{$_}) { push @archs, $1; } + } + } +- $localtlpdb->option_available_architectures(@archs); ++ $localtlpdb->option_installed_architectures(@archs); + $localtlpdb->save() unless $vars{'from_dvd'}; + } + +Index: tlpkg/TeXLive/TLPDB.pm +=================================================================== +--- tlpkg/TeXLive/TLPDB.pm (revision 10391) ++++ tlpkg/TeXLive/TLPDB.pm (working copy) +@@ -27,6 +27,7 @@ + $tlpdb->writeout(FILEHANDLE); + $tlpdb->save; + $tlpdb->available_architectures(); ++ $tlpdb->installed_architectures(); + $tlpdb->add_tlpcontainer($pkg, $ziploc [, $archrefs [, $dest ]] ); + $tlpdb->add_tlpobj($tlpobj); + $tlpdb->needed_by($pkg); +@@ -141,7 +142,7 @@ + if ($tlp->category =~ m/$MetaCategoriesRegexp/) { + foreach my $d ($tlp->depends) { + if ($d =~ m/^(.*)\.win32$/) { +- if (member("win32", $self->available_architectures)) { ++ if (member("win32", $self->installed_architectures)) { + if ($d eq $pkg) { + push @ret, $p; + last; +@@ -311,17 +312,16 @@ + + =pod + +-=item C<< $tlpdb->available_architectures >> ++=item C<< $tlpdb->installed_architectures >> + +-The C<available_architectures> functions returns the list of available +-architectures as set in the options section +-(i.e., using option_available_architectures) ++The C<installed_architectures> function returns the list of installed ++architectures, as set as variable in 00texlive-installation.config. + + =cut + +-sub available_architectures { ++sub installed_architectures { + my $self = shift; +- my @archs = $self->option_available_architectures; ++ my @archs = $self->option_installed_architectures; + if (! @archs) { + # fall back to the old method checking bin-tex\.* + my @packs = $self->list_packages; +@@ -330,8 +330,30 @@ + return @archs; + } + ++ + =pod + ++=item C<< $tlpdb->available_architectures >> ++ ++The C<available_architectures> function returns the list of available ++architectures as set in the 00texlive.config package. ++ ++=cut ++ ++sub available_architectures { ++ my $self = shift; ++ if (defined($self->{'tlps'}{'00texlive.config'})) { ++ foreach my $d ($self->{'tlps'}{'00texlive.config'}->depends) { ++ if ($d =~ m!^available_architectures/(.*)$!) { ++ return split ' ', "$1"; ++ } ++ } ++ } ++ return; ++} ++ ++=pod ++ + =item C<< $tlpdb->add_tlpcontainer($pkg, $ziploc [, $archrefs [, $dest ]] ) >> + + Installs the package C<$pkg> from the container files in C<$ziploc>. If +@@ -858,10 +880,10 @@ + return; + } + +-sub option_available_architectures { ++sub option_installed_architectures { + my $self = shift; +- if (@_) { $self->_set_option_value("available_architectures","@_"); } +- my @archs = split ' ', $self->_option_value("available_architectures"); ++ if (@_) { $self->_set_option_value("installed_architectures","@_"); } ++ my @archs = split ' ', $self->_option_value("installed_architectures"); + return @archs; + } + sub option_create_symlinks { +Index: tlpkg/TeXLive/TLMedia.pm +=================================================================== +--- tlpkg/TeXLive/TLMedia.pm (revision 10391) ++++ tlpkg/TeXLive/TLMedia.pm (working copy) +@@ -68,7 +68,7 @@ + } + } + my (@systems); +- @systems = $tlpdb->available_architectures; ++ @systems = $tlpdb->installed_architectures; + $self->{'media'} = $media; + $self->{'location'} = $location; + $self->{'tlpdb'} = $tlpdb; +@@ -210,7 +210,7 @@ + # we only want to try to install a .ARCH package if it actually contains + # files + my $foo = $1; +- foreach my $a ($totlpdb->available_architectures) { ++ foreach my $a ($totlpdb->installed_architectures) { + if (defined($fromtlpdb->get_package("$foo.$a")) && + !defined($totlpdb->get_package("$foo.$a"))) { + merge_into(\%ret, +@@ -219,7 +219,7 @@ + } + } elsif ($d =~ m/^(.*).win32$/) { + # install only of win32 is under the available archs +- if (TeXLive::TLUtils::member("win32",$totlpdb->available_architectures)) { ++ if (TeXLive::TLUtils::member("win32",$totlpdb->installed_architectures)) { + merge_into(\%ret, + $self->install_package($d, $totlpdb, $nodepends, $nopostinstall, $fallbackmedia)); + } +Index: tlpkg/bin/tlpsrc2tlpdb +=================================================================== +--- tlpkg/bin/tlpsrc2tlpdb (revision 10389) ++++ tlpkg/bin/tlpsrc2tlpdb (working copy) +@@ -113,6 +113,10 @@ + if ($tlp->name eq "00texlive.config") { + my @bar = $tlp->depends; + push @bar, "revision/".$tltree->revision; ++ # add the list of available architectures to 00texlive.config which ++ # is the source of information at installation time ++ my @foo = $tltree->architectures; ++ push @bar, "available_architectures/@foo"; + $tlp->depends (@bar); + } + $tldb->add_tlpobj ($tlp); +@@ -123,7 +127,13 @@ + if ($opt_all) { + $tldb->root ($opt_master); + # do set the option_archs from the dirs in Master/bin +- $tldb->option_available_architectures ($tltree->architectures); ++ # we have to set two times the list of architectures: Once the list ++ # of available architectures as saved in 00texlive.config, and once ++ # (for running directly from the svn checkout) the list of ++ # installed packages in 00texlive-installation.config ++ # The former part in 00texlive.config is done above, the later part ++ # is done here: ++ $tldb->option_installed_architectures ($tltree->architectures); + $tldb->save; + info ("$0: wrote $src_count packages to ". $tldb->root . ".\n"); + } else { +Index: texmf/scripts/texlive/tlmgr.pl +=================================================================== +--- texmf/scripts/texlive/tlmgr.pl (revision 10391) ++++ texmf/scripts/texlive/tlmgr.pl (working copy) +@@ -275,7 +275,7 @@ + # remove those bin dependencies .ARCH + foreach my $d ($tlp->depends) { + if ($d eq "$pkg.ARCH") { +- foreach my $a ($localtlpdb->available_architectures) { ++ foreach my $a ($localtlpdb->installed_architectures) { + if (defined($localtlpdb->get_package("$pkg.$a"))) { + merge_into(\%ret, + &remove_package("$pkg.$a", $localtlpdb, $force)); +@@ -884,7 +884,7 @@ + $tlmediasrc = TeXLive::TLMedia->new($location); + die($loadmediasrcerror . $location) unless defined($tlmediasrc); + my $mediatlpdb = $tlmediasrc->tlpdb; +- my @already_installed_arch = $localtlpdb->available_architectures; ++ my @already_installed_arch = $localtlpdb->installed_architectures; + print "Available architectures:\n"; + foreach my $a ($mediatlpdb->available_architectures) { + if (member($a,@already_installed_arch)) { +@@ -900,7 +900,7 @@ + $tlmediasrc = TeXLive::TLMedia->new($location); + die($loadmediasrcerror . $location) unless defined($tlmediasrc); + my $mediatlpdb = $tlmediasrc->tlpdb; +- my @already_installed_arch = $localtlpdb->available_architectures; ++ my @already_installed_arch = $localtlpdb->installed_architectures; + my @available_arch = $mediatlpdb->available_architectures; + my @todoarchs; + foreach my $a (@ARGV) { +@@ -937,9 +937,9 @@ + merge_into (\%ret, $tlmediasrc->install_package("bin-tlpsv.win32", $localtlpdb, 1, 0)); + } + # update the option_archs list of installed archs +- my @larchs = $localtlpdb->option_available_architectures; ++ my @larchs = $localtlpdb->option_installed_architectures; + push @larchs, @todoarchs; +- $localtlpdb->option_available_architectures(@larchs); ++ $localtlpdb->option_installed_architectures(@larchs); + $localtlpdb->save; + } else { + die "Unknown option for arch: $what"; +Index: texmf/scripts/texlive/tlmgrgui/gui-arch.pl +=================================================================== +--- texmf/scripts/texlive/tlmgrgui/gui-arch.pl (revision 10391) ++++ texmf/scripts/texlive/tlmgrgui/gui-arch.pl (working copy) +@@ -32,7 +32,7 @@ + } else { + @archsavail = $tlmediatlpdb->available_architectures; + } +- @archsinstalled = $localtlpdb->available_architectures; ++ @archsinstalled = $localtlpdb->installed_architectures; + foreach my $a (@archsavail) { + $archs{$a} = 0; + if (grep(/^$a$/,@archsinstalled)) { diff --git a/Master/tlpkg/etc/tl-update-containers.diff b/Master/tlpkg/etc/tl-update-containers.diff new file mode 100644 index 00000000000..82d44a6b4a8 --- /dev/null +++ b/Master/tlpkg/etc/tl-update-containers.diff @@ -0,0 +1,81 @@ +Index: tl-update-containers +=================================================================== +--- tl-update-containers (revision 10389) ++++ tl-update-containers (working copy) +@@ -23,16 +23,21 @@ + use Pod::Usage; + use File::Path; + ++ ++my @critical_pkg_list = qw/bin-texlive texlive\.infra/; ++ + our $mydir; + my $opt_location = "."; + my $opt_relative = 0; + my $opt_recreate = 0; + my $help = 0; ++my $opt_all = 0; + + TeXLive::TLUtils::process_logging_options(); + GetOptions( + "location=s" => \$opt_location, + "recreate" => \$opt_recreate, ++ "all|a" => \$opt_all, + "help|?" => \$help) or pod2usage(1); + + pod2usage(-exitstatus => 0, -verbose => 2) if $help; +@@ -144,9 +149,30 @@ + &TeXLive::TLUtils::setup_programs("$Master/tlpkg/installer"); + + # get list of packages. +- for my $pkg (sort @todopacks) { ++ PACKS: for my $pkg (sort @todopacks) { + next if ($pkg eq "00texlive.config"); + next if ($pkg eq "00texlive.installer"); ++ foreach my $manualpkgre (@critical_pkg_list) { ++ # we match the initial string of the package name, so that all the ++ # .arch packages are skipped, too ++ if ($pkg =~ m/^$manualpkgre/) { ++ if ($opt_all || $opt_recreate) { ++ tlwarn ("updating container for $pkg due to -all option!\n"); ++ last; # of the manualpkgre checks ++ } else { ++ tlwarn ("not updating $pkg since it it in the manual update list!\n"); ++ # we assume that the packages in @critical_pkg_list always ++ # exist, so if they are there then the number of updated packages ++ # should be reduced. ++ $count{'updated'}--; ++ # the following line skips all other regexp checks on critical ++ # packages and skips everything below this big for list (the ++ # part which actually builds the containers) and continues with ++ # the next package (the PACKS: for my $pkg (sort @todopacks) line ++ next PACKS; ++ } ++ } ++ } + my $obj = $tlpdb->get_package ($pkg); + die "$0: no TL package named $pkg in $Master" if ! $obj; + debug("updating $pkg containers ...\n"); +@@ -198,7 +224,7 @@ + } + + # next we remove those containers which have been gone! +- foreach my $op (@removepacks) { ++ for my $op (@removepacks) { + info("$op has disappeared, removing its containers\n"); + `rm $opt_containerdir/$op.*`; + $nettlpdb->remove_package($op); +@@ -247,6 +273,13 @@ + The location to find the previously generated containers; + default is C<./archive>. + ++=item B<-recreate> ++Does a full rebuild of all packages. ++ ++=item B<-all|-a> ++Will update also packages which are exempted due to possible breakage ++(currently texlive.infra and bin-texlive). ++ + =back + + The standard options C<-help> and C<-debug> are also accepted. |