summaryrefslogtreecommitdiff
path: root/Master/tlpkg
diff options
context:
space:
mode:
authorNorbert Preining <preining@logic.at>2009-05-12 15:53:11 +0000
committerNorbert Preining <preining@logic.at>2009-05-12 15:53:11 +0000
commit7e5585bcd4f8ba119cad8f0a7e13b6a7a610776f (patch)
treec48db3cea0e4511d09d0e7b7fdf7ef7a04f68f6e /Master/tlpkg
parentc84165218f94bc15a1441e91a421f4d070bc5eb7 (diff)
Move most of the stuff from tlpkg, tlmgr from branch to trunk
git-svn-id: svn://tug.org/texlive/trunk@13054 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/tlpkg')
-rw-r--r--Master/tlpkg/TeXLive/TLConfig.pm28
-rw-r--r--Master/tlpkg/TeXLive/TLMedia.pm229
-rw-r--r--Master/tlpkg/TeXLive/TLPDB.pm187
-rw-r--r--Master/tlpkg/TeXLive/TLPOBJ.pm168
-rw-r--r--Master/tlpkg/TeXLive/TLPSRC.pm71
-rw-r--r--Master/tlpkg/TeXLive/TLTREE.pm10
-rw-r--r--Master/tlpkg/TeXLive/TLUtils.pm399
-rw-r--r--Master/tlpkg/TeXLive/TLWinGoo.pm48
-rwxr-xr-xMaster/tlpkg/bin/check-duplicated-runfiles6
-rwxr-xr-xMaster/tlpkg/bin/check-tlnet-consistency22
-rwxr-xr-xMaster/tlpkg/bin/tl-fix-container-infos14
-rwxr-xr-xMaster/tlpkg/bin/tl-makeself-from-tlnet20
-rwxr-xr-xMaster/tlpkg/bin/tl-update-containers57
-rwxr-xr-xMaster/tlpkg/bin/tl-update-nsis12
-rwxr-xr-xMaster/tlpkg/bin/tl-update-tlcritical2
-rwxr-xr-xMaster/tlpkg/bin/tlpfiles3
-rwxr-xr-xMaster/tlpkg/bin/tlpkg-by-size6
-rwxr-xr-xMaster/tlpkg/bin/tlpkg-ctan-check3
-rwxr-xr-xMaster/tlpkg/bin/tlprm3
-rw-r--r--Master/tlpkg/installer/install-menu-perltk.pl28
-rwxr-xr-xMaster/tlpkg/installer/install-menu-text.pl142
-rw-r--r--Master/tlpkg/installer/install-translations.pl9
-rw-r--r--Master/tlpkg/installer/lang/perltk-cs2
-rw-r--r--Master/tlpkg/installer/lang/perltk-de2
-rw-r--r--Master/tlpkg/installer/lang/perltk-en.sample2
-rw-r--r--Master/tlpkg/installer/lang/perltk-fr2
-rw-r--r--Master/tlpkg/installer/lang/perltk-it2
-rw-r--r--Master/tlpkg/installer/lang/perltk-nl2
-rw-r--r--Master/tlpkg/installer/lang/perltk-pl2
-rw-r--r--Master/tlpkg/installer/lang/perltk-sl2
-rw-r--r--Master/tlpkg/installer/lang/perltk-vi2
-rw-r--r--Master/tlpkg/installer/lang/perltk-zh-cn2
-rw-r--r--Master/tlpkg/installer/lang/perltk-zh-tw2
-rwxr-xr-xMaster/tlpkg/installer/lzma/lzma.alpha-linuxbin120888 -> 0 bytes
-rwxr-xr-xMaster/tlpkg/installer/lzma/lzma.amd64-freebsdbin107048 -> 0 bytes
-rw-r--r--Master/tlpkg/installer/lzma/lzma.exebin69632 -> 0 bytes
-rwxr-xr-xMaster/tlpkg/installer/lzma/lzma.hppa-hpuxbin164818 -> 0 bytes
-rwxr-xr-xMaster/tlpkg/installer/lzma/lzma.i386-freebsdbin103456 -> 0 bytes
-rwxr-xr-xMaster/tlpkg/installer/lzma/lzma.i386-linuxbin78568 -> 0 bytes
-rwxr-xr-xMaster/tlpkg/installer/lzma/lzma.i386-openbsdbin100148 -> 0 bytes
-rwxr-xr-xMaster/tlpkg/installer/lzma/lzma.i386-solarisbin133140 -> 0 bytes
-rwxr-xr-xMaster/tlpkg/installer/lzma/lzma.mips-irixbin204388 -> 0 bytes
-rwxr-xr-xMaster/tlpkg/installer/lzma/lzma.powerpc-aixbin207772 -> 0 bytes
-rwxr-xr-xMaster/tlpkg/installer/lzma/lzma.powerpc-linuxbin113260 -> 0 bytes
-rwxr-xr-xMaster/tlpkg/installer/lzma/lzma.sparc-linuxbin102072 -> 0 bytes
-rwxr-xr-xMaster/tlpkg/installer/lzma/lzma.sparc-solarisbin141340 -> 0 bytes
-rwxr-xr-xMaster/tlpkg/installer/lzma/lzma.universal-darwinbin578644 -> 0 bytes
-rwxr-xr-xMaster/tlpkg/installer/lzma/lzma.x86_64-linuxbin97648 -> 0 bytes
-rwxr-xr-xMaster/tlpkg/installer/lzma/lzmadec.alpha-linuxbin14320 -> 0 bytes
-rwxr-xr-xMaster/tlpkg/installer/lzma/lzmadec.amd64-freebsdbin12456 -> 0 bytes
-rwxr-xr-xMaster/tlpkg/installer/lzma/lzmadec.hppa-hpuxbin24691 -> 0 bytes
-rwxr-xr-xMaster/tlpkg/installer/lzma/lzmadec.i386-freebsdbin10596 -> 0 bytes
-rwxr-xr-xMaster/tlpkg/installer/lzma/lzmadec.i386-linuxbin10032 -> 0 bytes
-rwxr-xr-xMaster/tlpkg/installer/lzma/lzmadec.i386-openbsdbin10404 -> 0 bytes
-rwxr-xr-xMaster/tlpkg/installer/lzma/lzmadec.i386-solarisbin10956 -> 0 bytes
-rwxr-xr-xMaster/tlpkg/installer/lzma/lzmadec.mips-irixbin19580 -> 0 bytes
-rwxr-xr-xMaster/tlpkg/installer/lzma/lzmadec.powerpc-aixbin11099 -> 0 bytes
-rwxr-xr-xMaster/tlpkg/installer/lzma/lzmadec.powerpc-linuxbin13984 -> 0 bytes
-rwxr-xr-xMaster/tlpkg/installer/lzma/lzmadec.sparc-linuxbin10876 -> 0 bytes
-rwxr-xr-xMaster/tlpkg/installer/lzma/lzmadec.sparc-solarisbin15152 -> 0 bytes
-rwxr-xr-xMaster/tlpkg/installer/lzma/lzmadec.universal-darwinbin46664 -> 0 bytes
-rwxr-xr-xMaster/tlpkg/installer/lzma/lzmadec.win32.exebin12288 -> 0 bytes
-rwxr-xr-xMaster/tlpkg/installer/lzma/lzmadec.x86_64-linuxbin14728 -> 0 bytes
-rwxr-xr-xMaster/tlpkg/installer/xz/xz.exebin0 -> 172032 bytes
-rwxr-xr-xMaster/tlpkg/installer/xz/xz.i386-cygwin.exebin0 -> 145408 bytes
-rwxr-xr-xMaster/tlpkg/installer/xz/xz.i386-linuxbin0 -> 474281 bytes
-rwxr-xr-xMaster/tlpkg/installer/xz/xz.universal-darwinbin0 -> 310348 bytes
-rwxr-xr-xMaster/tlpkg/installer/xz/xz.x86_64-linuxbin0 -> 157728 bytes
-rwxr-xr-xMaster/tlpkg/installer/xz/xzdec.exebin0 -> 77824 bytes
-rwxr-xr-xMaster/tlpkg/installer/xz/xzdec.i386-cygwin.exebin0 -> 70656 bytes
-rwxr-xr-xMaster/tlpkg/installer/xz/xzdec.i386-linuxbin0 -> 221414 bytes
-rwxr-xr-xMaster/tlpkg/installer/xz/xzdec.universal-darwinbin0 -> 161716 bytes
-rwxr-xr-xMaster/tlpkg/installer/xz/xzdec.x86_64-linuxbin0 -> 72528 bytes
-rw-r--r--Master/tlpkg/tlpsrc/00texlive.config.tlpsrc10
-rw-r--r--Master/tlpkg/tlpsrc/00texlive.core.tlpsrc2
-rw-r--r--Master/tlpkg/tlpsrc/00texlive.installation.tlpsrc (renamed from Master/tlpkg/tlpsrc/00texlive-installation.config.tlpsrc)8
-rw-r--r--Master/tlpkg/tlpsrc/00texlive.installer.tlpsrc16
77 files changed, 1122 insertions, 403 deletions
diff --git a/Master/tlpkg/TeXLive/TLConfig.pm b/Master/tlpkg/TeXLive/TLConfig.pm
index f75ed3b392d..a148fc0ae31 100644
--- a/Master/tlpkg/TeXLive/TLConfig.pm
+++ b/Master/tlpkg/TeXLive/TLConfig.pm
@@ -11,6 +11,7 @@ BEGIN {
use vars qw( @ISA @EXPORT_OK @EXPORT );
@ISA = qw(Exporter);
@EXPORT_OK = qw(
+ $ReleaseYear
@MetaCategories
@NormalCategories
@Categories
@@ -28,10 +29,17 @@ BEGIN {
$WinSpecialUpdatePackagesRegexp
@CriticalPackagesList
@AllowedConfigOptions
+ $WindowsMainMenuName
+ $RelocPrefix
+ $RelocTree
);
@EXPORT = @EXPORT_OK;
}
+# the year of our release, will be used in the location of the
+# network packges, and in menu names, and probably many other places
+$ReleaseYear = 2009;
+
# Meta Categories do not ship files, but call only for other packages
our @MetaCategories = qw/Collection Scheme/;
our $MetaCategoriesRegexp = '(Collection|Scheme)';
@@ -53,17 +61,20 @@ our $DatabaseName = "texlive.tlpdb";
our $BlockSize = 4096;
# the way we package things on the web
-our $DefaultContainerExtension = "tar.lzma";
+our $DefaultContainerExtension = "tar.xz";
our $Archive = "archive";
our $TeXLiveServerURL = "http://mirror.ctan.org";
-our $TeXLiveServerPath = "systems/texlive/tlnet/2008";
+our $TeXLiveServerPath = "systems/texlive/tlnet/$ReleaseYear";
our $TeXLiveURL = "$TeXLiveServerURL/$TeXLiveServerPath";
+our $RelocTree = "texmf-dist";
+our $RelocPrefix = "RELOC";
our $WinSpecialUpdatePackagesRegexp =
'^(texlive\.infra|bin-tlperl\.win32$|bin-texlive)';
+
our @CriticalPackagesList = qw/texlive.infra bin-texlive/;
push(@CriticalPackagesList, "bin-tlperl.win32") if ($^O=~/^MSWin(32|64)$/i);
@@ -84,6 +95,8 @@ our @AllowedConfigOptions = qw/
autobackup
/;
+our $WindowsMainMenuName = "TeX Live $ReleaseYear";
+
1;
@@ -165,7 +178,16 @@ since they are too central, currently bin-texlive and texlive.infra.
=item C<@TeXLive::TLConfig::AllowedConfigOptions>
-A list of a config options that can be set in 00texlive-installation.config.
+A list of a config options that can be set in 00texlive.installation.
+
+=item C<$TeXLive::TLConfig::RelocTree>
+
+the texmf-tree name that can be relocated, defaults to "texmf-dist"
+
+=item C<$TeXLive::TLConfig::RelocPrefix>
+
+The string that replaces the RelocTree in the tlpdb if a package is
+reloaced, defaults to "RELOC".
=back
diff --git a/Master/tlpkg/TeXLive/TLMedia.pm b/Master/tlpkg/TeXLive/TLMedia.pm
index 344b4a0d2b7..70c5cd67679 100644
--- a/Master/tlpkg/TeXLive/TLMedia.pm
+++ b/Master/tlpkg/TeXLive/TLMedia.pm
@@ -8,9 +8,8 @@
package TeXLive::TLMedia;
use TeXLive::TLConfig;
-use TeXLive::TLPostActions;
use TeXLive::TLUtils qw(copy win32 dirname mkdirhier basename download_file
- merge_into debug ddebug info tlwarn);
+ merge_into debug ddebug info tlwarn log);
use TeXLive::TLPDB;
sub new
@@ -42,7 +41,7 @@ sub new
}
}
debug("Loading $location/$InfraLocation/$DatabaseName ...\n");
- my $tlpdb = TeXLive::TLPDB->new(root => "$location");
+ my $tlpdb = TeXLive::TLPDB->new(root => $location);
return(undef) unless defined($tlpdb);
my (@all_c, @std_c, @lang_c, @lang_doc_c);
my (@schemes);
@@ -117,6 +116,7 @@ sub install_package {
# even if opt_doc is false
$real_opt_doc = 1;
}
+ my $reloc = 1 if $tlpobj->relocated;
my $container;
my @installfiles;
my $location = $self->location;
@@ -146,16 +146,17 @@ sub install_package {
} elsif ($media eq 'CD') {
if (-r "$location/$Archive/$pkg.zip") {
$container = "$location/$Archive/$pkg.zip";
- } elsif (-r "$location/$Archive/$pkg.tar.lzma") {
- $container = "$location/$Archive/$pkg.tar.lzma";
+ } elsif (-r "$location/$Archive/$pkg.tar.xz") {
+ $container = "$location/$Archive/$pkg.tar.xz";
} else {
- tlwarn("Cannot find a package $pkg (.zip or .lzma) in $location/$Archive\n");
+ tlwarn("Cannot find a package $pkg (.zip or .xz) in $location/$Archive\n");
next;
}
} elsif (&media eq 'NET') {
$container = "$location/$Archive/$pkg.$DefaultContainerExtension";
}
- $self->_install_package($container,\@installfiles,$totlpdb) || return(0);
+ $self->_install_package ($container, $reloc, \@installfiles, $totlpdb)
+ || return(0);
# if we are installing from CD or NET we have to fetch the respective
# source and doc packages $pkg.source and $pkg.doc and install them, too
if (($media eq 'NET') || ($media eq 'CD')) {
@@ -164,21 +165,39 @@ sub install_package {
# - src/doc files should be installed
# (- the package is not already a split one (like .i386-linux))
# the above test has been removed because it would mean that
- # texlive.infra.doc.tar.lzma
+ # texlive.infra.doc.tar.xz
# will never be installed, and we do already check that there
# are at all src/doc files, which in split packages of the form
# foo.ARCH are not present. And if they are present, than that is fine,
- # too (bin-foobar.win32.doc.tar.lzma)
+ # too (bin-foobar.win32.doc.tar.xz)
# - there are actually src/doc files present
if ($container_src_split && $opt_src && $tlpobj->srcfiles) {
my $srccontainer = $container;
- $srccontainer =~ s/(\.tar\.lzma|\.zip)$/.source$1/;
- $self->_install_package($srccontainer,\@installfiles,$totlpdb) || return(0);
+ $srccontainer =~ s/(\.tar\.xz|\.zip)$/.source$1/;
+ $self->_install_package ($srccontainer, $reloc, \@installfiles, $totlpdb)
+ || return(0);
}
if ($container_doc_split && $real_opt_doc && $tlpobj->docfiles) {
my $doccontainer = $container;
- $doccontainer =~ s/(\.tar\.lzma|\.zip)$/.doc$1/;
- $self->_install_package($doccontainer,\@installfiles,$totlpdb) || return(0);
+ $doccontainer =~ s/(\.tar\.xz|\.zip)$/.doc$1/;
+ $self->_install_package ($doccontainer, $reloc, \@installfiles, $totlpdb)
+ || return(0);
+ }
+ #
+ # if we installed from NET/CD and we got a relocatable container
+ # make sure that the stray texmf-dist/tlpkg directory is removed
+ # in USER MODE that should NOT be done because we keep the information
+ # there, but for now do it unconditionally
+ if ($tlpobj->relocated) {
+ my $reloctree = $totlpdb->root . "/" . $TeXLive::TLConfig::RelocTree;
+ my $tlpkgdir = $reloctree . "/" . $TeXLive::TLConfig::InfraLocation;
+ my $tlpod = $tlpkgdir . "/tlpobj";
+ TeXLive::TLUtils::rmtree($tlpod) if (-d $tlpod);
+ # we try to remove the tlpkg directory, that will succeed only
+ # if it is empty. So in normal installations it won't be, but
+ # if we are installing a relocated package it is texmf-dist/tlpkg
+ # which will be (hopefully) empty
+ rmdir($tlpkgdir) if (-d "$tlpkgdir");
}
}
# we don't want to have wrong information in the tlpdb, so remove the
@@ -190,7 +209,7 @@ sub install_package {
$tlpobj->clear_docfiles;
}
# we have to write out the tlpobj file since it is contained in the
- # archives (.tar.lzma) but at DVD install time we don't have them
+ # archives (.tar.xz) but at DVD install time we don't have them
my $tlpod = $totlpdb->root . "/tlpkg/tlpobj";
mkdirhier( $tlpod );
open(TMP,">$tlpod/".$tlpobj->name.".tlpobj") or
@@ -204,10 +223,12 @@ sub install_package {
merge_into(\%ret, $tlpobj->make_return_hash_from_executes("enable"));
if (!$nopostinstall) {
# do the postinstallation actions
- if (defined($PostInstall{$pkg})) {
- info("running post install action for $pkg\n");
- &{$PostInstall{$pkg}}($totlpdb->root);
- }
+ #
+ # Run the post installation code in the postaction tlpsrc entries
+ &TeXLive::TLUtils::do_postaction("install", $tlpobj,
+ $totlpdb->option_file_assocs,
+ $totlpdb->option_desktop_integration,
+ $totlpdb->option_post_code);
}
return \%ret;
}
@@ -219,17 +240,18 @@ sub install_package {
# returns 1 on success and 0 on error
#
sub _install_package {
- my ($self, $what, $filelistref, $totlpdb) = @_;
+ my ($self, $what, $reloc, $filelistref, $totlpdb) = @_;
my $media = $self->media;
my $target = $totlpdb->root;
+ my $tempdir = "$target/temp";
my @filelist = @$filelistref;
# we assume that $::progs has been set up!
my $wget = $::progs{'wget'};
- my $lzmadec = $::progs{'lzmadec'};
- if (!defined($wget) || !defined($lzmadec)) {
+ my $xzdec = $::progs{'xzdec'};
+ if (!defined($wget) || !defined($xzdec)) {
tlwarn("_install_package: programs not set up properly, strange.\n");
return(0);
}
@@ -246,27 +268,31 @@ sub _install_package {
}
# we always assume that copy will work
return(1);
- } elsif ($what =~ m,\.tar(\.lzma)?$,) {
- my $type = defined($1) ? "lzma" : "tar";
+ } elsif ($what =~ m,\.tar(\.xz)?$,) {
+ my $type = defined($1) ? "xz" : "tar";
+ $target .= "/$TeXLive::TLConfig::RelocTree" if $reloc;
+
# this is the case when we install from CD or the NET, or a backup
#
- # in all other cases we create temp files .tar.lzma (or use the present
- # one), lzmadec them, and then call tar
+ # in all other cases we create temp files .tar.xz (or use the present
+ # one), xzdec them, and then call tar
my $fn = basename($what);
- mkdirhier("$target/temp");
+ my $pkg = $fn;
+ $pkg =~ s/\.tar(\.xz)?$//;
+ mkdirhier("$tempdir");
my $tarfile;
my $remove_tarfile = 1;
- if ($type eq "lzma") {
- my $lzmafile = "$target/temp/$fn";
- $tarfile = "$target/temp/$fn"; $tarfile =~ s/\.lzma$//;
- my $lzmafile_quote = $lzmafile;
+ if ($type eq "xz") {
+ my $xzfile = "$tempdir/$fn";
+ $tarfile = "$tempdir/$fn"; $tarfile =~ s/\.xz$//;
+ my $xzfile_quote = $xzfile;
my $tarfile_quote = $tarfile;
my $target_quote = $target;
if (win32()) {
- $lzmafile =~ s!/!\\!g;
- $lzmafile_quote = "\"$lzmafile\"";
+ $xzfile =~ s!/!\\!g;
+ $xzfile_quote = "\"$xzfile\"";
$tarfile =~ s!/!\\!g;
$tarfile_quote = "\"$tarfile\"";
$target =~ s!/!\\!g;
@@ -275,28 +301,28 @@ sub _install_package {
if ($what =~ m,http://|ftp://,) {
# we are installing from the NET
# download the file and put it into temp
- if (!download_file($what, $lzmafile) || (! -r $lzmafile)) {
+ if (!download_file($what, $xzfile) || (! -r $xzfile)) {
tlwarn("Downloading \n");
tlwarn(" $what\n");
tlwarn("did not succeed, please retry.\n");
- unlink($tarfile, $lzmafile);
+ unlink($tarfile, $xzfile);
return(0);
}
} else {
# we are installing from CD
# copy it to temp
- copy($what, "$target/temp");
+ copy($what, $tempdir);
}
- debug("un-lzmaing $lzmafile to $tarfile\n");
- system("$lzmadec < $lzmafile_quote > $tarfile_quote");
+ debug("un-xzing $xzfile to $tarfile\n");
+ system("$xzdec < $xzfile_quote > $tarfile_quote");
if (! -f $tarfile) {
- tlwarn("_install_package: Unpacking $lzmafile failed, please retry.\n");
- unlink($tarfile, $lzmafile);
+ tlwarn("_install_package: Unpacking $xzfile failed, please retry.\n");
+ unlink($tarfile, $xzfile);
return(0);
}
- unlink($lzmafile);
+ unlink($xzfile);
} else {
- $tarfile = "$target/temp/$fn";
+ $tarfile = "$tempdir/$fn";
if ($what =~ m,http://|ftp://,) {
if (!download_file($what, $tarfile) || (! -r $tarfile)) {
tlwarn("Downloading \n");
@@ -310,13 +336,125 @@ sub _install_package {
$remove_tarfile = 0;
}
}
- return TeXLive::TLUtils::untar($tarfile, $target, $remove_tarfile);
+ my $ret = TeXLive::TLUtils::untar($tarfile, $target, $remove_tarfile);
+ # remove the $pkg.tlpobj, we recreate it anyway again
+ unlink ("$target/tlpkg/tlpobj/$pkg.tlpobj")
+ if (-r "$target/tlpkg/tlpobj/$pkg.tlpobj");
+ return $ret;
} else {
tlwarn("_install_package: Don't know how to install $what\n");
return(0);
}
}
+#
+# remove_package removes a single package with all files (including the
+# # tlpobj files) and the entry from the tlpdb.
+sub remove_package {
+ my ($self, $pkg, $nopostinstall) = @_;
+ my $localtlpdb = $self->tlpdb;
+ my $tlp = $localtlpdb->get_package($pkg);
+ my %ret;
+ if (!defined($tlp)) {
+ tlwarn ("$pkg: package not present, cannot remove\n");
+ } else {
+ if ($pkg =~ m/^texlive\.infra/) {
+ log ("Not removing $pkg, it is essential!\n");
+ return;
+ }
+ # we have to chdir to $localtlpdb->root
+ my $Master = $localtlpdb->root;
+ chdir ($Master) || die "chdir($Master) failed: $!";
+ my @files = $tlp->all_files;
+ # also remove the .tlpobj file
+ push @files, "tlpkg/tlpobj/$pkg.tlpobj";
+ # and the ones from src/doc splitting
+ if (-r "tlpkg/tlpobj/$pkg.source.tlpobj") {
+ push @files, "tlpkg/tlpobj/$pkg.source.tlpobj";
+ }
+ if (-r "tlpkg/tlpobj/$pkg.doc.tlpobj") {
+ push @files, "tlpkg/tlpobj/$pkg.doc.tlpobj";
+ }
+ #
+ # some packages might be relocated, thus having the RELOC prefix
+ # in user mode we just remove the prefix, in normal mode we
+ # replace it with texmf-dist
+ # since we don't have user mode
+ if ($tlp->relocated) {
+ for (@files) {
+ s:^$RelocPrefix/:$RelocTree/:;
+ }
+ }
+ #
+ # we want to check that a file is only listed in one package, so
+ # in case that a file to be removed is listed in another package
+ # we will warn and *not* remove it
+ my %allfiles;
+ for my $p ($localtlpdb->list_packages) {
+ next if ($p eq $pkg); # we have to skip the to be removed package
+ for my $f ($localtlpdb->get_package($p)->all_files) {
+ $allfiles{$f} = $p;
+ }
+ }
+ my @goodfiles = ();
+ my @badfiles = ();
+ for my $f (@files) {
+ # in usermode we have to add texmf-dist again for comparison
+ if (defined($allfiles{$f})) {
+ # this file should be removed but is mentioned somewhere, too
+ push @badfiles, $f;
+ } else {
+ push @goodfiles, $f;
+ }
+ }
+ if ($#badfiles >= 0) {
+ # warn the user
+ tlwarn("The following files should be removed due to the removal of $pkg,\n");
+ tlwarn("but are part of another package, too.\n");
+ for my $f (@badfiles) {
+ tlwarn(" $f - $allfiles{$f}\n");
+ }
+ }
+ #
+ # Run only the postaction code thing now since afterwards the
+ # files will be gone ...
+ if (!$nopostinstall) {
+ &TeXLive::TLUtils::do_postaction("remove", $tlp,
+ 0, # option_file_assocs,
+ 0, # option_desktop_integration,
+ $localtlpdb->option_post_code);
+ }
+ #
+ # now do the removal
+ foreach my $entry (@goodfiles) {
+ unlink $entry;
+ }
+ tlwarn("MISSING REMOVAL OF EMPTY DIRECTORIES: sub removed_dirs needed!\n");
+ #my @removals = &removed_dirs (@goodfiles);
+ #foreach my $entry (@removals) {
+ # rmdir $entry;
+ #}
+ $localtlpdb->remove_package($pkg);
+ merge_into(\%ret, $tlp->make_return_hash_from_executes("disable"));
+ $ret{'mktexlsr'} = 1;
+ # should we save at each removal???
+ # advantage: the tlpdb actually reflects what is installed
+ # disadvantage: removing a collection calls the save routine several times
+ # still I consider it better that the tlpdb is in a consistent state
+ $localtlpdb->save;
+ #
+ # Run the post installation code in the postaction tlpsrc entries
+ # the postaction code part cannot be evaluated now since the
+ # files are already removed.
+ if (!$nopostinstall) {
+ &TeXLive::TLUtils::do_postaction("remove", $tlp,
+ $localtlpdb->option_file_assocs,
+ $localtlpdb->option_desktop_integration,
+ 0);
+ }
+ }
+ return \%ret;
+}
# member access functions
@@ -344,10 +482,9 @@ C<TeXLive::TLMedia> -- TeX Live Media module
use TeXLive::TLMedia;
- my $tlnet = TeXLive::TLMedia->new('NET');
- my $tlneo = TeXLive::TLMedia->new('NET','http://www.ctan.org/mirror/tl/');
- my $tlcd = TeXLive::TLMedia->new('CD','/mnt/tl-cd/');
- my $tldvd = TeXLive::TLMedia->new('DVD','/mnt/tl-dvd/');
+ my $tlneo = TeXLive::TLMedia->new('http://www.ctan.org/mirror/tl/');
+ my $tlcd = TeXLive::TLMedia->new('/mnt/tl-cd/');
+ my $tldvd = TeXLive::TLMedia->new('/mnt/tl-dvd/');
=head1 DESCRIPTION
diff --git a/Master/tlpkg/TeXLive/TLPDB.pm b/Master/tlpkg/TeXLive/TLPDB.pm
index 0fdf61039ec..bd0458c963e 100644
--- a/Master/tlpkg/TeXLive/TLPDB.pm
+++ b/Master/tlpkg/TeXLive/TLPDB.pm
@@ -214,49 +214,49 @@ sub from_file {
my $tlpdbfile;
if ($path =~ m;^((http|ftp)://|file:\/\/*);) {
debug("TLPDB.pm: trying to initialize from $path\n");
- # if we have lzmadec available we try the lzma file
- if (defined($::progs{'lzmadec'})) {
- # we first try the lzma compressed file
+ # if we have xzdec available we try the xz file
+ if (defined($::progs{'xzdec'})) {
+ # we first try the xz compressed file
my $tmpdir = TeXLive::TLUtils::get_system_tmpdir();
my $bn = TeXLive::TLUtils::basename("$path");
- my $lzmafile = "$tmpdir/$bn.$$.lzma";
- my $lzmafile_quote = $lzmafile;
+ my $xzfile = "$tmpdir/$bn.$$.xz";
+ my $xzfile_quote = $xzfile;
# this is a variable of the whole sub as we have to remove the file
# before returning
$tlpdbfile = "$tmpdir/$bn.$$";
my $tlpdbfile_quote = $tlpdbfile;
if (win32()) {
- $lzmafile =~ s!/!\\!g;
+ $xzfile =~ s!/!\\!g;
$tlpdbfile =~ s!/!\\!g;
}
- $lzmafile_quote = "\"$lzmafile\"";
+ $xzfile_quote = "\"$xzfile\"";
$tlpdbfile_quote = "\"$tlpdbfile\"";
- debug("trying to download $path.lzma to $lzmafile\n");
- my $ret = TeXLive::TLUtils::download_file("$path.lzma", "$lzmafile");
+ debug("trying to download $path.xz to $xzfile\n");
+ my $ret = TeXLive::TLUtils::download_file("$path.xz", "$xzfile");
# better to check both, the return value AND the existence of the file
- if ($ret && (-r "$lzmafile")) {
+ if ($ret && (-r "$xzfile")) {
# ok, let the fun begin
- debug("un-lzmaing $lzmafile to $tlpdbfile\n");
- # lzmadec *hopefully* returns 0 on success and anything else on failure
+ debug("un-xzing $xzfile to $tlpdbfile\n");
+ # xzdec *hopefully* returns 0 on success and anything else on failure
# we don't have to negate since not zero means error in the shell
# and thus in perl true
- if (system("$::progs{'lzmadec'} <$lzmafile_quote >$tlpdbfile_quote")) {
- debug("un-lzmaing $lzmafile failed, tryin gplain file\n");
- # to be sure we unlink the lzma file and the tlpdbfile
- unlink($lzmafile);
+ if (system("$::progs{'xzdec'} <$xzfile_quote >$tlpdbfile_quote")) {
+ debug("un-xzing $xzfile failed, tryin gplain file\n");
+ # to be sure we unlink the xz file and the tlpdbfile
+ unlink($xzfile);
unlink($tlpdbfile);
} else {
- unlink($lzmafile);
+ unlink($xzfile);
open($retfh, "<$tlpdbfile") || die "$0: open($tlpdbfile) failed: $!";
- debug("found the uncompressed lzma file\n");
+ debug("found the uncompressed xz file\n");
}
}
} else {
- debug("no lzmadec defined, not trying tlpdb.lzma ...\n");
+ debug("no xzdec defined, not trying tlpdb.xz ...\n");
}
if (!defined($retfh)) {
- debug("TLPDB: downloading $path.lzma didn't succeed, try $path\n");
- # lzma did not succeed, so try the normal file
+ debug("TLPDB: downloading $path.xz didn't succeed, try $path\n");
+ # xz did not succeed, so try the normal file
$retfh = TeXLive::TLUtils::download_file($path, "|");
if (!$retfh) {
die "open tlpdb($path) failed: $!";
@@ -277,7 +277,7 @@ sub from_file {
}
} until (!$ret);
tlwarn("unusable location $path, could not load any packages\n") if (!$found);
- # remove the un-lzma-ed tlpdb file from temp dir
+ # remove the un-xz-ed tlpdb file from temp dir
# THAT IS RACY!!! we should fix that in some better way with tempfile
unlink($tlpdbfile) if $tlpdbfile;
return($found);
@@ -394,13 +394,13 @@ sub _add_tlpcontainer {
$container .= ".zip";
$unpackprog="unzip";
$args="-o -qq $container -d $dest";
- } elsif (-r "$container.lzma") {
- $container .= ".lzma";
+ } elsif (-r "$container.xz") {
+ $container .= ".xz";
$unpackprog="NO_IDEA_HOW_TO_UNPACK_LZMA";
$args="NO IDEA WHAT ARGS IT NEEDS";
- die "$0: lzma checked for but not implemented, maybe update TLPDB.pm";
+ die "$0: xz checked for but not implemented, maybe update TLPDB.pm";
} else {
- die "$0: No package $container (.zip or .lzma) in $ziplocation";
+ die "$0: No package $container (.zip or .xz) in $ziplocation";
}
tlwarn("Huuu, this needs testing and error checking!\n");
tlwarn("Should we use -a -- adapt line endings etc?\n");
@@ -788,7 +788,7 @@ Return the location of the actual C<texlive.tlpdb> file used. This is a
read-only function; you cannot change the root of the TLPDB using this
function.
-See C<00texlive-installation.config.tlpsrc> for a description of the
+See C<00texlive.installation.tlpsrc> for a description of the
special value C<__MASTER>.
=cut
@@ -1110,12 +1110,16 @@ Need to be documented
=cut
sub _set_option_value {
- my ($self,$key,$value) = @_;
- my $pkg = $self->{'tlps'}{'00texlive-installation.config'};
+ my $self = shift;
+ $self->_set_option_value_pkg('00texlive.installation', @_);
+}
+sub _set_option_value_pkg {
+ my ($self,$pkgname,$key,$value) = @_;
+ my $pkg = $self->{'tlps'}{$pkgname};
my @newdeps;
if (!defined($pkg)) {
$pkg = new TeXLive::TLPOBJ;
- $pkg->name("00texlive-installation.config");
+ $pkg->name($pkgname);
$pkg->category("TLCore");
push @newdeps, "$key:$value";
} else {
@@ -1133,20 +1137,25 @@ sub _set_option_value {
}
}
$pkg->depends(@newdeps);
- $self->{'tlps'}{'00texlive-installation.config'} = $pkg;
+ $self->{'tlps'}{$pkgname} = $pkg;
}
sub _option_value {
- my ($self,$key) = @_;
- if (defined($self->{'tlps'}{'00texlive-installation.config'})) {
- foreach my $d ($self->{'tlps'}{'00texlive-installation.config'}->depends) {
+ my $self = shift;
+ $self->_option_value_pkg('00texlive.installation', @_);
+}
+
+sub _option_value_pkg {
+ my ($self,$pkg,$key) = @_;
+ if (defined($self->{'tlps'}{$pkg})) {
+ foreach my $d ($self->{'tlps'}{$pkg}->depends) {
if ($d =~ m!^$key:(.*)$!) {
return "$1";
}
}
return;
}
- tlwarn("00texlive-installation.config not found, cannot read option $key.\n");
+ tlwarn("$pkg not found, cannot read option $key.\n");
return;
}
@@ -1156,6 +1165,15 @@ sub option {
if (@_) { $self->_set_option_value($key, shift); }
return $self->_option_value($key);
}
+
+sub option_pkg {
+ my $self = shift;
+ my $pkg = shift;
+ my $key = shift;
+ if (@_) { $self->_set_option_value_pkg($pkg, $key, shift); }
+ return $self->_option_value_pkg($pkg, $key);
+}
+
# TODO the above function should be used in the functions below as
# far as possible ...
@@ -1179,6 +1197,31 @@ sub option_create_symlinks {
if (@_) { $self->_set_option_value("opt_create_symlinks", shift); }
return $self->_option_value("opt_create_symlinks");
}
+sub option_desktop_integration {
+ my $self = shift;
+ if (@_) { $self->_set_option_value("opt_desktop_integration", shift); }
+ return $self->_option_value("opt_desktop_integration");
+}
+sub option_file_assocs {
+ my $self = shift;
+ if (@_) { $self->_set_option_value("opt_file_assocs", shift); }
+ return $self->_option_value("opt_file_assocs");
+}
+sub option_post_code {
+ my $self = shift;
+ if (@_) { $self->_set_option_value("opt_post_code", shift); }
+ return $self->_option_value("opt_post_code");
+}
+sub option_path {
+ my $self = shift;
+ if (@_) { $self->_set_option_value("opt_path", shift); }
+ return $self->_option_value("opt_path");
+}
+sub option_w32_multi_user {
+ my $self = shift;
+ if (@_) { $self->_set_option_value("opt_w32_multi_user", shift); }
+ return $self->_option_value("opt_w32_multi_user");
+}
sub option_install_docfiles {
my $self = shift;
if (@_) { $self->_set_option_value("opt_install_docfiles", shift); }
@@ -1239,26 +1282,64 @@ containing only those formats present in the installation.
=cut
sub fmtutil_cnf_lines {
my $self = shift;
- my %fmtcnffiles;
- foreach my $p ($self->list_packages) {
- my $obj = $self->get_package ($p);
- die "$0: No TeX Live package named $p, strange" if ! $obj;
+ my @fmtlines = ();
+
+ foreach my $pkg ($self->list_packages) {
+ my $obj = $self->get_package ($pkg);
+ die "No TeX Live package named $pkg, too strange" if ! $obj;
+ my $first = 1;
foreach my $e ($obj->executes) {
- if ($e =~ m/BuildFormat (.*)$/) {
- $fmtcnffiles{$1} = 1;
- }
- # others are ignored here
+ if ($e =~ m/AddFormat\s+(.*)\s*/) {
+ my $name;
+ my $engine;
+ my $patterns = "-";
+ my $options = "";
+ my $mode = "";
+ if ($first) {
+ push @fmtlines, "# from $pkg:\n";
+ $first = 0;
+ }
+ foreach my $p (&TeXLive::TLUtils::quotewords('\s+', 0, "$1")) {
+ # foreach my $p (split(' ', $1)) {
+ my ($a, $b);
+ if ($p =~ m/^(name|engine|mode|patterns|options)=(.*)$/) {
+ $a = $1;
+ $b = $2;
+ } else {
+ die "Unknown format directive in $pkg: $e";
+ }
+ if ($a eq "name") {
+ die "AddFormat line needs name=something: $pkg, $e" unless $b;
+ $name = $b; next;
+ }
+ if ($a eq "engine") {
+ die "AddFormat line needs engine=something: $pkg, $e" unless $b;
+ $engine = $b; next;
+ }
+ if ($a eq "patterns") {
+ $patterns = ( $b ? $b : "-");
+ next;
+ }
+ if ($a eq "mode") {
+ if ($b eq "disabled") {
+ $mode = "#! ";
+ } else {
+ $mode = "";
+ }
+ next;
+ }
+ if ($a eq "options") {
+ $options = ( $b ? $b : "");
+ next;
+ }
+ # should not be reached at all
+ die "Unknown language directive in $pkg: $e";
+ }
+ push @fmtlines, "$mode$name $engine $patterns $options\n";
+ }
}
}
- my @formatlines;
- foreach my $f (sort keys %fmtcnffiles) {
- open(INFILE,"<$self->{'root'}/texmf/fmtutil/format.$f.cnf")
- or tlwarn("Cannot open $self->{'root'}/texmf/fmtutil/format.$f.cnf\nThe generated fmtutil.cnf file might be incomplete.\nError: $!\n");
- @tmp = <INFILE>;
- close(INFILE);
- push @formatlines, @tmp;
- }
- return(@formatlines);
+ return @fmtlines;
}
=item C<< $tlpdb->updmap_cfg_lines >>
@@ -1420,7 +1501,7 @@ named C<package.source.extension> and C<package.doc.extension>.
=item C<container_format/I<format>>
This option specifies a format for containers. The currently supported
-formats are C<lzma> and C<zip>. But note that C<zip> is untested.
+formats are C<xz> and C<zip>. But note that C<zip> is untested.
=back
diff --git a/Master/tlpkg/TeXLive/TLPOBJ.pm b/Master/tlpkg/TeXLive/TLPOBJ.pm
index 06233187de8..6b08caf8067 100644
--- a/Master/tlpkg/TeXLive/TLPOBJ.pm
+++ b/Master/tlpkg/TeXLive/TLPOBJ.pm
@@ -6,7 +6,9 @@
package TeXLive::TLPOBJ;
-use TeXLive::TLConfig qw($DefaultCategory $CategoriesRegexp $MetaCategoriesRegexp $InfraLocation);
+use TeXLive::TLConfig qw($DefaultCategory $CategoriesRegexp
+ $MetaCategoriesRegexp $InfraLocation
+ $RelocPrefix $RelocTree);
use TeXLive::TLUtils;
use TeXLive::TLTREE;
@@ -22,6 +24,7 @@ sub new {
shortdesc => $params{'shortdesc'},
longdesc => $params{'longdesc'},
catalogue => $params{'catalogue'},
+ relocated => $params{'relocated'},
runfiles => defined($params{'runfiles'}) ? $params{'runfiles'} : [],
runsize => $params{'runsize'},
srcfiles => defined($params{'srcfiles'}) ? $params{'srcfiles'} : [],
@@ -29,6 +32,7 @@ sub new {
docfiles => defined($params{'docfiles'}) ? $params{'docfiles'} : [],
docsize => $params{'docsize'},
executes => defined($params{'executes'}) ? $params{'executes'} : [],
+ postactions => defined($params{'postactions'}) ? $params{'postactions'} : [],
# note that binfiles is a HASH with keys of $arch!
binfiles => defined($params{'binfiles'}) ? $params{'binfiles'} : {},
binsize => defined($params{'binsize'}) ? $params{'binsize'} : {},
@@ -92,6 +96,7 @@ sub from_fh {
($lastcmd eq "docfiles") ||
($lastcmd eq "srcfiles") ||
($lastcmd eq "executes") ||
+ ($lastcmd eq "postaction") ||
($lastcmd eq "depend") ) {
$line =~ s/^ /${lastcmd}continued /;
} else {
@@ -163,6 +168,10 @@ sub from_fh {
$self->{'category'} = "$1";
$lastcmd = "category";
next;
+ } elsif ($line =~ /^relocated\s+([01])\s*/o) {
+ $self->relocated("$1");
+ $lastcmd = "relocated";
+ next;
} elsif ($line =~ /^revision\s+(.*)\s*/o) {
$self->{'revision'} = "$1";
$lastcmd = "revision";
@@ -216,6 +225,10 @@ sub from_fh {
push @{$self->{'executes'}}, "$2" unless "$2" eq "";
$lastcmd = "execute";
next;
+ } elsif ($line =~ /^postaction(continued)?\s*(.*)\s*/o) {
+ push @{$self->{'postactions'}}, "$2" unless "$2" eq "";
+ $lastcmd = "postaction";
+ next;
} elsif ($line =~ /^depend(continued)?\s*(.*)\s*/o) {
push @{$self->{'depends'}}, "$2" unless "$2" eq "";
$lastcmd = "depend";
@@ -299,6 +312,7 @@ sub writeout {
defined($self->{'catalogue'}) && print $fd "catalogue $self->{'catalogue'}\n";
defined($self->{'shortdesc'}) && print $fd "shortdesc $self->{'shortdesc'}\n";
defined($self->{'license'}) && print $fd "license $self->{'license'}\n";
+ defined($self->{'relocated'}) && $self->{'relocated'} && print $fd "relocated 1\n";
# ugly hack to get rid of use FileHandle; see man perlform
#format_name $fd "multilineformat";
select((select($fd),$~ = "multilineformat")[0]);
@@ -316,6 +330,11 @@ sub writeout {
print $fd "execute $_\n";
}
}
+ if (defined($self->{'postactions'})) {
+ foreach (@{$self->{'postactions'}}) {
+ print $fd "postaction $_\n";
+ }
+ }
if (defined($self->{'containersize'})) {
print $fd "containersize $self->{'containersize'}\n";
}
@@ -388,6 +407,11 @@ sub writeout_simple {
print $fd "execute $_\n";
}
}
+ if (defined($self->{'postactions'})) {
+ foreach (@{$self->{'postactions'}}) {
+ print $fd "postaction $_\n";
+ }
+ }
if (defined($self->{'docfiles'}) && (@{$self->{'docfiles'}})) {
print $fd "docfiles\n";
foreach (sort @{$self->{'docfiles'}}) {
@@ -416,44 +440,70 @@ sub writeout_simple {
}
}
+sub cancel_common_texmf_tree {
+ my $self = shift;
+ my @docfiles = $self->docfiles;
+ for (@docfiles) { s:^$RelocTree/:$RelocPrefix/:; }
+ $self->docfiles(@docfiles);
+ my @runfiles = $self->runfiles;
+ for (@runfiles) { s:^$RelocTree/:$RelocPrefix/:; }
+ $self->runfiles(@runfiles);
+ my @srcfiles = $self->srcfiles;
+ for (@srcfiles) { s:^$RelocTree/:$RelocPrefix/:; }
+ $self->srcfiles(@srcfiles);
+ # if there are bin files they have definitely NOT the
+ # texmf-dist prefix, so we cannot cancel it anyway
+}
+
+sub common_texmf_tree {
+ my $self = shift;
+ my $tltree;
+ my $dd = 0;
+ my @files = $self->all_files;
+ foreach ($self->all_files) {
+ my $tmp;
+ ($tmp) = split m@/@;
+ if (defined($tltree) && ($tltree ne $tmp)) {
+ return;
+ } else {
+ $tltree = $tmp;
+ }
+ }
+ # if there are no files then it is by default relocatable, so
+ # return the right tree
+ if (!@files) {
+ $tltree = $RelocTree;
+ }
+ return $tltree;
+}
+
-sub make_container
-{
+sub make_container {
my ($self,$type,$instroot,$destdir,$containername,$relative) = @_;
- if (($type ne "lzma") && ($type ne "tar")) {
- die "$0: TLPOBJ supports tar and lzma containers, not $type";
+ if (($type ne "xz") && ($type ne "tar")) {
+ die "$0: TLPOBJ supports tar and xz containers, not $type";
}
if (!defined($containername)) {
$containername = $self->name;
}
- my @files = ();
+ my @files = $self->all_files;
my $compresscmd;
my $tlpobjdir = "$InfraLocation/tlpobj";
- my %binf = %{$self->{'binfiles'}};
- foreach (keys %binf) {
- push @files, @{$binf{$_}};
- }
- push @files, $self->runfiles;
- push @files, $self->docfiles;
- push @files, $self->srcfiles;
@files = TeXLive::TLUtils::sort_uniq(@files);
# we do relative packages ONLY if the files do NOT span multiple
# texmf trees. check this here
my $tltree;
if ($relative) {
- foreach (@files) {
- my $tmp;
- ($tmp) = split m@/@;
- if (defined($tltree) && ($tltree ne $tmp)) {
- die ("$0: package $containername spans multiple trees, "
- . "relative generation not allowed");
- } else {
- $tltree = $tmp;
- }
+ $tltree = $self->common_texmf_tree;
+ if (!defined($tltree)) {
+ die ("$0: package $containername spans multiple trees, "
+ . "relative generation not allowed");
}
- my @nf;
- map { s@^$tltree/@@ ; push @nf, $_; } @files;
- @files = @nf;
+ if ($tltree ne $RelocTree) {
+ die ("$0: building $pkg container relocatable but the comon prefix"
+ . "is not $RelocTree");
+ }
+ s,^$RelocTree/,, foreach @files;
}
# load Cwd only if necessary ...
require Cwd;
@@ -468,7 +518,9 @@ sub make_container
# and put the tlpobj into the root!
if ($relative) {
chdir("./$tltree");
- $tlpobjdir = ".";
+ # we don't need to change the $tlpobjdir because we put it in
+ # all cases into tlpkg/tlpobj
+ #$tlpobjdir = "./tlpkg/tlpobj";
}
# we add the .tlpobj into the .tlpobj directory
my $removetlpobjdir = 0;
@@ -485,33 +537,33 @@ sub make_container
if ($type eq "tar") {
$containername = $tarname;
} else {
- $containername = "$tarname.lzma";
+ $containername = "$tarname.xz";
}
# start the fun
my $tar = $::progs{'tar'};
- my $lzma;
+ my $xz;
if (!defined($tar)) {
tlwarn("$0: programs not set up, trying \"tar\".\n");
$tar = "tar";
}
- if ($type eq "lzma") {
- $lzma = $::progs{'lzma'};
- if (!defined($lzma)) {
- tlwarn("$0: programs not set up, trying \"lzma\".\n");
- $lzma = "lzma";
+ if ($type eq "xz") {
+ $xz = $::progs{'xz'};
+ if (!defined($xz)) {
+ tlwarn("$0: programs not set up, trying \"xz\".\n");
+ $xz = "xz";
}
}
# No owner/group options if we are being called on a user's machine to
# make a backup. We only want these when we are making the master
- # containers for tlnet. Also exclude .svn directories when making the
+ # containers for tlnet. Also exclude .svn directories when making the
# masters. We determine user vs. master by whether there's a revision
# suffix in the container name.
my @attrs = $containername =~ /\.r[0-9]/
? () : ("--owner", "0", "--group", "0", "--exclude", ".svn");
my @cmdline = ($tar, "-cf", "$destdir/$tarname", @attrs);
-
+
# Get list of files and symlinks to back up. Nothing else should be
# in the list.
my @files_to_backup = ();
@@ -553,10 +605,14 @@ sub make_container
#
if (length ("@files_to_backup") > 50000) {
@files_to_backup = TeXLive::TLUtils::collapse_dirs(@files_to_backup);
- # Yet another complication. collapse_dirs returns absolute paths.
+ # A complication, as always. collapse_dirs returns absolute paths.
# We want to change them back to relative so that the backup tar
# has the same structure.
+ # in relative mode we have to remove the texmf-dist prefix, too
s,^$instroot/,, foreach @files_to_backup;
+ if ($relative) {
+ s,^$RelocTree/,, foreach @files_to_backup;
+ }
}
push(@cmdline, @files_to_backup);
}
@@ -567,11 +623,11 @@ sub make_container
xsystem(@cmdline);
# compress it.
- if ($type eq "lzma") {
+ if ($type eq "xz") {
if (-r "$destdir/$tarname") {
- system($lzma, "--force", "-z", "$destdir/$tarname");
+ system($xz, "--force", "-z", "$destdir/$tarname");
} else {
- tlwarn("$0: Couldn't find $destdir/$tarname to run $lzma\n");
+ tlwarn("$0: Couldn't find $destdir/$tarname to run $xz\n");
return (0, 0, "");
}
}
@@ -745,7 +801,7 @@ sub split_bin_package {
foreach $a (keys(%binf)) {
my $tlp = new TeXLive::TLPOBJ;
$tlp->name($self->name . ".$a");
- $tlp->shortdesc("binary files of " . $self->name . " for $a");
+ $tlp->shortdesc("$a files of " . $self->name);
$tlp->revision($self->revision);
$tlp->category($self->category);
$tlp->add_binfiles($a,@{$binf{$a}});
@@ -840,7 +896,7 @@ sub make_return_hash_from_executes {
} else {
push @maps, "disable $3";
}
- } elsif ($e =~ m/^BuildFormat\s+([^\s]+)\s*$/) {
+ } elsif ($e =~ m/^AddFormat\s+([^\s]+)\s*$/) {
push @formats, $1;
} elsif ($e =~ m/^AddHyphen\s+(.*)\s*$/) {
push @dats, $1;
@@ -882,6 +938,11 @@ sub revision {
if (@_) { $self->{'revision'} = shift }
return $self->{'revision'};
}
+sub relocated {
+ my $self = shift;
+ if (@_) { $self->{'relocated'} = shift }
+ return ($self->{'relocated'} ? 1 : 0);
+}
sub catalogue {
my $self = shift;
if (@_) { $self->{'catalogue'} = shift }
@@ -1029,6 +1090,11 @@ sub executes {
if (@_) { $self->{'executes'} = [ @_ ] }
return @{ $self->{'executes'} };
}
+sub postactions {
+ my $self = shift;
+ if (@_) { $self->{'postactions'} = [ @_ ] }
+ return @{ $self->{'postactions'} };
+}
sub containerdir {
my @self = shift;
if (@_) { $_containerdir = $_[0] }
@@ -1071,9 +1137,11 @@ Please see L<TeXLive::TLPSRC> documentation for the specification. The
only differences are that the various C<*pattern> keys are invalid, and
instead there are the respective C<*files> keys described below. Furthermore
some more I<keys> is allowed: C<revision> which specifies the maximum of
-all last changed revision of files contained in the package, and anything
+all last changed revision of files contained in the package, anything
starting with C<catalogue-> specifying information coming from the
-TeX Catalogue.
+TeX Catalogue, and C<relocated> taking either 0 or 1 indicating that
+this packages has been relocated, i.e., in the containers the
+initial C<texmf-dist> directory has been stripped off.
All these keys have in common that they are followed by a list of files
I<indented> by one space. They differ only in the first line itself
@@ -1190,7 +1258,7 @@ the C<binsize> function returns (and takes as argument) a hash with the
architectures as keys, similar to the C<runfiles> functions (see above).
Futhermore, if the tlpobj is contained ina tlpdb which describes a media
-where the files are distributed in packed format (usually as .tar.lzma),
+where the files are distributed in packed format (usually as .tar.xz),
there are 6 more possible keys:
$tlpobj->containersize
@@ -1246,17 +1314,23 @@ or the filehandle if given:
debugging function for comparison with C<tpm>/C<tlps>, will go away.
+=item C<common_texmf_tree>
+
+if all files of the package are from the same texmf tree, this tree
+is returned, otherwise an undefined value. That is also a check
+whether a package is relocatable.
+
=item C<make_container($type,$instroot[, $destdir[, $containername[, $relative]]])>
creates a container file of the all files in the C<TLPOBJ>
in C<$destdir> (if not defined then C<< TLPOBJ->containerdir >> is used).
The C<$type> variable specifies the type of container to be used.
-Currently only C<zip> or C<lzma> are allowed, and are generating
-zip files and tar.lzma files, respectively.
+Currently only C<zip> or C<xz> are allowed, and are generating
+zip files and tar.xz files, respectively.
The file name of the created container file is C<$containername.extension>,
-where extension is either C<.zip> or C<.tar.lzma>, depending on the
+where extension is either C<.zip> or C<.tar.xz>, depending on the
setting of C<$type>. If no C<$containername> is specified the package name
is used.
diff --git a/Master/tlpkg/TeXLive/TLPSRC.pm b/Master/tlpkg/TeXLive/TLPSRC.pm
index d2d13d98543..41ff0601915 100644
--- a/Master/tlpkg/TeXLive/TLPSRC.pm
+++ b/Master/tlpkg/TeXLive/TLPSRC.pm
@@ -30,6 +30,7 @@ sub new
srcpatterns => $params{'srcpatterns'},
docpatterns => $params{'docpatterns'},
binpatterns => $params{'binpatterns'},
+ postactions => $params{'postactions'},
executes => defined($params{'executes'}) ? $params{'executes'} : [],
depends => defined($params{'depends'}) ? $params{'depends'} : [],
};
@@ -67,6 +68,7 @@ sub from_file
my $catalogue = "";
my (@executes, @depends);
my (@runpatterns, @docpatterns, @binpatterns, @srcpatterns);
+ my (@postactions);
my $started = 0;
my $finished = 0;
my $savedline = "";
@@ -132,6 +134,9 @@ sub from_file
} elsif ($line =~ /^depend\s+(.*)\s*$/) {
push @depends, $1 if ($1 ne "");
next;
+ } elsif ($line =~ /^postaction\s+(.*)\s*$/) {
+ push @postactions, $1 if ($1 ne "");
+ next;
} else {
tlwarn("$srcfile:$.: unknown tlpsrc directive, please fix: $line\n");
}
@@ -149,6 +154,7 @@ sub from_file
$self->docpatterns(@docpatterns) if @docpatterns;
$self->executes(@executes) if @executes;
$self->depends(@depends) if @depends;
+ $self->postactions(@postactions) if @postactions;
}
@@ -175,6 +181,11 @@ sub writeout
print $fd "execute $_\n";
}
}
+ if (defined($self->{'postactions'})) {
+ foreach (@{$self->{'postactions'}}) {
+ print $fd "postaction $_\n";
+ }
+ }
if (defined($self->{'srcpatterns'}) && (@{$self->{'srcpatterns'}})) {
foreach (sort @{$self->{'srcpatterns'}}) {
print $fd "srcpattern $_\n";
@@ -213,6 +224,7 @@ sub make_tlpobj
$tlp->longdesc($self->{'longdesc'}) if (defined($self->{'longdesc'}));
$tlp->catalogue($self->{'catalogue'}) if (defined($self->{'catalogue'}));
$tlp->executes(@{$self->{'executes'}}) if (defined($self->{'executes'}));
+ $tlp->postactions(@{$self->{'postactions'}}) if (defined($self->{'postactions'}));
$tlp->depends(@{$self->{'depends'}}) if (defined($self->{'depends'}));
$tlp->revision(0);
my $filemax;
@@ -540,6 +552,11 @@ sub executes {
if (@_) { @{ $self->{'executes'} } = @_ }
return @{ $self->{'executes'} };
}
+sub postactions {
+ my $self = shift;
+ if (@_) { @{ $self->{'postactions'} } = @_ }
+ return @{ $self->{'postactions'} };
+}
format multilineformat =
longdesc ^<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<~~
@@ -580,7 +597,7 @@ I<key> I<value>
where I<key> can be C<name>, C<category>, C<shortdesc>, C<longdesc>,
C<catalogue>, C<runpattern>, C<srcpattern>, C<docpattern>, C<binpattern>,
-C<execute>, or C<depend>.
+C<execute>, C<postaction>, or C<depend>.
Continuation lines are supported via a trailing backslash. That is, if
the C<.tlpsrc> file contains two physical lines like this:
@@ -631,14 +648,14 @@ The full list of currently used packages of this type is:
This package contains configuration options for the TeX Live archive.
If container_split_{doc,src}_files occurs in the depend lines the
-{doc,src} files are split into separate containers (.tar.lzma)
+{doc,src} files are split into separate containers (.tar.xz)
during container build time. Note that this has NO effect on the
appearance within the texlive.tlpdb. It is only on container level.
The container_format/XXXXX specifies the format, currently allowed
-is only "lzma", which generates .tar.lzma files. zip can be supported.
+is only "xz", which generates .tar.xz files. zip can be supported.
release/NNNN specifies the release number as used in the installer.
-=item B<00texlive-installation.config>
+=item B<00texlive.installation>
This package serves a double purpose:
@@ -737,9 +754,51 @@ I<file> for that language. The additional variables I<var> are:
C<lefthyphenmin>, C<righthyphenmin> (both integers), and C<synonyms> (a
comma-separated list of alias names for that hyphenation).
-=item C<execute BuildFormat> I<format>
+=item C<execute AddFormat name=I<fmt> engine=I<eng> [I<var>...]>
+
+activates the format with name I<fmt> based on the engine I<eng>. The
+additional variables I<var> are:
+C<mode> which can only be equal to C<disable> in which case the format
+will only be mentioned but disabled (prefixed with C<#!>;
+C<patterns> which gives the patterns file, if not present C<-> is used;
+C<options> which gives the additional options for the C<fmtutil.cnf> file.
+
+=back
+
+=item <postaction>
+
+gives a free from entry of post install and removal actions to be
+executed. The difference to the C<execute> statement is that
+C<postaction> is concerned with system integration, i.e., adjusting
+things outside the installation directory, while C<execute> touches
+only things within the installation.
+
+Currently the following C<postaction>s are understood:
+
+=over 4
+
+=item C<postaction shortcut name=I<name> type=menu|desktop icon=I<path> cmd=I<cmd> args=I<args> hide=0|1>
+
+On W32 creates a shortcut either in the main TeX Live menu or on the
+desktop. Please see the documentation of TeXLive::TLWinGoo for details
+on the parameters.
+
+=item C<postaction filetype name=I<name> cmd=I<cmd>>
+
+On W32 associates the file type I<name> with the command I<cmd>.
+
+=item C<postaction fileassoc extension=I<.ext> filetype=I<name>>
+
+On W32 declares files with the extenstion I<.ext> of file type I<name>.
+
+=item C<postaction script file=I<file> [filew32=I<filew32>]>
+
+This postaction executes the given I<file> with two arguments, the first
+being the root of the installation, the second being either the string
+C<install> or C<remove>.
-build the format I<format>, as specified in the C<fmtutil.cnf> file.
+If the C<filew32> argument is given this script is run on Windows systems
+instead of the one given via C<file>.
=back
diff --git a/Master/tlpkg/TeXLive/TLTREE.pm b/Master/tlpkg/TeXLive/TLTREE.pm
index 5f47771e712..95c882dfdb6 100644
--- a/Master/tlpkg/TeXLive/TLTREE.pm
+++ b/Master/tlpkg/TeXLive/TLTREE.pm
@@ -253,10 +253,16 @@ sub _get_files_matching_glob_pattern {
}
}
}
- if ($dirpart =~ m@^bin/win32@) {
+ if (($dirpart =~ m@^bin/win32@) || ($dirpart =~ m@^bin/i386-cygwin@)) {
# for arch=win32 under bin we want to automatch more extensions.
foreach my $f (@candfiles) {
- my $w32_binext = "bat|cmd|exe|dll|texlua";
+ my $w32_binext;
+ if ($dirpart =~ m@^bin/win32@) {
+ $w32_binext = "bat|cmd|exe|dll|texlua";
+ } else {
+ # cygwin part, they have .exe, but nothing else
+ $w32_binext = "exe";
+ }
ddebug("matching $f in $dirpart via glob $globline.($w32_binext)\n");
if ($f =~ /^$basepart\.($w32_binext)$/) {
ddebug("hit: globline=$globline, $dirpart/$f\n");
diff --git a/Master/tlpkg/TeXLive/TLUtils.pm b/Master/tlpkg/TeXLive/TLUtils.pm
index 4b7dafbc3f3..cd5fc335235 100644
--- a/Master/tlpkg/TeXLive/TLUtils.pm
+++ b/Master/tlpkg/TeXLive/TLUtils.pm
@@ -32,6 +32,7 @@ C<TeXLive::TLUtils> -- utilities used in the TeX Live infrastructure
TeXLive::TLUtils::tl_tmpdir();
TeXLive::TLUtils::xchdir($dir);
TeXLive::TLUtils::xsystem(@args);
+ TeXLive::TLUtils::run_cmd($cmd);
=head2 File Utilities
@@ -56,6 +57,7 @@ C<TeXLive::TLUtils> -- utilities used in the TeX Live infrastructure
TeXLive::TLUtils::create_language_def($tlpdb,$dest,$localconf);
TeXLive::TLUtils::install_packages($from_tlpdb,$media,$to_tlpdb,$what,$opt_src, $opt_doc)>);
TeXLive::TLUtils::install_package($what, $filelistref, $target, $platform);
+ TeXLive::TLUtils::do_postaction($how, $tlpobj);
=head2 Miscellaneous
@@ -113,10 +115,11 @@ BEGIN {
&give_ctan_mirror
&tlmd5
&xsystem
+ &run_cmd
);
@EXPORT = qw(setup_programs download_file process_logging_options
tlwarn info log debug ddebug dddebug debug_hash
- win32 xchdir xsystem);
+ win32 xchdir xsystem run_cmd);
}
use Cwd;
@@ -398,6 +401,25 @@ sub xsystem
}
}
+=item C<run_cmd($cmd)>
+
+runs a command and captures its output. Then returns a list with the
+output as first element and the return value (exit code) as second.
+
+=cut
+
+sub run_cmd {
+ my $cmd = shift;
+ my $output = `$cmd`;
+ $retval = $?
+ if ($retval != 0) {
+ $retval /= 256 if $retval > 0;
+ }
+ return ($output, $retval);
+}
+
+
+
=back
@@ -949,6 +971,7 @@ sub install_packages {
my $starttime = time();
foreach my $package (@packs) {
my $tlpobj = $tlpobjs{$package};
+ my $reloc = $tlpobj->relocated;
$n++;
my $remtime = "??:??";
my $tottime = "??:??";
@@ -1006,16 +1029,16 @@ sub install_packages {
} elsif ($media eq 'CD') {
if (-r "$root/$Archive/$package.zip") {
$container = "$root/$Archive/$package.zip";
- } elsif (-r "$root/$Archive/$package.tar.lzma") {
- $container = "$root/$Archive/$package.tar.lzma";
+ } elsif (-r "$root/$Archive/$package.tar.xz") {
+ $container = "$root/$Archive/$package.tar.xz";
} else {
- tlwarn("No package $package (.zip or .lzma) in $root/$Archive\n");
+ tlwarn("No package $package (.zip or .xz) in $root/$Archive\n");
next;
}
} elsif ($media eq 'NET') {
$container = "$root/$Archive/$package.$DefaultContainerExtension";
}
- if (!install_package($container, $tlpobj->containersize,
+ if (!install_package($container, $reloc, $tlpobj->containersize,
$tlpobj->containermd5, \@installfiles,
$totlpdb->root, $vars{'this_platform'})) {
# we already warn in install_package that something bad happened,
@@ -1036,8 +1059,8 @@ sub install_packages {
# - there are actually src/doc files present
if ($container_src_split && $opt_src && $tlpobj->srcfiles) {
my $srccontainer = $container;
- $srccontainer =~ s/(\.tar\.lzma|\.zip)$/.source$1/;
- if (!install_package($srccontainer, $tlpobj->srccontainersize,
+ $srccontainer =~ s/(\.tar\.xz|\.zip)$/.source$1/;
+ if (!install_package($srccontainer, $reloc, $tlpobj->srccontainersize,
$tlpobj->srccontainermd5, \@installfiles,
$totlpdb->root, $vars{'this_platform'})) {
return 0;
@@ -1045,8 +1068,8 @@ sub install_packages {
}
if ($container_doc_split && $real_opt_doc && $tlpobj->docfiles) {
my $doccontainer = $container;
- $doccontainer =~ s/(\.tar\.lzma|\.zip)$/.doc$1/;
- if (!install_package($doccontainer,
+ $doccontainer =~ s/(\.tar\.xz|\.zip)$/.doc$1/;
+ if (!install_package($doccontainer, $reloc,
$tlpobj->doccontainersize,
$tlpobj->doccontainermd5, \@installfiles,
$totlpdb->root, $vars{'this_platform'})) {
@@ -1064,7 +1087,7 @@ sub install_packages {
}
$totlpdb->add_tlpobj($tlpobj);
# we have to write out the tlpobj file since it is contained in the
- # archives (.tar.lzma) but at DVD install time we don't have them
+ # archives (.tar.xz) but at DVD install time we don't have them
my $tlpod = $totlpdb->root . "/tlpkg/tlpobj";
mkdirhier( $tlpod );
open(TMP,">$tlpod/".$tlpobj->name.".tlpobj") ||
@@ -1083,7 +1106,7 @@ sub install_packages {
}
-=item C<install_package($what, $size, $md5, $filelistref, $target, $platform)>
+=item C<install_package($what, $reloc, $size, $md5, $filelistref, $target, $platform)>
This function installs the files given in @$filelistref from C<$what>
into C<$target>.
@@ -1097,29 +1120,34 @@ the way. In this case the list C<@$filelistref> is not taken into
account.
If C<$what> starts with C<http://> or C<ftp://> then C<$what> is
-downloaded from the net and piped through C<lzmadec> and C<tar>.
+downloaded from the net and piped through C<xzdec> and C<tar>.
-If $what ends with C<.tar.lzma> (but does not start with C<http://> or
+If $what ends with C<.tar.xz> (but does not start with C<http://> or
C<ftp://>, but possibly with C<file:/>) it is assumed to be a readable
-file on the system and is likewise piped through C<lzmadec> and C<tar>.
+file on the system and is likewise piped through C<xzdec> and C<tar>.
In both of these cases currently the list C<$@filelistref> currently
is not taken into account (should be fixed!).
+if C<$reloc> is true the container (NET or CD mode) is packaged in a way
+that the initial texmf-dist is missing.
+
Returns 1 on success and 0 on error.
=cut
sub install_package {
- my ($what, $whatsize, $whatmd5, $filelistref, $target, $platform) = @_;
+ my ($what, $reloc, $whatsize, $whatmd5, $filelistref, $target, $platform) = @_;
my @filelist = @$filelistref;
+ my $tempdir = "$target/temp";
+
# we assume that $::progs has been set up!
my $wget = $::progs{'wget'};
- my $lzmadec = $::progs{'lzmadec'};
- if (!defined($wget) || !defined($lzmadec)) {
- tlwarn("install_package: wget/lzmadec programs not set up properly.\n");
+ my $xzdec = $::progs{'xzdec'};
+ if (!defined($wget) || !defined($xzdec)) {
+ tlwarn("install_package: wget/xzdec programs not set up properly.\n");
return 0;
}
if (ref $what) {
@@ -1132,35 +1160,43 @@ sub install_package {
mkdirhier("$target/$dn");
copy "$root/$file", "$target/$dn";
}
- } elsif ($what =~ m,\.tar.lzma$,) {
+ } elsif ($what =~ m,\.tar.xz$,) {
# this is the case when we install from CD or the NET
#
- # in all other cases we create temp files .tar.lzma (or use the present
- # one), lzmadec them, and then call tar
+ # in all other cases we create temp files .tar.xz (or use the present
+ # one), xzdec them, and then call tar
+
+ # if we are unpacking a relocated container we adjust the target
+ if ($reloc) {
+ $target .= "/$TeXLive::TLConfig::RelocTree" if $reloc;
+ mkdir($target) if (! -d $target);
+ }
my $fn = basename($what);
- mkdirhier("$target/temp");
- my $lzmafile = "$target/temp/$fn";
- my $tarfile = "$target/temp/$fn"; $tarfile =~ s/\.lzma$//;
- my $lzmafile_quote = $lzmafile;
+ my $pkg = $fn;
+ $pkg =~ s/\.tar\.xz$//;
+ mkdirhier("$tempdir");
+ my $xzfile = "$tempdir/$fn";
+ my $tarfile = "$tempdir/$fn"; $tarfile =~ s/\.xz$//;
+ my $xzfile_quote = $xzfile;
my $tarfile_quote = $tarfile;
if (win32()) {
- $lzmafile =~ s!/!\\!g;
+ $xzfile =~ s!/!\\!g;
$tarfile =~ s!/!\\!g;
$target =~ s!/!\\!g;
}
- $lzmafile_quote = "\"$lzmafile\"";
+ $xzfile_quote = "\"$xzfile\"";
$tarfile_quote = "\"$tarfile\"";
my $gotfiledone = 0;
- if (-r $lzmafile) {
+ if (-r $xzfile) {
# check that the downloaded file is not partial
if ($whatsize >= 0) {
# we have the size given, so check that first
- my $size = (stat $lzmafile)[7];
+ my $size = (stat $xzfile)[7];
if ($size == $whatsize) {
# we want to check also the md5sum if we have it present
if ($whatmd5) {
- if (tlmd5($lzmafile) eq $whatmd5) {
+ if (tlmd5($xzfile) eq $whatmd5) {
$gotfiledone = 1;
} else {
tlwarn("Downloaded $what, size equal, but md5sum differs;\n",
@@ -1174,12 +1210,12 @@ sub install_package {
}
} else {
tlwarn("Partial download of $what found, removing it.\n");
- unlink($tarfile, $lzmafile);
+ unlink($tarfile, $xzfile);
}
} else {
# ok no size information, hopefully we have md5 sums
if ($whatmd5) {
- if (tlmd5($lzmafile) eq $whatmd5) {
+ if (tlmd5($xzfile) eq $whatmd5) {
$gotfiledone = 1;
} else {
tlwarn("Downloaded file, but md5sum differs, removing it.\n");
@@ -1190,39 +1226,44 @@ sub install_package {
$gotfiledone = 1;
}
}
- debug("Reusing already downloaded container $lzmafile\n")
+ debug("Reusing already downloaded container $xzfile\n")
if ($gotfiledone);
}
if (!$gotfiledone) {
if ($what =~ m,http://|ftp://,) {
# we are installing from the NET
# download the file and put it into temp
- if (!download_file($what, $lzmafile) || (! -r $lzmafile)) {
+ if (!download_file($what, $xzfile) || (! -r $xzfile)) {
tlwarn("Downloading $what did not succeed.\n");
return 0;
}
} else {
# we are installing from CD
# copy it to temp
- copy($what, "$target/temp");
+ copy($what, $tempdir);
}
}
- debug("un-lzmaing $lzmafile to $tarfile\n");
- system("$lzmadec < $lzmafile_quote > $tarfile_quote");
+ debug("un-xzing $xzfile to $tarfile\n");
+ system("$xzdec < $xzfile_quote > $tarfile_quote");
if (! -f $tarfile) {
- tlwarn("Unpacking $lzmafile did not succeed.\n");
+ tlwarn("Unpacking $xzfile did not succeed.\n");
return 0;
}
if (!TeXLive::TLUtils::untar($tarfile, $target, 1)) {
tlwarn("Un-tarring $tarfile did not succeed.\n");
return 0;
}
+ # we remove the created .tlpobj it is recreated anyway in
+ # install_packages above in the right place. This way we also
+ # get rid of the $pkg.source.tlpobj which are useless
+ unlink ("$target/tlpkg/tlpobj/$pkg.tlpobj")
+ if (-r "$target/tlpkg/tlpobj/$pkg.tlpobj");
if ($what =~ m,http://|ftp://,) {
# we downloaded the original .tar.lzma from the net, so we keep it
} else {
- # we are downloading it from CD, so we can unlink it to save
+ # we are downloading it from CD, so we can unlink it to save
# disk space
- unlink($lzmafile);
+ unlink($xzfile);
}
} else {
tlwarn("Sorry, no idea how to install $what\n");
@@ -1231,6 +1272,261 @@ sub install_package {
return 1;
}
+=item C<do_postaction($how, $tlpobj, $do_fileassocs, $do_shortcuts, $do_script)>
+
+Evaluates the C<postaction> fields in the C<$tlpobj>. The first parameter
+can be either C<install> or C<remove>. The second gives the TLPOBJ whos
+postactions should be evaluated, and the last three arguments specify
+what type of postactions should (or shouldn't) be evaluated.
+
+Returns 1 on success, and 0 on failure.
+
+=cut
+
+sub do_postaction {
+ my ($how, $tlpobj, $do_fileassocs, $do_shortcuts, $do_script) = @_;
+ my $ret = 1;
+ if (!defined($tlpobj)) {
+ tlwarn("do_postaction: didn't get a tlpobj\n");
+ return 0;
+ }
+ debug("running postaction=$how for " . $tlpobj->name . "\n")
+ if $tlpobj->postactions;
+ for my $pa ($tlpobj->postactions) {
+ if ($pa =~ m/^\s*shortcut\s+(.*)\s*$/) {
+ next unless $do_shortcuts;
+ $ret &&= _do_postaction_shortcut($how, $tlpobj, $1);
+ } elsif ($pa =~ m/\s*filetype\s+(.*)\s*$/) {
+ next unless $do_fileassocs;
+ $ret &&= _do_postaction_filetype($how, $tlpobj, $1);
+ } elsif ($pa =~ m/\s*fileassoc\s+(.*)\s*$/) {
+ next unless $do_fileassocs;
+ $ret &&= _do_postaction_fileassoc($how, $tlpobj, $1);
+ } elsif ($pa =~ m/\s*script\s+(.*)\s*$/) {
+ next unless $do_script;
+ $ret &&= _do_postaction_script($how, $tlpobj, $1);
+ } else {
+ tlwarn("do_postaction: don't know how to do $pa\n");
+ $ret = 0;
+ }
+ }
+ # nothing to do
+ return $ret;
+}
+
+sub _do_postaction_fileassoc {
+ my ($how, $tlpobj, $pa) = @_;
+ return 1 unless win32();
+ my ($errors, %keyval) =
+ parse_into_keywords($pa, qw/extension filetype/);
+
+ if ($errors) {
+ tlwarn("parsing the postaction line >>$pa<< did not succeed!\n");
+ return 0;
+ }
+
+ # name can be an arbitrary string
+ if (!defined($keyval{'extension'})) {
+ tlwarn("extension of fileassoc postaction not given\n");
+ return 0;
+ }
+ my $extension = $keyval{'extension'};
+
+ # cmd can be an arbitrary string
+ if (!defined($keyval{'filetype'})) {
+ tlwarn("filetype of fileassoc postaction not given\n");
+ return 0;
+ }
+ my $filetype = $keyval{'filetype'};
+
+ if ($how eq "install") {
+ TeXLive::TLWinGoo::register_extension($extension, $filetype);
+ } elsif ($how eq "remove") {
+ TeXLive::TLWinGoo::unregister_extension($extension);
+ } else {
+ tlwarn("Unknown mode $how\n");
+ return 0;
+ }
+ return 1;
+}
+sub _do_postaction_filetype {
+ my ($how, $tlpobj, $pa) = @_;
+ return 1 unless win32();
+ my ($errors, %keyval) =
+ parse_into_keywords($pa, qw/name cmd/);
+
+ if ($errors) {
+ tlwarn("parsing the postaction line >>$pa<< did not succeed!\n");
+ return 0;
+ }
+
+ # name can be an arbitrary string
+ if (!defined($keyval{'name'})) {
+ tlwarn("name of filetype postaction not given\n");
+ return 0;
+ }
+ my $name = $keyval{'name'};
+
+ # cmd can be an arbitrary string
+ if (!defined($keyval{'cmd'})) {
+ tlwarn("cmd of filetype postaction not given\n");
+ return 0;
+ }
+ my $cmd = $keyval{'cmd'};
+
+ if ($how eq "install") {
+ TeXLive::TLWinGoo::register_file_type($name, $cmd);
+ } elsif ($how eq "remove") {
+ TeXLive::TLWinGoo::unregister_file_type($name);
+ } else {
+ tlwarn("Unknown mode $how\n");
+ return 0;
+ }
+ return 1;
+}
+
+sub _do_postaction_script {
+ my ($how, $tlpobj, $pa) = @_;
+ my ($errors, %keyval) =
+ parse_into_keywords($pa, qw/file filew32/);
+
+ if ($errors) {
+ tlwarn("parsing the postaction line >>$pa<< did not succeed!\n");
+ return 0;
+ }
+
+ # file can be an arbitrary string
+ if (!defined($keyval{'file'})) {
+ tlwarn("filename of script not given\n");
+ return 0;
+ }
+ my $file = $keyval{'file'};
+ if (win32() && defined($keyval{'filew32'})) {
+ $file = $keyval{'filew32'};
+ }
+ my $texdir = `kpsewhich -var-value=SELFAUTOPARENT`;
+ chomp($texdir);
+ my @syscmd;
+ if ($file =~ m/\.pl$/i) {
+ # we got a perl script, call it via perl
+ push @syscmd, "perl", "$texdir/$file";
+ } elsif ($file =~ m/\.texlua$/i) {
+ # we got a texlua script, call it via texlua
+ push @syscmd, "texlua", "$texdir/$file";
+ } else {
+ # we got anything else, call it directly and hope it is excutable
+ push @syscmd, "$texdir/$file";
+ }
+ push @syscmd, $how, $texdir;
+ my $ret = system (@syscmd);
+ if ($ret != 0) {
+ $ret /= 256 if $ret > 0;
+ my $pwd = cwd ();
+ warn "$0: calling post action script $file did not succeed in $pwd, status $ret";
+ return 0;
+ }
+ return 1;
+}
+
+sub _do_postaction_shortcut {
+ my ($how, $tlpobj, $pa) = @_;
+ return 1 unless win32();
+ my ($errors, %keyval) =
+ parse_into_keywords($pa, qw/type name icon cmd args hide/);
+
+ if ($errors) {
+ tlwarn("parsing the postaction line >>$pa<< did not succeed!\n");
+ return 0;
+ }
+
+ # type can be either menu or desktop
+ if (!defined($keyval{'type'})) {
+ tlwarn("type of shortcut postaction not given\n");
+ return 0;
+ }
+ my $type = $keyval{'type'};
+ if (($type ne "menu") && ($type ne "desktop")) {
+ tlwarn("type of shortcut postaction $type is unknown (menu, desktop)\n");
+ return 0;
+ }
+
+ # name can be an arbitrary string
+ if (!defined($keyval{'name'})) {
+ tlwarn("name of shortcut postaction not given\n");
+ return 0;
+ }
+ my $name = $keyval{'name'};
+
+ # icon, cmd, args is optional
+ my $icon = (defined($keyval{'icon'}) ? $keyval{'icon'} : '');
+ my $cmd = (defined($keyval{'cmd'}) ? $keyval{'cmd'} : '');
+ my $args = (defined($keyval{'args'}) ? $keyval{'args'} : '');
+
+ # hide can be only 0 or 1, and defaults to 0
+ my $hide = (defined($keyval{'hide'}) ? $keyval{'hide'} : 0);
+ if (($hide ne "0") && ($hide ne "1")) {
+ tlwarn("hide of shortcut postaction $hide is unknown (0, 1)\n");
+ return 0;
+ }
+
+ if ($how eq "install") {
+ my $texdir = `kpsewhich -var-value=SELFAUTOPARENT`;
+ chomp($texdir);
+ my $texdir_bsl = conv_to_w32_path($texdir);
+ $icon =~ s!^TEXDIR/!$texdir/!;
+ $args =~ s!^TEXDIR/!$texdir/!;
+ $args = conv_to_w32_path($args);
+ if ($type eq "menu") {
+ TeXLive::TLWinGoo::add_menu_shortcut(
+ $TeXLive::TLConfig::WindowsMainMenuName,
+ $name, $icon, $cmd, $args, $hide);
+ } elsif ($type eq "desktop") {
+ TeXLive::TLWinGoo::add_desktop_shortcut(
+ $name, $icon, $cmd, $args, $hide);
+ } else {
+ tlwarn("Unknown type of shortcut: $type\n");
+ return 0;
+ }
+ } elsif ($how eq "remove") {
+ if ($type eq "menu") {
+ TeXLive::TLWinGoo::remove_menu_shortcut(
+ $TeXLive::TLConfig::WindowsMainMenuName, $name);
+ } elsif ($type eq "desktop") {
+ TeXLive::TLWinGoo::remove_desktop_shortcut($name);
+ } else {
+ tlwarn("Unknown type of shortcut: $type\n");
+ return 0;
+ }
+ } else {
+ tlwarn("Unknown mode $how\n");
+ return 0;
+ }
+ return 1;
+}
+
+sub parse_into_keywords {
+ my ($str, @keys) = @_;
+ my @words = quotewords('\s+', 0, $str);
+ my %ret;
+ my $error = 0;
+ while (@words) {
+ $_ = shift @words;
+ if (/^([^=]+)=(.*)$/) {
+ $ret{$1} = $2;
+ } else {
+ tlwarn("parser found a invalid word in parsing keys: $_\n");
+ $error++;
+ $ret{$_} = "";
+ }
+ }
+ for my $k (keys %ret) {
+ if (!member($k, @keys)) {
+ $error++;
+ tlwarn("parser found invalid keyword: $k\n");
+ }
+ }
+ return($error, %ret);
+}
=item C<untar($tarfile,$targetdir, $remove_tarfile)>
@@ -1270,13 +1566,12 @@ sub untar {
return $ret;
}
-
=item C<setup_programs($bindir, $platform)>
Populate the global C<$::progs> hash containing the paths to the
-programs C<wget>, C<tar>, C<lzmadec>. The C<$bindir> argument specifies
-the path to the location of the C<lzmadec> binaries, the C<$platform>
+programs C<wget>, C<tar>, C<xzdec>. The C<$bindir> argument specifies
+the path to the location of the C<xzdec> binaries, the C<$platform>
gives the TeX Live platform name, used as the extension on our
executables. If a program is not present in the TeX Live tree, we also
check along PATH (without the platform extension.)
@@ -1290,17 +1585,17 @@ sub setup_programs {
my $ok = 1;
$::progs{'wget'} = "wget";
- $::progs{'lzmadec'} = "lzmadec";
- $::progs{'lzma'} = "lzma";
+ $::progs{'xzdec'} = "xzdec";
+ $::progs{'xz'} = "xz";
$::progs{'tar'} = "tar";
if ($^O =~ /^MSWin(32|64)$/i) {
$::progs{'wget'} = conv_to_w32_path("$bindir/wget/wget.exe");
$::progs{'tar'} = conv_to_w32_path("$bindir/tar.exe");
- $::progs{'lzmadec'} = conv_to_w32_path("$bindir/lzma/lzmadec.win32.exe");
- $::progs{'lzma'} = conv_to_w32_path("$bindir/lzma/lzma.exe");
- for my $prog ("lzmadec", "wget") {
- my $opt = $prog eq "lzmadec" ? "--help" : "--version";
+ $::progs{'xzdec'} = conv_to_w32_path("$bindir/xz/xzdec.exe");
+ $::progs{'xz'} = conv_to_w32_path("$bindir/xz/xz.exe");
+ for my $prog ("xzdec", "wget") {
+ my $opt = $prog eq "xzdec" ? "--help" : "--version";
my $ret = system("$::progs{$prog} $opt >nul 2>&1"); # on windows
if ($ret != 0) {
warn "TeXLive::TLUtils::setup_programs (w32) failed"; # no nl for perl
@@ -1322,8 +1617,8 @@ sub setup_programs {
}
my $s = 0;
$s += setup_unix_one('wget', "$bindir/wget/wget.$platform", "--version");
- $s += setup_unix_one('lzmadec',"$bindir/lzma/lzmadec.$platform","--help");
- $s += setup_unix_one('lzma', "$bindir/lzma/lzma.$platform", "notest");
+ $s += setup_unix_one('xzdec',"$bindir/xz/xzdec.$platform","--help");
+ $s += setup_unix_one('xz', "$bindir/xz/xz.$platform", "notest");
$ok = ($s == 3); # failure return unless all are present.
}
@@ -1600,7 +1895,7 @@ improved (checking for duplicates).
sub create_fmtutil {
my ($tlpdb,$dest,$localconf) = @_;
my @lines = $tlpdb->fmtutil_cnf_lines;
- _create_config_files($tlpdb, "texmf/fmtutil/fmtutil-hdr.cnf", $dest,
+ _create_config_files($tlpdb, "texmf/web2c/fmtutil-hdr.cnf", $dest,
$localconf, 0, '#', \@lines);
}
diff --git a/Master/tlpkg/TeXLive/TLWinGoo.pm b/Master/tlpkg/TeXLive/TLWinGoo.pm
index fbc163dd39e..c4d0558ceaa 100644
--- a/Master/tlpkg/TeXLive/TLWinGoo.pm
+++ b/Master/tlpkg/TeXLive/TLWinGoo.pm
@@ -58,7 +58,6 @@ C<TeXLive::TLWinGoo> -- Additional utilities for Windows
$prog, $args, $batgui);
TeXLive::TLWinGoo::add_menu_shortcut($place, $name, $icon,
$prog, $args, $batgui);
- TeXLive::TLWinGoo::init_unshortbat($texdir);
TeXLive::TLWinGoo::remove_desktop_shortcut($name);
TeXLive::TLWinGoo::remove_menu_shortcut($place, $name);
@@ -104,7 +103,6 @@ BEGIN {
&add_menu_shortcut
&remove_desktop_shortcut
&remove_menu_shortcut
- &init_unshortbat
&create_uninstaller
&unregister_uninstaller
);
@@ -857,8 +855,7 @@ sub menu_path() {
=pod
-=item C<add_desktop_shortcut($texdir, $name, $icon,
- $prog, $args, $batgui)>
+=item C<add_desktop_shortcut($name, $icon, $prog, $args, $batgui)>
Add a desktop shortcut, with name $name and icon $icon, pointing to
program $prog with parameters $args (a string). Use a non-null
@@ -866,14 +863,10 @@ batgui parameter if the shortcut starts a gui program via a
batchfile. Then the inevitable command prompt will be hidden
rightaway, leaving only the gui program visible.
-The parameter $texdir is merely used to locate the batchfile
-unshort.bat for uninstalling desktop shortcuts, which needs to be
-updated.
-
=cut
sub add_desktop_shortcut {
- my ($texdir, $name, $icon, $prog, $args, $batgui) = @_;
+ my ($name, $icon, $prog, $args, $batgui) = @_;
# create shortcut
my ($shc, $shpath, $shfile);
@@ -884,15 +877,6 @@ sub add_desktop_shortcut {
$shc->{'ShowCmd'} = $batgui ? SW_SHOWMINNOACTIVE : SW_SHOWNORMAL;
$shfile = desktop_path().'/'.$name.'.lnk';
$shc->Save($shfile);
-
- # update batchfile for uninstalling shortcuts
- if (open UNSHORT, ">>$texdir/tlpkg/installer/unshort.bat") {
- $shfile =~ s!/!\\!g;
- print UNSHORT 'del "'.$shfile."\" 2>nul\n";
- close UNSHORT;
- } else {
- warn "Cannot open $texdir/tlpkg/installer/unshort.bat for appending: $!";
- }
}
=pod
@@ -932,39 +916,16 @@ sub add_menu_shortcut {
=pod
-=item C<init_unshortbat($texdir)>
-
-Reinitialize unshort.bat, the shortcuts uninstaller.
-
-=cut
-
-sub init_unshortbat {
- my $texdirw = shift;
- my $menupath = menu_path();
- $menupath =~ s!/!\\!g;
-
- # batchfile for uninstalling shortcuts
- if (open UNSHORT, ">$texdirw/tlpkg/installer/unshort.bat") {
- print UNSHORT 'rmdir /s /q "'.$menupath."\\TeX Live 2008\" 2>nul\n";
- close UNSHORT;
- } else {
- warn "Cannot create $texdirw/tlpkg/installer/unshort.bat: $!";
- }
-}
-
-=pod
-
=item C<remove_desktop_shortcut($name)>
-For uninstallation of an individual package. We leave unshort.bat
-alone because redundant entries are no big deal.
+For uninstallation of an individual package.
=cut
sub remove_desktop_shortcut {
my $name = shift;
unlink desktop_path().'/'.$name.'.lnk';
-}
+}
=pod
@@ -1035,7 +996,6 @@ path $td\\bin\\win32;%path%
set PERL5LIB=
\"$td\\tlpkg\\tlperl\\bin\\perl.exe\" \"$td\\texmf\\scripts\\texlive\\uninstall-win32.pl\"
if errorlevel 1 exit
-call \"$tdw\\tlpkg\\installer\\unshort.bat\"
copy \"$tdw\\tlpkg\\installer\\uninst2.bat\" \"\%TEMP\%\"
rem pause
\"\%TEMP\%\\uninst2.bat\"
diff --git a/Master/tlpkg/bin/check-duplicated-runfiles b/Master/tlpkg/bin/check-duplicated-runfiles
index d212c68e589..05a51860283 100755
--- a/Master/tlpkg/bin/check-duplicated-runfiles
+++ b/Master/tlpkg/bin/check-duplicated-runfiles
@@ -11,7 +11,7 @@ BEGIN {
unshift (@INC, "$mydir/..");
}
-use TeXLive::TLConfig;
+use TeXLive::TLConfig qw/$RelocPrefix $RelocTree/;
use TeXLive::TLPOBJ;
use TeXLive::TLPDB;
@@ -31,7 +31,9 @@ my @runtime_files = ();
foreach my $tlpn ($tlpdb->list_packages) {
next if ($tlpn =~ /$non_normal/);
my $tlp = $tlpdb->get_package($tlpn);
- push @runtime_files, $tlp->runfiles;
+ my @files = $tlp->runfiles;
+ if ($tlp->relocated) { for (@files) { s:^$RelocPrefix/:$RelocTree/:; } }
+ push @runtime_files, @files;
}
# build the duplicates list
diff --git a/Master/tlpkg/bin/check-tlnet-consistency b/Master/tlpkg/bin/check-tlnet-consistency
index 07ce83c08c1..81e5481859c 100755
--- a/Master/tlpkg/bin/check-tlnet-consistency
+++ b/Master/tlpkg/bin/check-tlnet-consistency
@@ -49,13 +49,13 @@ sub main
# set up the programs ...
if ($opt_nosetup) {
# do a minimal setup
- $::progs{'lzma'} = "lzma";
+ $::progs{'xz'} = "xz";
$::progs{'tar'} = "tar";
} else {
# do a full setup
my $ret = &TeXLive::TLUtils::setup_programs("$Master/tlpkg/installer");
if ($ret == -1) {
- tlwarn("no binary of lzmadec for $::_platform_ detected, aborting.\n");
+ tlwarn("no binary of xzdec for $::_platform_ detected, aborting.\n");
exit 1;
}
if (!$ret) {
@@ -82,16 +82,16 @@ sub main
my %filedifferrors;
foreach my $pkg ($tlpdb->list_packages()) {
next if ($pkg =~ m/^00texlive/);
- my $cont = "$opt_location/archive/$pkg.tar.lzma";
- my $srccont = "$opt_location/archive/$pkg.source.tar.lzma";
- my $doccont = "$opt_location/archive/$pkg.doc.tar.lzma";
+ my $cont = "$opt_location/archive/$pkg.tar.xz";
+ my $srccont = "$opt_location/archive/$pkg.source.tar.xz";
+ my $doccont = "$opt_location/archive/$pkg.doc.tar.xz";
my $tlpdbtlpobj = $tlpdb->get_package($pkg);
my $dodoc = ($tlpdb->config_doc_container && $tlpdbtlpobj->docfiles);
my $dosrc = ($tlpdb->config_src_container && $tlpdbtlpobj->srcfiles);
if ($opt_filelists) {
- system("cat $cont | $::progs{lzmadec} | $::progs{tar} -C \"$temp\" -xf - ");
+ system("cat $cont | $::progs{xzdec} | $::progs{tar} -C \"$temp\" -xf - ");
} else {
- system("cat $cont | $::progs{lzmadec} | $::progs{tar} -C \"$temp\" -xf - tlpkg/tlpobj");
+ system("cat $cont | $::progs{xzdec} | $::progs{tar} -C \"$temp\" -xf - tlpkg/tlpobj");
}
if (! -r "$temp/tlpkg/tlpobj/$pkg.tlpobj") {
push @notlpobj, $pkg;
@@ -101,7 +101,7 @@ sub main
die "Cannot load tlpobj from $temp/$pkg.tlpobj: $!" unless defined($tartlpobj);
# get the src and doc containers unpacked and add the respective files
if ($dosrc) {
- system("cat $srccont | $::progs{lzmadec} | $::progs{tar} -C \"$temp\" -xf - tlpkg/tlpobj");
+ system("cat $srccont | $::progs{xzdec} | $::progs{tar} -C \"$temp\" -xf - tlpkg/tlpobj");
if (! -r "$temp/tlpkg/tlpobj/$pkg.source.tlpobj") {
push @missingsrccontainer, $pkg;
} else {
@@ -112,7 +112,7 @@ sub main
}
}
if ($dodoc) {
- system("cat $doccont | $::progs{lzmadec} | $::progs{tar} -C \"$temp\" -xf - tlpkg/tlpobj");
+ system("cat $doccont | $::progs{xzdec} | $::progs{tar} -C \"$temp\" -xf - tlpkg/tlpobj");
if (! -r "$temp/tlpkg/tlpobj/$pkg.doc.tlpobj") {
push @missingdoccontainer, $pkg;
} else {
@@ -191,7 +191,7 @@ sub main
}
}
if (@sizeerror) {
- print "packages with wrong container size/md5s:\n";
+ print "packages with wront container size/md5s:\n";
for my $p (@sizeerror) {
print "$p\n";
}
@@ -268,7 +268,7 @@ default is C<./tlnet>.
=item B<-no-setup>
-Does not try to setup the various programs, but uses I<lzma> and I<tar>
+Does not try to setup the various programs, but uses I<xz> and I<tar>
from path.
=item B<-help>
diff --git a/Master/tlpkg/bin/tl-fix-container-infos b/Master/tlpkg/bin/tl-fix-container-infos
index 2f627976713..df0ac5ed2be 100755
--- a/Master/tlpkg/bin/tl-fix-container-infos
+++ b/Master/tlpkg/bin/tl-fix-container-infos
@@ -64,13 +64,13 @@ sub main
# set up the programs.
if ($opt_nosetup) {
# do a minimal setup
- $::progs{'lzma'} = "lzma";
+ $::progs{'xz'} = "xz";
$::progs{'tar'} = "tar";
} else {
# do a full setup
my $ret = &TeXLive::TLUtils::setup_programs("$Master/tlpkg/installer");
if ($ret == -1) {
- tlwarn("$0: no lzmadec for $::_platform_, aborting.\n");
+ tlwarn("$0: no xzdec for $::_platform_, aborting.\n");
exit 1;
}
if (!$ret) {
@@ -93,7 +93,7 @@ sub main
$tlpdb->add_tlpobj($obj);
}
$tlpdb->save;
- system("lzma --force -k -z $opt_location/tlpkg/texlive.tlpdb");
+ system("xz --force -k -z $opt_location/tlpkg/texlive.tlpdb");
return 0;
}
@@ -102,16 +102,16 @@ sub main
sub do_containers {
my ($obj, $dosrc, $dodoc) = @_;
my $fbase = "$opt_location/archive/" . $obj->name;
- my ($a, $b) = do_size_md ("${fbase}.tar.lzma");
+ my ($a, $b) = do_size_md ("${fbase}.tar.xz");
$obj->containersize($a);
$obj->containermd5($b);
if ($dosrc && $obj->srcfiles) {
- ($a, $b) = do_size_md ("${fbase}.source.tar.lzma");
+ ($a, $b) = do_size_md ("${fbase}.source.tar.xz");
$obj->srccontainersize($a);
$obj->srccontainermd5($b);
}
if ($dodoc && $obj->docfiles) {
- ($a, $b) = do_size_md ("${fbase}.doc.tar.lzma");
+ ($a, $b) = do_size_md ("${fbase}.doc.tar.xz");
$obj->doccontainersize($a);
$obj->doccontainermd5($b);
}
@@ -146,7 +146,7 @@ of containers to be compared against; default is C<.>.
=item B<-no-setup>
-Does not try to setup the various programs, but uses I<lzma> and I<tar>
+Does not try to setup the various programs, but uses I<xz> and I<tar>
from the current path.
=item B<-help>
diff --git a/Master/tlpkg/bin/tl-makeself-from-tlnet b/Master/tlpkg/bin/tl-makeself-from-tlnet
index 450d22230ed..2ead523a0fc 100755
--- a/Master/tlpkg/bin/tl-makeself-from-tlnet
+++ b/Master/tlpkg/bin/tl-makeself-from-tlnet
@@ -4,7 +4,7 @@
# This file is licensed under the GNU General Public License version 2
# or any later version.
#
-# Creates a .run file for updating the texlive.infra and bin-texlive
+# Creates a .run file for updating the texlive.infra
# packages on Unix, similar to the .exe we create for Windows. Both are
# created in the nightly cron from tl-update-tlcritical.
@@ -28,13 +28,12 @@ cd $TMP
mkdir master
cd master
-# unpack texlive.infra and bin-texlive archives for all platforms,
-# except w32.
-for pkg in texlive.infra bin-texlive; do
- for i in $ARCHIVE/$pkg*.tar.lzma ; do
+# unpack texlive.infra archives for all platforms, except w32.
+for pkg in texlive.infra; do
+ for i in $ARCHIVE/$pkg*.tar.xz ; do
case "$i" in
*win32*) ;;
- *) lzmadec <$i | tar -xf - ;;
+ *) xzdec <$i | tar -xf - ;;
esac
done
done
@@ -68,25 +67,24 @@ if test -r "$ROOT/tlpkg/texlive.tlpdb"; then
t_instdir=$ROOT/tlpkg/installer # target installer dir
# ensure these target directories exist.
- mkdir -p $t_instdir/lzma
+ mkdir -p $t_instdir/xz
mkdir -p $t_instdir/wget
# start the list of tlpobjs we will install
- tlpobjs="$t_objdir/bin-texlive.tlpobj $t_objdir/texlive.infra.tlpobj"
+ tlpobjs="$t_objdir/texlive.infra.tlpobj"
for a in $ROOT/bin/*; do
test -d "$a" || continue # skip any cruft files
b=`basename $a` # just the architecture name
# add the tlpobjs for this platform t the list.
- tlpobjs="$tlpobjs $t_objdir/bin-texlive.$b.tlpobj"
tlpobjs="$tlpobjs $t_objdir/texlive.infra.$b.tlpobj"
# install the bin dir for this platform.
(cd bin && tar cf - $b) | (cd $ROOT/bin && tar xf -)
# copy the installer binaries.
- cp installer/lzma/lzmadec.$b $t_instdir/lzma/
- cp installer/lzma/lzma.$b $t_instdir/lzma/
+ cp installer/xz/xzdec.$b $t_instdir/xz/
+ cp installer/xz/xz.$b $t_instdir/xz/
test -r installer/wget/wget.$b \
&& cp installer/wget/wget.$b $t_instdir/wget
done
diff --git a/Master/tlpkg/bin/tl-update-containers b/Master/tlpkg/bin/tl-update-containers
index 56a62be6dbb..81a6a987ceb 100755
--- a/Master/tlpkg/bin/tl-update-containers
+++ b/Master/tlpkg/bin/tl-update-containers
@@ -24,7 +24,7 @@ use Pod::Usage;
use File::Path;
# packages matching these re's will not be updated without --all.
-my @critical_pkg_list = qw/bin-texlive texlive\.infra/;
+my @critical_pkg_list = qw/texlive\.infra/;
our ($mydir, $vc_id);
my $opt_all = 0;
@@ -43,6 +43,7 @@ GetOptions(
"location=s" => \$opt_location,
"no-setup" => \$opt_nosetup,
"recreate" => \$opt_recreate,
+ "relative" => \$opt_relative,
"version" => \$opt_version,
"help|?" => \$opt_help) or pod2usage(1);
@@ -71,8 +72,8 @@ sub main
my $srcsplit = $tlpdb->config_src_container;
my $docsplit = $tlpdb->config_doc_container;
my $format = $tlpdb->config_container_format;
- my $type = "lzma";
- if ($format eq "lzma" || $format eq "zip") {
+ my $type = "xz";
+ if ($format eq "xz" || $format eq "zip") {
$type = $format;
} else {
tlwarn("$0: unknown container format $format in 00texlive.config; ",
@@ -176,24 +177,24 @@ sub main
}
}
- # The two packages 00texlive.config and 00texlive-installation.config
+ # The two packages 00texlive.config and 00texlive.installation
# are essential and have to be included in each and every case.
# So add them ...
my $tlpconfig = $tlpdb->get_package("00texlive.config");
$nettlpdb->add_tlpobj($tlpconfig);
- my $tlpinstconfig = $tlpdb->get_package("00texlive-installation.config");
+ my $tlpinstconfig = $tlpdb->get_package("00texlive.installation");
$nettlpdb->add_tlpobj($tlpinstconfig);
# set up the programs.
if ($opt_nosetup) {
# do a minimal setup
- $::progs{'lzma'} = "lzma";
+ $::progs{'xz'} = "xz";
$::progs{'tar'} = "tar";
} else {
# do a full setup
my $ret = &TeXLive::TLUtils::setup_programs("$Master/tlpkg/installer");
if ($ret == -1) {
- tlwarn("$0: no lzmadec for $::_platform_, aborting.\n");
+ tlwarn("$0: no xzdec for $::_platform_, aborting.\n");
exit 1;
}
if (!$ret) {
@@ -235,14 +236,36 @@ sub main
debug("updating $pkg containers ...\n");
# we have to make a copy otherwise the src/doc files in the original
# tlpobj are removed, and thus also in the tlpdb to be saved!!!
+
my $objcopy = $obj->copy;
+
+ # if we try to create relative containers we check the package
+ # for residing only in texmf-dist, and being relocatable, and
+ # not having a dependency on $pkg.ARCH
+ # TLPOBJ->common_texmf_tree returns the string of the
+ # common temxf tree or undefined, so we can use it in &&
+ my $ctt = $objcopy->common_texmf_tree;
+ my $deps_on_arch = 0;
+ for ($objcopy->depends) {
+ if (m/^$pkg\.ARCH$/) {
+ $deps_on_arch = 1;
+ last;
+ }
+ }
+ my $do_relative = 0;
+ debug("pkg=$pkg deps_on_arch=$deps_on_arch, ctt=", defined($ctt)?$ctt:"(undefined)", "\n");
+ $do_relative = $opt_relative && # user option
+ ($deps_on_arch?0:1) && # no $pkg.ARCH dep
+ (defined($ctt)?1:0) && # see above
+ (($ctt eq $TeXLive::TLConfig::RelocTree) ? 1 : 0);
+ # only for texmf-dist
if ($srcsplit) {
if (!$opt_dry) {
my $objsrc = $obj->srcfiles_package;
$objcopy->clear_srcfiles;
if ($objsrc) {
my ($s,$m) = $objsrc->make_container($type, $Master, $opt_containerdir,
- "$pkg.source", $opt_relative);
+ "$pkg.source", $do_relative);
if ($s > 0) {
# something was created
# important, we have to add it to the original $obj
@@ -266,7 +289,7 @@ sub main
$objcopy->clear_docfiles;
if ($objdoc) {
my ($s,$m) = $objdoc->make_container($type, $Master,
- $opt_containerdir, "$pkg.doc", $opt_relative);
+ $opt_containerdir, "$pkg.doc", $do_relative);
if ($s > 0) {
# something was created
$obj->doccontainersize($s);
@@ -285,7 +308,7 @@ sub main
}
if (!$opt_dry) {
my ($s,$m) = $objcopy->make_container($type, $Master, $opt_containerdir,
- $pkg, $opt_relative);
+ $pkg, $do_relative);
if ($s > 0) {
$obj->containersize($s);
}
@@ -293,6 +316,10 @@ sub main
$obj->containermd5($m);
}
}
+ # if the container has been build relocatable we save that information
+ $obj->relocated($do_relative);
+ # and remove the common prefix from the files in the tlpobj
+ $obj->cancel_common_texmf_tree if $do_relative;
# add the updated (or new) TLPOBJ to NET TLPDB
# that way the other container sizes are not destroyed
$nettlpdb->add_tlpobj($obj) unless $opt_dry;
@@ -300,7 +327,7 @@ sub main
# remove old containers
for my $op (@removecontainers) {
- if (-r "$opt_containerdir/$op.tar.lzma") {
+ if (-r "$opt_containerdir/$op.tar.xz") {
info("$0: $op container is old, removing it\n");
`rm $opt_containerdir/$op.*` unless $opt_dry;
}
@@ -349,13 +376,13 @@ sub main
# docfiles into the texlive.tlpdb, no idea why. So update should now
# do that.
$nettlpdb->save;
- system("lzma --force -k -z $opt_location/tlpkg/texlive.tlpdb");
+ system("$::progs{'xz'} --force -k -z $opt_location/tlpkg/texlive.tlpdb");
if (! @ARGV) {
# do a last check that all the containers are actually present
foreach my $p ($nettlpdb->list_packages) {
next if $p =~ /00texlive/;
- if (! -r "$opt_containerdir/$p.tar.lzma") {
+ if (! -r "$opt_containerdir/$p.tar.xz") {
tlwarn("$0: container for $p is missing, strange\n");
}
}
@@ -392,12 +419,12 @@ C<texlive.tlpdb> if need be.
=item B<-all|-a>
Include packages deemed critical in the update, currently
-C<texlive.infra> and C<bin-texlive>. (That is, C<tlmgr> itself needs
+C<texlive.infra>. (That is, C<tlmgr> itself needs
testing before updating, so we don't do it by default.)
=item B<-no-setup>
-Does not try to setup the various programs, but uses I<lzma> and I<tar>
+Does not try to setup the various programs, but uses I<xz> and I<tar>
from the current path.
=item B<-help>
diff --git a/Master/tlpkg/bin/tl-update-nsis b/Master/tlpkg/bin/tl-update-nsis
index a1acbd56ebc..78ef875db99 100755
--- a/Master/tlpkg/bin/tl-update-nsis
+++ b/Master/tlpkg/bin/tl-update-nsis
@@ -1,6 +1,6 @@
#!/usr/bin/env perl
# $Id$
-# Copyright 2008 Norbert Preining
+# Copyright 2008, 2009 Norbert Preining
# This file is licensed under the GNU General Public License version 2
# or any later version.
#
@@ -40,13 +40,9 @@ sub main
chomp (my $Master = `cd $mydir/../.. && pwd`);
my $tlpdb = TeXLive::TLPDB->new ("root" => $Master);
die("Cannot find tlpdb in $Master\n") unless defined($tlpdb);
- my $bintexlive = $tlpdb->get_package("bin-texlive");
- my $bintexlivew32 = $tlpdb->get_package("bin-texlive.win32");
my $texliveinfra = $tlpdb->get_package("texlive.infra");
my $texliveinfraw32 = $tlpdb->get_package("texlive.infra.win32");
my @allfiles = ();
- push @allfiles, $bintexlive->all_files;
- push @allfiles, $bintexlivew32->all_files if defined $bintexlivew32;
push @allfiles, $texliveinfra->all_files;
push @allfiles, $texliveinfraw32->all_files if defined $texliveinfraw32;
@@ -58,7 +54,7 @@ sub main
$removetlpobjdir = 1;
}
my $rev = 0; # we want the highest rev all these packages.
- for my $p ($bintexlive, $bintexlivew32, $texliveinfra, $texliveinfraw32) {
+ for my $p ($texliveinfra, $texliveinfraw32) {
if (defined $p) {
if ($p->revision > $rev) {
$rev = $p->revision;
@@ -95,7 +91,7 @@ Page instfiles
Name "TeX Live Manager Update ${REV}"
OutFile "update-tlmgr-${REV}.exe"
-InstallDir "$PROGRAMFILES\texlive\2008"
+InstallDir "$PROGRAMFILES\texlive\$TeXLive::TLConfig::ReleaseYear"
RequestExecutionLevel "user"
@@ -135,7 +131,7 @@ EOF
}
}
print " ExecWait \'\"\$INSTDIR\\bin\\win32\\tlmgr.bat\" _include_tlpobj";
- for my $p ($bintexlive, $bintexlivew32, $texliveinfra, $texliveinfraw32) {
+ for my $p ($texliveinfra, $texliveinfraw32) {
if (defined $p) {
print " \"\$INSTDIR\\tlpkg\\tlpobj\\", $p->name, ".tlpobj\"";
}
diff --git a/Master/tlpkg/bin/tl-update-tlcritical b/Master/tlpkg/bin/tl-update-tlcritical
index aa88d91815f..81b28dcdd68 100755
--- a/Master/tlpkg/bin/tl-update-tlcritical
+++ b/Master/tlpkg/bin/tl-update-tlcritical
@@ -34,7 +34,7 @@ do_updater ()
# update normal containers.
echo "$0: running tl-update-containers (for critical packages)..."
tl-update-containers -location $tlcrit -all \
- 00texlive-installation.config 00texlive.config bin-texlive texlive.infra
+ 00texlive.installation 00texlive.config texlive.infra
# update Unix disaster recovery.
echo "$0: running tl-makeself-from-tlnet..."
diff --git a/Master/tlpkg/bin/tlpfiles b/Master/tlpkg/bin/tlpfiles
index e41b6cf4c7e..d5407b45aab 100755
--- a/Master/tlpkg/bin/tlpfiles
+++ b/Master/tlpkg/bin/tlpfiles
@@ -17,7 +17,7 @@ BEGIN {
use strict;
-use TeXLive::TLConfig;
+use TeXLive::TLConfig qw/$RelocPrefix $RelocTree/;
use TeXLive::TLPDB;
use Pod::Usage;
use Getopt::Long;
@@ -58,6 +58,7 @@ sub main
die "$0: no TeX Live package named $pkg in $Master.\n" if ! $obj;
my @files = $obj->all_files;
+ if ($obj->relocated) { for (@files) { s:^$RelocPrefix/:$RelocTree/:; } }
print "$_\n" foreach @files;
return 0;
diff --git a/Master/tlpkg/bin/tlpkg-by-size b/Master/tlpkg/bin/tlpkg-by-size
index 9b204966e0b..3f15ffb1d3d 100755
--- a/Master/tlpkg/bin/tlpkg-by-size
+++ b/Master/tlpkg/bin/tlpkg-by-size
@@ -5,9 +5,9 @@
test $# -eq 0 && set - /home/ftp/texlive/tlnet/2008/archive
cd "$1" || exit 1
-for pkgtar in `ls *.tar.lzma | egrep -v '\..*\.tar\.lzma$'`; do
- pkg=`echo $pkgtar | sed 's/\.tar\.lzma$//'`
- size=`cat $pkg.*tar.lzma | wc -c`
+for pkgtar in `ls *.tar.xz | egrep -v '\..*\.tar\.xz$'`; do
+ pkg=`echo $pkgtar | sed 's/\.tar\.xz$//'`
+ size=`cat $pkg.*tar.xz | wc -c`
size=`expr $size / 1024`
printf "%6d %s\n" $size "$pkg"
done | sort -nr
diff --git a/Master/tlpkg/bin/tlpkg-ctan-check b/Master/tlpkg/bin/tlpkg-ctan-check
index 3dda28951a8..6afade21522 100755
--- a/Master/tlpkg/bin/tlpkg-ctan-check
+++ b/Master/tlpkg/bin/tlpkg-ctan-check
@@ -8,7 +8,7 @@ BEGIN {
unshift (@INC, "$mydir/..");
}
-use TeXLive::TLConfig;
+use TeXLive::TLConfig qw/$RelocPrefix $RelocTree/;
use TeXLive::TLPOBJ;
use TeXLive::TLPDB;
@@ -331,6 +331,7 @@ sub do_tlp
push @tpm_files, $tlp->runfiles;
push @tpm_files, $tlp->docfiles;
push @tpm_files, $tlp->srcfiles;
+ if ($tlp->relocated) { for (@tpm_files) { s:^$RelocPrefix/:$RelocTree/:; } }
# we don't push bin files, should we?
my @compared = ();
diff --git a/Master/tlpkg/bin/tlprm b/Master/tlpkg/bin/tlprm
index 997fb3b8d6a..0c2663a6d02 100755
--- a/Master/tlpkg/bin/tlprm
+++ b/Master/tlpkg/bin/tlprm
@@ -18,7 +18,7 @@ BEGIN {
use strict;
-use TeXLive::TLConfig;
+use TeXLive::TLConfig qw/$RelocPrefix $RelocTree/;
use TeXLive::TLPDB;
use TeXLive::TLPSRC;
use TeXLive::TLUtils;
@@ -50,6 +50,7 @@ sub main
}
my @files = $obj->all_files;
+ if ($tlp->relocated) { for (@files) { s:^$RelocPrefix/:$RelocTree/:; } }
my $tlpsrc = new TeXLive::TLPSRC;
$tlpsrc->from_file ($f);
push (@files, $tlpsrc->_srcfile); # also want to remove the tlpsrc file.
diff --git a/Master/tlpkg/installer/install-menu-perltk.pl b/Master/tlpkg/installer/install-menu-perltk.pl
index 5d1134c64a0..93c3ba90b5a 100644
--- a/Master/tlpkg/installer/install-menu-perltk.pl
+++ b/Master/tlpkg/installer/install-menu-perltk.pl
@@ -1,7 +1,8 @@
#!/usr/bin/env perl
# $Id$
#
-# Copyright 2008 Norbert Preining, Reinhard Kotucha
+# Copyright 2008, 2009 Norbert Preining
+# Copyright 2008 Reinhard Kotucha
# This file is licensed under the GNU General Public License version 2
# or any later version.
#
@@ -62,7 +63,6 @@ my $texmfsysconfigtext;
my $texmfhometext;
my $texdirtext;
my $langcoltext;
-my $symlinktext;
my $optletterstate;
my $optfmtstate;
my $optsrcstate;
@@ -70,6 +70,7 @@ my $optdocstate;
my $letteryesno = ( $vars{'option_letter'} ? $text{'yes'} : $text{'no'} );
my $fmtyesno = ( $vars{'option_fmt'} ? $text{'yes'} : $text{'no'} );
my $srcyesno = ( $vars{'option_src'} ? $text{'yes'} : $text{'no'} );
+my $deskintyesno = ( $vars{'option_desktop_integration'} ? $text{'yes'} : $text{'no'} );
my $docyesno = ( $vars{'option_doc'} ? $text{'yes'} : $text{'no'} );
$::run_menu = \&run_menu_perltk;
@@ -258,15 +259,13 @@ sub run_menu_perltk {
$fr->Button(-text => $text{'toggle'}, -command => sub { toggle_and_set_opt_variable(\$vars{'option_src'}, \$srcyesno); })->grid(-row => $row, -column => 3, -sticky => "ew", -padx => "2m");
}
+ $row++;
+ $fr->Label(-text => $labels{'desktop_integration'}, -anchor => 'w')->grid(-row => $row, -column => 1, -sticky => 'w');
+ $fr->Label(-anchor => 'w', -textvariable => \$deskintyesno)->grid(-row => $row, -column => 2, -padx => "2m");
if (unix()) {
- $row++;
- # Symlinks
- $fr->Label(-text => "------- $text{'sysint'} -------")->grid(-row => $row, -column => 1,-columnspan => 3);
-
- $row++;
- $fr->Label(-text => $labels{'symlink'}, -anchor => 'w')->grid(-row => $row, -column => 1, -sticky => 'w');
- $symlinktext = $fr->Label(-anchor => 'w')->grid(-row => $row, -column => 2, -padx => "2m");
$fr->Button(-text => $text{'change'}, -command => sub { menu_select_symlink(); })->grid(-row => $row, -column => 3, -sticky => "ew", -padx => "2m");
+ } else {
+ $fr->Button(-text => $text{'toggle'}, -command => sub { toggle_and_set_opt_variable(\$vars{'option_desktop_integration'}, \$deskintyesno); })->grid(-row => $row, -column => 3, -sticky => "ew", -padx => "2m");
}
# install/cancel buttons
@@ -596,7 +595,7 @@ sub menu_select_lang_collections {
sub menu_select_symlink {
our ($lbin,$lman,$linfo);
- our $osym = $vars{'option_symlinks'};
+ our $osym = $vars{'option_desktop_integration'};
our ($binlab,$binb,$manlab,$manb,$infolab,$infob);
sub set_unset_buttons {
$lbin = ($osym ? $vars{'sys_bin'} : '');
@@ -630,8 +629,8 @@ sub menu_select_symlink {
$vars{'sys_info'} = $linfo;
$vars{'sys_man'} = $lman;
}
- $vars{'option_symlinks'} = $osym;
- menu_update_texts();
+ $vars{'option_desktop_integration'} = $osym;
+ toggle_and_set_opt_variable(\$vars{'option_desktop_integration'}, \$deskintyesno);
}
my $sw = $mainwindow->Toplevel(-title => $labels{'symlink'});
$sw->transient($mainwindow);
@@ -695,10 +694,6 @@ sub menu_set_text {
$w->configure(-text => $t, @_);
}
-sub menu_set_symlink_text {
- menu_set_text($symlinktext, (($vars{'option_symlinks'})?$text{'yes'}:$text{'no'}));
-}
-
sub menu_set_schemebutton_text {
menu_set_text($schemebutton, "$vars{'selected_scheme'}");
}
@@ -762,7 +757,6 @@ sub menu_update_texts {
$optfmtstate = ($vars{'option_fmt'} ? $text{'yes'} : $text{'no'});
$optsrcstate = ($vars{'option_src'} ? $text{'yes'} : $text{'no'});
$optdocstate = ($vars{'option_doc'} ? $text{'yes'} : $text{'no'});
- if (unix()) { menu_set_symlink_text; };
}
sub callback_select_scheme {
diff --git a/Master/tlpkg/installer/install-menu-text.pl b/Master/tlpkg/installer/install-menu-text.pl
index 87c99474789..f87a0924fb1 100755
--- a/Master/tlpkg/installer/install-menu-text.pl
+++ b/Master/tlpkg/installer/install-menu-text.pl
@@ -2,7 +2,8 @@
# $Id$
# install-menu-txt.pl
#
-# Copyright 2007, 2008 Reinhard Kotucha, Norbert Preining
+# Copyright 2007, 2008 Reinhard Kotucha
+# Copyright 2007, 2008, 2009 Norbert Preining
# This file is licensed under the GNU General Public License version 2
# or any later version.
#
@@ -12,6 +13,7 @@ use vars qw(@::end_install_hook $::opt_no_cls);
our %vars;
our $tlpdb;
+our $previoustlpdb;
our @collections_std;
our @collections_lang;
our @collections_lang_doc;
@@ -109,6 +111,25 @@ sub prompt {
# The menu loop. A menu is a function. Its return value is a
# reference to another menu or to itself.
sub run_menu_text {
+ my (@args) = @_;
+ # the text mode installer does not take interest in any argument
+ # but the -old-installation-found
+ while (@args) {
+ my $f = shift @args;
+ if ($f eq "-old-installation-found") {
+ print "\nAn old installation of TeX Live has been found in ",
+ $previoustlpdb->root, "\n";
+ print "
+If you want the selection of collections and various options being taken
+over press `y', otherwise anything else.
+
+Import settings from previous TeX Live installation: (y/n): ";
+ chomp(my $yn = <STDIN>);
+ if ($yn =~ m/^y$/i) {
+ import_settings_from_old_tlpdb();
+ }
+ }
+ }
my $menu=\&main_menu;
while ($RETURN == $MENU_CONTINUE) {
$menu=$menu->();
@@ -197,37 +218,28 @@ sub scheme_menu {
menu_head 'Select a scheme:';
- foreach my $pkg ($tlpdb->list_packages) {
- my $tlpobj = $tlpdb->{'tlps'}{$pkg};
- if ($tlpobj->category eq "Scheme") {
- push @schemes, $pkg;
- $vars{"$pkg"}=($vars{'selected_scheme'} eq $pkg)? 1:0;
- }
+ foreach my $pkg ($tlpdb->schemes) {
+ push @schemes, $pkg;
+ $vars{"$pkg"}=($vars{'selected_scheme'} eq $pkg)? 1:0;
}
@schemes=sort @schemes;
+ push @schemes, "scheme-custom";
foreach my $scheme (@schemes) {
$keyval{$keys[$index]}="$scheme";
- my $tlpobj = $tlpdb->get_package("$scheme");
- printf " %s %s %s\n", $keys[$index], button($vars{"$scheme"}),
- $tlpobj->shortdesc;
+ if ($scheme ne "scheme-custom") {
+ my $tlpobj = $tlpdb->get_package("$scheme");
+ printf " %s %s %s\n", $keys[$index], button($vars{"$scheme"}),
+ $tlpobj->shortdesc;
+ } else {
+ printf " %s %s custom selection of collections\n",
+ $keys[$index], button($vars{'selected_scheme'} eq "scheme-custom");
+ }
++$index;
}
- foreach my $entry (keys %vars) {
- if ($entry=~/^(collection-.*)/) {
- $vars{"$1"}=0;
- }
- }
+ select_scheme($vars{'selected_scheme'});
- my $scheme_tlpobj = $tlpdb->get_package($vars{'selected_scheme'});
- if (defined ($scheme_tlpobj)) {
- foreach my $dependent ($scheme_tlpobj->depends) {
- if ($dependent=~/^(collection-.*)/) {
- $vars{"$1"}=1;
- }
- }
- }
if ($vars{"binary_win32"}) {
$vars{"collection-wintools"} = 1;
} else {
@@ -239,6 +251,7 @@ sub scheme_menu {
if (defined $keyval{"$answer"}) {
$vars{'selected_scheme'}=$keyval{"$answer"};
+ select_scheme($vars{'selected_scheme'});
return $command{'self'}->();
}
if (defined $command{"\u$answer"}) {
@@ -368,13 +381,13 @@ sub language_menu {
my $tlpobj = $tlpdb->get_package("$language");
$keyval{$lang_keys[$index]}="$language";
printf " %s %s %-33s", $lang_keys[$index], button($vars{"$language"}),
- substr($tlpobj->shortdesc,0,33);
+ substr($tlpobj->shortdesc,0,33);
if (defined $languages[$index+$lines]) {
my $language=$languages[$index+$lines];
my $tlpobj = $tlpdb->get_package("$language");
$keyval{$lang_keys[$index+$lines]}="$language";
printf " %s %s %-32s\n", $lang_keys[$index+$lines],
- button($vars{"$language"}), substr($tlpobj->shortdesc,0,32);
+ button($vars{"$language"}), substr($tlpobj->shortdesc,0,32);
} else {
print "\n";
}
@@ -389,13 +402,13 @@ sub language_menu {
my $tlpobj = $tlpdb->get_package("$lang_doc");
$keyval{$lang_doc_keys[$index]}="$lang_doc";
printf " %s %s %-33s", $lang_doc_keys[$index], button($vars{"$lang_doc"}),
- substr($tlpobj->shortdesc,0,33);
+ substr($tlpobj->shortdesc,0,33);
if (defined $lang_docs[$index+$lines]) {
my $lang_doc=$lang_docs[$index+$lines];
my $tlpobj = $tlpdb->get_package("$lang_doc");
$keyval{$lang_doc_keys[$index+$lines]}="$lang_doc";
printf " %s %s %-32s\n", $lang_doc_keys[$index+$lines],
- button($vars{"$lang_doc"}), substr($tlpobj->shortdesc,0,32);
+ button($vars{"$lang_doc"}), substr($tlpobj->shortdesc,0,32);
} else {
print "\n";
}
@@ -675,19 +688,22 @@ sub help_menu {
sub options_menu {
- my $b_symlinks=button($vars{'option_symlinks'});
+ my $b_path=button($vars{'option_path'});
my $b_doc=button($vars{'option_doc'});
my $b_src=button($vars{'option_src'});
my $b_fmt=button($vars{'option_fmt'});
my $b_letter=button($vars{'option_letter'});
+ my $b_deskint=button($vars{'option_desktop_integration'});
+ my $b_fileassocs=button($vars{'option_file_assocs'});
+ my $b_admin=button($vars{'option_w32_multi_user'});
my $sys_bin=$vars{'sys_bin'};
my $sys_man=$vars{'sys_man'};
my $sys_info=$vars{'sys_info'};
- my $t_sys_bin=($vars{'option_symlinks'})? $vars{'sys_bin'}:'';
- my $t_sys_man=($vars{'option_symlinks'})? $vars{'sys_man'}:'';
- my $t_sys_info=($vars{'option_symlinks'})? $vars{'sys_info'}:'';
+ my $t_sys_bin=($vars{'option_path'})? $vars{'sys_bin'}:'';
+ my $t_sys_man=($vars{'option_path'})? $vars{'sys_man'}:'';
+ my $t_sys_info=($vars{'option_path'})? $vars{'sys_info'}:'';
my %command=(
'self' => \&options_menu,
@@ -700,7 +716,7 @@ sub options_menu {
print <<"EOF";
<P> use letter size instead of A4 by default: $b_letter
- <F> create all format files: $b_fmt
+ <F> create format files: $b_fmt
EOF
;
if ($vars{'doc_splitting_supported'} and !$vars{'from_dvd'}) {
@@ -709,14 +725,29 @@ EOF
if ($vars{'src_splitting_supported'} and !$vars{'from_dvd'}) {
print " <S> install font/macro source tree: $b_src\n";
}
- if (unix() && !$vars{'from_dvd'}) {
- print <<"EOF";
- <L> create symlinks in standard directories: $b_symlinks
+ if (!$vars{'from_dvd'}) {
+ if (unix()) {
+ print <<"EOF";
+ <L> create symlinks in standard directories: $b_path
binaries to: $t_sys_bin
manpages to: $t_sys_man
info to: $t_sys_info
EOF
;
+ } else {
+ print <<"EOF";
+ <L> adjust registry entry for path: $b_path
+EOF
+;
+ }
+ if (win32()) {
+ print " <M> install menu items, shortcuts, etc: $b_deskint\n";
+ print " <N> update file associations: $b_fileassocs\n";
+ if (admin()) {
+ # if we are admin we allow normal user installation, too
+ print " <U> make installation available to all users: $b_admin\n";
+ }
+ }
}
other_options qw(R Q diskspace);
my $answer = prompt 'Enter command';
@@ -726,8 +757,8 @@ EOF
my $home = getenv('HOME');
$home = getenv('USERPROFILE') if (win32());
$home ||= '~';
- toggle 'option_symlinks';
- if ($vars{'option_symlinks'}) {
+ toggle 'option_path';
+ if ($vars{'option_path'}) {
print "New value for binary directory [$sys_bin]: ";
chomp($answer=<STDIN>);
$vars{'sys_bin'} = "$answer" if (length $answer);
@@ -751,9 +782,28 @@ EOF
}
return $command{'self'};
}
+ } else {
+ if (("\u$answer" eq 'L') and !$vars{'from_dvd'}) {
+ my $home = getenv('HOME');
+ $home = getenv('USERPROFILE') if (win32());
+ $home ||= '~';
+ toggle 'option_path';
+ return $command{'self'};
+ }
}
+ if ("\u$answer" eq 'M') {
+ toggle 'option_desktop_integration';
+ return $command{'self'};
+
+ } elsif ("\u$answer" eq 'N') {
+ toggle 'option_file_assocs';
+ return $command{'self'};
+
+ } elsif ("\u$answer" eq 'U') {
+ toggle 'option_w32_multi_user';
+ return $command{'self'};
- if ("\u$answer" eq 'P') {
+ } elsif ("\u$answer" eq 'P') {
toggle 'option_letter';
return $command{'self'};
@@ -802,11 +852,14 @@ sub dvd_hd_toggle {
sub main_menu {
my $this_platform=platform_desc($vars{'this_platform'});
- my $b_symlinks=button($vars{'option_symlinks'});
+ my $b_path=button($vars{'option_path'});
my $b_doc=button($vars{'option_doc'});
my $b_src=button($vars{'option_src'});
my $b_fmt=button($vars{'option_fmt'});
my $b_letter=button($vars{'option_letter'});
+ my $b_deskint=button($vars{'option_desktop_integration'});
+ my $b_fileassocs=button($vars{'option_file_assocs'});
+ my $b_admin=button($vars{'option_w32_multi_user'});
my $warn_nobin;
@@ -913,8 +966,15 @@ EOF
if ($vars{'src_splitting_supported'}) {
print " $b_src install macro/font source tree\n";
}
- if (unix()) {
- print " $b_symlinks create symlinks in standard directories\n";
+ if (win32()) {
+ print " $b_path adjust search path\n";
+ print " $b_deskint add menu items, shortcuts, etc.\n";
+ print " $b_fileassocs update file associations\n";
+ if (admin()) {
+ print " $b_admin make installation available to all users\n";
+ }
+ } else {
+ print " $b_path create symlinks to standard directories\n";
}
}
diff --git a/Master/tlpkg/installer/install-translations.pl b/Master/tlpkg/installer/install-translations.pl
index 19a19fecf13..d05f78cce73 100644
--- a/Master/tlpkg/installer/install-translations.pl
+++ b/Master/tlpkg/installer/install-translations.pl
@@ -52,12 +52,12 @@ if (defined($::opt_lang)) {
}
-our %text = (title => 'TeX Live 2008 Installation',
+our %text = (title => 'TeX Live 2009 Installation',
basicinfo => 'Basic Information',
custom => 'Further Customization',
dirsetup => "Directory setup",
options => 'Options',
- sysint => 'System Integration',
+ desktop_integration => 'Desktop Integration',
change => 'Change',
toggle => 'Toggle',
install => 'Install TeX Live',
@@ -93,7 +93,7 @@ our %text = (title => 'TeX Live 2008 Installation',
welcome => 'Welcome to TeX Live!',
next => 'Next >',
prev => '< Back',
- wizhello => "Welcome to the installation of TeX Live 2008\n"
+ wizhello => "Welcome to the installation of TeX Live 2009\n"
. "http://tug.org/texlive\n\n"
. "This wizard will guide you through the installation.\n\n"
. "For an advanced, customizable installation, please consult\n"
@@ -101,7 +101,7 @@ our %text = (title => 'TeX Live 2008 Installation',
destfolder => 'Destination folder:',
advcustom => 'Advanced customization',
pathinfo => "The destination folder will contain the installation.\nIt is strongly recommended to keep the year as the last component.",
- readyinst => "We are ready to install TeX Live 2008.\nThe following settings will be used.\nIf you want to change something please go back,\notherwise press the \"Install\" button.",
+ readyinst => "We are ready to install TeX Live 2009.\nThe following settings will be used.\nIf you want to change something please go back,\notherwise press the \"Install\" button.",
instshort => 'Install',
wizard => 'Go to Wizard',
);
@@ -121,6 +121,7 @@ our %labels = (binsys => 'Binary System(s)',
optdoc => 'Install font/macro doc tree',
optsrc => 'Install font/macro source tree',
symlink => 'Create symlinks in system directories',
+ desktop_integration => 'Desktop Integration',
);
if (($::lang ne "en") && ($::lang ne "C")) {
diff --git a/Master/tlpkg/installer/lang/perltk-cs b/Master/tlpkg/installer/lang/perltk-cs
index 60d0273fe72..7057eeadaba 100644
--- a/Master/tlpkg/installer/lang/perltk-cs
+++ b/Master/tlpkg/installer/lang/perltk-cs
@@ -14,7 +14,7 @@ text.basicinfo: Základní informace
text.custom: Další úpravy
text.dirsetup: Nastavení adresářové struktury
text.options: Volby
-text.sysint: Systémová integrace
+text.desktop_integration: Systémová integrace
text.change: Změnit
text.toggle: Přepnout
text.install: Instalovat TeX Live
diff --git a/Master/tlpkg/installer/lang/perltk-de b/Master/tlpkg/installer/lang/perltk-de
index 90f36040dad..43767c40003 100644
--- a/Master/tlpkg/installer/lang/perltk-de
+++ b/Master/tlpkg/installer/lang/perltk-de
@@ -7,7 +7,7 @@ text.custom: Weitere Einstellungen
text.basicinfo: Grundlegende Informationen
text.dirsetup: Setup der Ordner
text.options: Optionen
-text.sysint: Systemintegration
+text.desktop_integration: Systemintegration
text.change: Ändern
text.toggle: Ändern
text.install: TeX Live installieren
diff --git a/Master/tlpkg/installer/lang/perltk-en.sample b/Master/tlpkg/installer/lang/perltk-en.sample
index 857edfef7a8..eb846ae006d 100644
--- a/Master/tlpkg/installer/lang/perltk-en.sample
+++ b/Master/tlpkg/installer/lang/perltk-en.sample
@@ -46,7 +46,7 @@ text.selectscheme: Select a scheme
text.selectstdcol: Select the collections to be installed
text.selectsys: Select arch-os
text.status: Status output
-text.sysint: System Integration
+text.desktop_integration: Desktop Integration
text.title: TeX Live 2008 Installation
text.toggle: Toggle
text.welcome: Welcome to TeX Live!
diff --git a/Master/tlpkg/installer/lang/perltk-fr b/Master/tlpkg/installer/lang/perltk-fr
index 7f7fbe1d668..df7a20c275a 100644
--- a/Master/tlpkg/installer/lang/perltk-fr
+++ b/Master/tlpkg/installer/lang/perltk-fr
@@ -8,7 +8,7 @@ text.basicinfo: Informations générales
text.custom: Personnalisation avancée
text.dirsetup: Choix des répertoires
text.options: Options
-text.sysint: Intégration du système
+text.desktop_integration: Intégration du système
text.change: Changer
text.toggle: (Dé)sélectionner
text.install: Installer TeX Live
diff --git a/Master/tlpkg/installer/lang/perltk-it b/Master/tlpkg/installer/lang/perltk-it
index 16c7791137f..fc7123c8ba2 100644
--- a/Master/tlpkg/installer/lang/perltk-it
+++ b/Master/tlpkg/installer/lang/perltk-it
@@ -22,7 +22,7 @@ text.basicinfo: Informazioni di Base
text.custom: Ulteriore Personalizzazione
text.dirsetup: Configurazione delle directory
text.options: Opzioni
-text.sysint: Integrazione con il Sistema
+text.desktop_integration: Integrazione con il Sistema
text.change: Cambia
text.toggle: Inverti
text.install: Installa TeX Live
diff --git a/Master/tlpkg/installer/lang/perltk-nl b/Master/tlpkg/installer/lang/perltk-nl
index 03c0284fae3..210ef439286 100644
--- a/Master/tlpkg/installer/lang/perltk-nl
+++ b/Master/tlpkg/installer/lang/perltk-nl
@@ -7,7 +7,7 @@ text.basicinfo: Basisinformatie
text.custom: Verfijning
text.dirsetup: Folders
text.options: Opties
-text.sysint: Systeem-integratie
+text.desktop_integration: Systeem-integratie
text.change: Wijzig
text.toggle: Wijzig
text.install: Installeer TeX Live
diff --git a/Master/tlpkg/installer/lang/perltk-pl b/Master/tlpkg/installer/lang/perltk-pl
index 5b913aec03a..0650d97cc7a 100644
--- a/Master/tlpkg/installer/lang/perltk-pl
+++ b/Master/tlpkg/installer/lang/perltk-pl
@@ -6,7 +6,7 @@ text.custom: Dalsze ustawienia
text.basicinfo: Informacje podstawowe
text.dirsetup: Wybór folderów
text.options: Opcje
-text.sysint: Integracja systemu
+text.desktop_integration: Integracja systemu
text.change: Zmień
text.toggle: Zmień
text.install: Zainstaluj TeX Live
diff --git a/Master/tlpkg/installer/lang/perltk-sl b/Master/tlpkg/installer/lang/perltk-sl
index bf0b0efb1d9..c63d6e6ecd0 100644
--- a/Master/tlpkg/installer/lang/perltk-sl
+++ b/Master/tlpkg/installer/lang/perltk-sl
@@ -8,7 +8,7 @@ text.basicinfo: Osnovne nastavitve
text.custom: Napredne nastavitve
text.dirsetup: Nastavitve imenikov
text.options: Ostale možnosti
-text.sysint: Integracija v sistem
+text.desktop_integration: Integracija v sistem
text.change: Spremeni
text.toggle: Vključi/Izključi
text.install: Namesti TeX Live
diff --git a/Master/tlpkg/installer/lang/perltk-vi b/Master/tlpkg/installer/lang/perltk-vi
index 982ae6d0ef2..ffa2609fa0e 100644
--- a/Master/tlpkg/installer/lang/perltk-vi
+++ b/Master/tlpkg/installer/lang/perltk-vi
@@ -17,7 +17,7 @@ text.basicinfo: Thông tin cơ bản
text.custom: Tinh chỉnh khác
text.dirsetup: Thư mục cài đặt
text.options: Tùy chọn
-text.sysint: Tích hợp hệ thống
+text.desktop_integration: Tích hợp hệ thống
text.change: Đổi
text.toggle: Toggle
text.install: Cài đặt TeX Live
diff --git a/Master/tlpkg/installer/lang/perltk-zh-cn b/Master/tlpkg/installer/lang/perltk-zh-cn
index 82e31cb29a9..3568de8289f 100644
--- a/Master/tlpkg/installer/lang/perltk-zh-cn
+++ b/Master/tlpkg/installer/lang/perltk-zh-cn
@@ -8,7 +8,7 @@ text.basicinfo: 基本信息
text.custom: 进一步定制
text.dirsetup: 目录设置
text.options: 选项
-text.sysint: 系统集成
+text.desktop_integration: 系统集成
text.change: 改变
text.toggle: 切换
text.install: 安装 TeX Live
diff --git a/Master/tlpkg/installer/lang/perltk-zh-tw b/Master/tlpkg/installer/lang/perltk-zh-tw
index ce6a1ce5415..7c1d89339a2 100644
--- a/Master/tlpkg/installer/lang/perltk-zh-tw
+++ b/Master/tlpkg/installer/lang/perltk-zh-tw
@@ -8,7 +8,7 @@ text.basicinfo: 基本資訊
text.custom: 進一步定制
text.dirsetup: 目錄設置
text.options: 選項
-text.sysint: 系統集成
+text.desktop_integration: 系統集成
text.change: 改變
text.toggle: 切換
text.install: 安裝 TeX Live
diff --git a/Master/tlpkg/installer/lzma/lzma.alpha-linux b/Master/tlpkg/installer/lzma/lzma.alpha-linux
deleted file mode 100755
index 57a33f4ff8d..00000000000
--- a/Master/tlpkg/installer/lzma/lzma.alpha-linux
+++ /dev/null
Binary files differ
diff --git a/Master/tlpkg/installer/lzma/lzma.amd64-freebsd b/Master/tlpkg/installer/lzma/lzma.amd64-freebsd
deleted file mode 100755
index bc8d0e33166..00000000000
--- a/Master/tlpkg/installer/lzma/lzma.amd64-freebsd
+++ /dev/null
Binary files differ
diff --git a/Master/tlpkg/installer/lzma/lzma.exe b/Master/tlpkg/installer/lzma/lzma.exe
deleted file mode 100644
index f3f81891bfb..00000000000
--- a/Master/tlpkg/installer/lzma/lzma.exe
+++ /dev/null
Binary files differ
diff --git a/Master/tlpkg/installer/lzma/lzma.hppa-hpux b/Master/tlpkg/installer/lzma/lzma.hppa-hpux
deleted file mode 100755
index 5b11c340f39..00000000000
--- a/Master/tlpkg/installer/lzma/lzma.hppa-hpux
+++ /dev/null
Binary files differ
diff --git a/Master/tlpkg/installer/lzma/lzma.i386-freebsd b/Master/tlpkg/installer/lzma/lzma.i386-freebsd
deleted file mode 100755
index 2757e59f4b9..00000000000
--- a/Master/tlpkg/installer/lzma/lzma.i386-freebsd
+++ /dev/null
Binary files differ
diff --git a/Master/tlpkg/installer/lzma/lzma.i386-linux b/Master/tlpkg/installer/lzma/lzma.i386-linux
deleted file mode 100755
index 8cf5efbf978..00000000000
--- a/Master/tlpkg/installer/lzma/lzma.i386-linux
+++ /dev/null
Binary files differ
diff --git a/Master/tlpkg/installer/lzma/lzma.i386-openbsd b/Master/tlpkg/installer/lzma/lzma.i386-openbsd
deleted file mode 100755
index d8361493ab5..00000000000
--- a/Master/tlpkg/installer/lzma/lzma.i386-openbsd
+++ /dev/null
Binary files differ
diff --git a/Master/tlpkg/installer/lzma/lzma.i386-solaris b/Master/tlpkg/installer/lzma/lzma.i386-solaris
deleted file mode 100755
index b80c86c30fb..00000000000
--- a/Master/tlpkg/installer/lzma/lzma.i386-solaris
+++ /dev/null
Binary files differ
diff --git a/Master/tlpkg/installer/lzma/lzma.mips-irix b/Master/tlpkg/installer/lzma/lzma.mips-irix
deleted file mode 100755
index d07fee95753..00000000000
--- a/Master/tlpkg/installer/lzma/lzma.mips-irix
+++ /dev/null
Binary files differ
diff --git a/Master/tlpkg/installer/lzma/lzma.powerpc-aix b/Master/tlpkg/installer/lzma/lzma.powerpc-aix
deleted file mode 100755
index 47e90df49c3..00000000000
--- a/Master/tlpkg/installer/lzma/lzma.powerpc-aix
+++ /dev/null
Binary files differ
diff --git a/Master/tlpkg/installer/lzma/lzma.powerpc-linux b/Master/tlpkg/installer/lzma/lzma.powerpc-linux
deleted file mode 100755
index 626764f9111..00000000000
--- a/Master/tlpkg/installer/lzma/lzma.powerpc-linux
+++ /dev/null
Binary files differ
diff --git a/Master/tlpkg/installer/lzma/lzma.sparc-linux b/Master/tlpkg/installer/lzma/lzma.sparc-linux
deleted file mode 100755
index 4d24c9f4c66..00000000000
--- a/Master/tlpkg/installer/lzma/lzma.sparc-linux
+++ /dev/null
Binary files differ
diff --git a/Master/tlpkg/installer/lzma/lzma.sparc-solaris b/Master/tlpkg/installer/lzma/lzma.sparc-solaris
deleted file mode 100755
index 78318ee771a..00000000000
--- a/Master/tlpkg/installer/lzma/lzma.sparc-solaris
+++ /dev/null
Binary files differ
diff --git a/Master/tlpkg/installer/lzma/lzma.universal-darwin b/Master/tlpkg/installer/lzma/lzma.universal-darwin
deleted file mode 100755
index 961d374d944..00000000000
--- a/Master/tlpkg/installer/lzma/lzma.universal-darwin
+++ /dev/null
Binary files differ
diff --git a/Master/tlpkg/installer/lzma/lzma.x86_64-linux b/Master/tlpkg/installer/lzma/lzma.x86_64-linux
deleted file mode 100755
index 7efec830a52..00000000000
--- a/Master/tlpkg/installer/lzma/lzma.x86_64-linux
+++ /dev/null
Binary files differ
diff --git a/Master/tlpkg/installer/lzma/lzmadec.alpha-linux b/Master/tlpkg/installer/lzma/lzmadec.alpha-linux
deleted file mode 100755
index 7d79085fa35..00000000000
--- a/Master/tlpkg/installer/lzma/lzmadec.alpha-linux
+++ /dev/null
Binary files differ
diff --git a/Master/tlpkg/installer/lzma/lzmadec.amd64-freebsd b/Master/tlpkg/installer/lzma/lzmadec.amd64-freebsd
deleted file mode 100755
index 732abc31f01..00000000000
--- a/Master/tlpkg/installer/lzma/lzmadec.amd64-freebsd
+++ /dev/null
Binary files differ
diff --git a/Master/tlpkg/installer/lzma/lzmadec.hppa-hpux b/Master/tlpkg/installer/lzma/lzmadec.hppa-hpux
deleted file mode 100755
index f36af86f445..00000000000
--- a/Master/tlpkg/installer/lzma/lzmadec.hppa-hpux
+++ /dev/null
Binary files differ
diff --git a/Master/tlpkg/installer/lzma/lzmadec.i386-freebsd b/Master/tlpkg/installer/lzma/lzmadec.i386-freebsd
deleted file mode 100755
index 31557983e54..00000000000
--- a/Master/tlpkg/installer/lzma/lzmadec.i386-freebsd
+++ /dev/null
Binary files differ
diff --git a/Master/tlpkg/installer/lzma/lzmadec.i386-linux b/Master/tlpkg/installer/lzma/lzmadec.i386-linux
deleted file mode 100755
index 236c96924f9..00000000000
--- a/Master/tlpkg/installer/lzma/lzmadec.i386-linux
+++ /dev/null
Binary files differ
diff --git a/Master/tlpkg/installer/lzma/lzmadec.i386-openbsd b/Master/tlpkg/installer/lzma/lzmadec.i386-openbsd
deleted file mode 100755
index 8feb3679853..00000000000
--- a/Master/tlpkg/installer/lzma/lzmadec.i386-openbsd
+++ /dev/null
Binary files differ
diff --git a/Master/tlpkg/installer/lzma/lzmadec.i386-solaris b/Master/tlpkg/installer/lzma/lzmadec.i386-solaris
deleted file mode 100755
index 42eac5e4554..00000000000
--- a/Master/tlpkg/installer/lzma/lzmadec.i386-solaris
+++ /dev/null
Binary files differ
diff --git a/Master/tlpkg/installer/lzma/lzmadec.mips-irix b/Master/tlpkg/installer/lzma/lzmadec.mips-irix
deleted file mode 100755
index 7493774f81f..00000000000
--- a/Master/tlpkg/installer/lzma/lzmadec.mips-irix
+++ /dev/null
Binary files differ
diff --git a/Master/tlpkg/installer/lzma/lzmadec.powerpc-aix b/Master/tlpkg/installer/lzma/lzmadec.powerpc-aix
deleted file mode 100755
index 7204970d7f9..00000000000
--- a/Master/tlpkg/installer/lzma/lzmadec.powerpc-aix
+++ /dev/null
Binary files differ
diff --git a/Master/tlpkg/installer/lzma/lzmadec.powerpc-linux b/Master/tlpkg/installer/lzma/lzmadec.powerpc-linux
deleted file mode 100755
index 6e822ffb943..00000000000
--- a/Master/tlpkg/installer/lzma/lzmadec.powerpc-linux
+++ /dev/null
Binary files differ
diff --git a/Master/tlpkg/installer/lzma/lzmadec.sparc-linux b/Master/tlpkg/installer/lzma/lzmadec.sparc-linux
deleted file mode 100755
index 2d9658009f3..00000000000
--- a/Master/tlpkg/installer/lzma/lzmadec.sparc-linux
+++ /dev/null
Binary files differ
diff --git a/Master/tlpkg/installer/lzma/lzmadec.sparc-solaris b/Master/tlpkg/installer/lzma/lzmadec.sparc-solaris
deleted file mode 100755
index c276f77052d..00000000000
--- a/Master/tlpkg/installer/lzma/lzmadec.sparc-solaris
+++ /dev/null
Binary files differ
diff --git a/Master/tlpkg/installer/lzma/lzmadec.universal-darwin b/Master/tlpkg/installer/lzma/lzmadec.universal-darwin
deleted file mode 100755
index 897487cb4e0..00000000000
--- a/Master/tlpkg/installer/lzma/lzmadec.universal-darwin
+++ /dev/null
Binary files differ
diff --git a/Master/tlpkg/installer/lzma/lzmadec.win32.exe b/Master/tlpkg/installer/lzma/lzmadec.win32.exe
deleted file mode 100755
index f91c8eb26b5..00000000000
--- a/Master/tlpkg/installer/lzma/lzmadec.win32.exe
+++ /dev/null
Binary files differ
diff --git a/Master/tlpkg/installer/lzma/lzmadec.x86_64-linux b/Master/tlpkg/installer/lzma/lzmadec.x86_64-linux
deleted file mode 100755
index 884723f350c..00000000000
--- a/Master/tlpkg/installer/lzma/lzmadec.x86_64-linux
+++ /dev/null
Binary files differ
diff --git a/Master/tlpkg/installer/xz/xz.exe b/Master/tlpkg/installer/xz/xz.exe
new file mode 100755
index 00000000000..c4cb32e94e7
--- /dev/null
+++ b/Master/tlpkg/installer/xz/xz.exe
Binary files differ
diff --git a/Master/tlpkg/installer/xz/xz.i386-cygwin.exe b/Master/tlpkg/installer/xz/xz.i386-cygwin.exe
new file mode 100755
index 00000000000..09d47d21d52
--- /dev/null
+++ b/Master/tlpkg/installer/xz/xz.i386-cygwin.exe
Binary files differ
diff --git a/Master/tlpkg/installer/xz/xz.i386-linux b/Master/tlpkg/installer/xz/xz.i386-linux
new file mode 100755
index 00000000000..58029b1bb2e
--- /dev/null
+++ b/Master/tlpkg/installer/xz/xz.i386-linux
Binary files differ
diff --git a/Master/tlpkg/installer/xz/xz.universal-darwin b/Master/tlpkg/installer/xz/xz.universal-darwin
new file mode 100755
index 00000000000..82ed1b4cb96
--- /dev/null
+++ b/Master/tlpkg/installer/xz/xz.universal-darwin
Binary files differ
diff --git a/Master/tlpkg/installer/xz/xz.x86_64-linux b/Master/tlpkg/installer/xz/xz.x86_64-linux
new file mode 100755
index 00000000000..6ca200803ff
--- /dev/null
+++ b/Master/tlpkg/installer/xz/xz.x86_64-linux
Binary files differ
diff --git a/Master/tlpkg/installer/xz/xzdec.exe b/Master/tlpkg/installer/xz/xzdec.exe
new file mode 100755
index 00000000000..5023b5b9780
--- /dev/null
+++ b/Master/tlpkg/installer/xz/xzdec.exe
Binary files differ
diff --git a/Master/tlpkg/installer/xz/xzdec.i386-cygwin.exe b/Master/tlpkg/installer/xz/xzdec.i386-cygwin.exe
new file mode 100755
index 00000000000..590d93cc0f2
--- /dev/null
+++ b/Master/tlpkg/installer/xz/xzdec.i386-cygwin.exe
Binary files differ
diff --git a/Master/tlpkg/installer/xz/xzdec.i386-linux b/Master/tlpkg/installer/xz/xzdec.i386-linux
new file mode 100755
index 00000000000..52f1f5bd0f5
--- /dev/null
+++ b/Master/tlpkg/installer/xz/xzdec.i386-linux
Binary files differ
diff --git a/Master/tlpkg/installer/xz/xzdec.universal-darwin b/Master/tlpkg/installer/xz/xzdec.universal-darwin
new file mode 100755
index 00000000000..c1795bd7bcf
--- /dev/null
+++ b/Master/tlpkg/installer/xz/xzdec.universal-darwin
Binary files differ
diff --git a/Master/tlpkg/installer/xz/xzdec.x86_64-linux b/Master/tlpkg/installer/xz/xzdec.x86_64-linux
new file mode 100755
index 00000000000..2f0138d8acf
--- /dev/null
+++ b/Master/tlpkg/installer/xz/xzdec.x86_64-linux
Binary files differ
diff --git a/Master/tlpkg/tlpsrc/00texlive.config.tlpsrc b/Master/tlpkg/tlpsrc/00texlive.config.tlpsrc
index 20a37ed8c33..b32c0ade986 100644
--- a/Master/tlpkg/tlpsrc/00texlive.config.tlpsrc
+++ b/Master/tlpkg/tlpsrc/00texlive.config.tlpsrc
@@ -2,15 +2,15 @@ name 00texlive.config
category TLCore
longdesc This package contains configuration options for the TeX Live archive
longdesc If container_split_{doc,src}_files occurs in the depend lines the
-longdesc {doc,src} files are split into separate containers (.tar.lzma)
+longdesc {doc,src} files are split into separate containers (.tar.xz)
longdesc during container build time. Note that this has NO effect on the
longdesc appearance within the texlive.tlpdb. It is only on container level.
longdesc The container_format/XXXXX specifies the format, currently allowed
-longdesc is only "lzma", which generates .tar.lzma files. zip can be supported.
+longdesc is only "xz", which generates .tar.xz files. zip can be supported.
longdesc release/NNNN specifies the release number as used in the installer.
longdesc For information on the 00texlive prefix see
-longdesc 00texlive-installation.config(.tlpsrc)
+longdesc 00texlive.installation(.tlpsrc)
depend container_split_src_files
depend container_split_doc_files
-depend container_format/lzma
-depend release/2008
+depend container_format/xz
+depend release/2009
diff --git a/Master/tlpkg/tlpsrc/00texlive.core.tlpsrc b/Master/tlpkg/tlpsrc/00texlive.core.tlpsrc
index 2226629fbae..ce76a27207f 100644
--- a/Master/tlpkg/tlpsrc/00texlive.core.tlpsrc
+++ b/Master/tlpkg/tlpsrc/00texlive.core.tlpsrc
@@ -6,7 +6,7 @@ longdesc check happy. The files here are not copied by the installer
longdesc and containers are not built; they exist only in the
longdesc full DVD image.
longdesc For information on the 00texlive prefix see
-longdesc 00texlive-installation.config(.tlpsrc)
+longdesc 00texlive.installation(.tlpsrc)
runpattern d tlpkg/archive
runpattern d tlpkg/doc
runpattern d tlpkg/libexec
diff --git a/Master/tlpkg/tlpsrc/00texlive-installation.config.tlpsrc b/Master/tlpkg/tlpsrc/00texlive.installation.tlpsrc
index f7d5e0d7844..1a779a38da7 100644
--- a/Master/tlpkg/tlpsrc/00texlive-installation.config.tlpsrc
+++ b/Master/tlpkg/tlpsrc/00texlive.installation.tlpsrc
@@ -1,4 +1,4 @@
-name 00texlive-installation.config
+name 00texlive.installation
category TLCore
longdesc This package serves two purposes:
longdesc
@@ -22,7 +22,11 @@ depend platform:
depend location:__MASTER__
depend opt_paper:a4
depend opt_create_formats:1
-depend opt_create_symlinks:0
+depend opt_desktop_integration:0
+depend opt_file_assocs:0
+depend opt_post_code:1
+depend opt_w32_multi_user:1
+depend opt_path:0
depend opt_sys_bin:/usr/local/bin
depend opt_sys_info:/usr/local/info
depend opt_sys_man:/usr/local/man
diff --git a/Master/tlpkg/tlpsrc/00texlive.installer.tlpsrc b/Master/tlpkg/tlpsrc/00texlive.installer.tlpsrc
index db0a4f61bd9..d64b3c4bec4 100644
--- a/Master/tlpkg/tlpsrc/00texlive.installer.tlpsrc
+++ b/Master/tlpkg/tlpsrc/00texlive.installer.tlpsrc
@@ -7,7 +7,7 @@ longdesc are not allowed, but in this case, 00texlive.installer is never
longdesc used *except* to build the installer archives, so it's ok.
longdesc
longdesc For information on the 00texlive prefix see
-longdesc 00texlive-installation.config(.tlpsrc)
+longdesc 00texlive.installation(.tlpsrc)
category TLCore
runpattern f install-tl
runpattern f tlpkg/installer/install-tl.html
@@ -16,8 +16,8 @@ runpattern f tlpkg/installer/config.guess
#runpattern d tlpkg/TeXLive
runpattern d tlpkg/installer
#
-# but no lzma binaries
-runpattern !d tlpkg/installer/lzma
+# but no xz binaries
+runpattern !d tlpkg/installer/xz
runpattern !d tlpkg/installer/wget
#
# and no perl lib
@@ -28,15 +28,15 @@ runpattern !f tlpkg/installer/*.exe
runpattern !f tlpkg/installer/*.dll
#
# binpatterns
-binpattern d/win32 tlpkg/installer/perllib
-binpattern f/win32 tlpkg/installer/*.exe
-binpattern f/win32 tlpkg/installer/*.dll
+binpattern d/win32 tlpkg/tlperl
+binpattern f/win32 tlpkg/installer/tar.exe
binpattern f/win32 install-tl.bat
# shouldn't be in the installer packages
# binpattern f/win32 tl-portable.bat
binpattern f/win32 install-tl.bat.manifest
-binpattern f/!win32 tlpkg/installer/lzma/lzmadec.${ARCH}
+binpattern f/i386-cygwin tlpkg/installer/xz/xzdec.i386-cygwin.exe
+binpattern f/!win32,i386-cygwin tlpkg/installer/xz/xzdec.${ARCH}
binpattern f/!win32,i386-solaris,i386-linux,mips-irix,sparc-linux,alpha-linux,powerpc-linux,i386-freebsd,x86_64-linux tlpkg/installer/wget/wget.${ARCH}
binpattern f/win32 tlpkg/installer/wget/wget.exe
# why the above does not catch that one I don't know ... so add it
-binpattern f/win32 tlpkg/installer/lzma/lzmadec.win32.exe
+binpattern f/win32 tlpkg/installer/xz/xzdec.exe