summaryrefslogtreecommitdiff
path: root/Master/texmf
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/texmf
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/texmf')
-rwxr-xr-xMaster/texmf/scripts/texlive/tlmgr.pl196
-rw-r--r--Master/texmf/scripts/texlive/tlmgrgui/do_listframe.pl3
-rw-r--r--Master/texmf/scripts/texlive/tlmgrgui/gui-arch.pl3
-rw-r--r--Master/texmf/scripts/texlive/tlmgrgui/gui-config.pl27
-rw-r--r--Master/texmf/scripts/texlive/tlmgrgui/gui-uninstall.pl3
-rwxr-xr-xMaster/texmf/scripts/texlive/tlmgrgui/tlmgrgui.pl57
-rw-r--r--Master/texmf/scripts/texlive/uninstall-win32.pl17
7 files changed, 117 insertions, 189 deletions
diff --git a/Master/texmf/scripts/texlive/tlmgr.pl b/Master/texmf/scripts/texlive/tlmgr.pl
index 9afccb86c7c..fab861a322a 100755
--- a/Master/texmf/scripts/texlive/tlmgr.pl
+++ b/Master/texmf/scripts/texlive/tlmgr.pl
@@ -36,13 +36,13 @@ BEGIN {
# make subprograms (including kpsewhich) have the right path:
$mydir = $0;
$mydir =~ s,/[^/]*$,,;
- if (!$^O=~/^MSWin(32|64)$/i) {
- $ENV{"PATH"} = "$mydir:$ENV{PATH}";
+ my $kpsewhichname;
+ if (!$^O =~ /^MSWin/i) {
+ $ENV{"PATH"} = "$mydir;$ENV{PATH}";
$kpsewhichname = "kpsewhich.exe";
} else {
$kpsewhichname = "kpsewhich";
}
- #
if (! -r "$mydir/$kpsewhichname") {
# no kpsewhich in the same directory, so we are in a bootstrapping
# mode, use for Master $mydir/../..
@@ -66,7 +66,6 @@ use TeXLive::TLConfig;
use TeXLive::TLMedia;
use TeXLive::TLPDB;
use TeXLive::TLPOBJ;
-use TeXLive::TLPostActions;
use TeXLive::TLUtils;
use TeXLive::TLWinGoo;
TeXLive::TLUtils->import(qw(member info give_ctan_mirror win32 dirname
@@ -80,6 +79,7 @@ binmode(STDERR, ":utf8");
our $tlmediasrc; # media from which we install/update
our $tlmediatlpdb;
our $location; # location from which the new packages come
+our $localtlmedia; # local installation which we are munging
our $localtlpdb; # local installation which we are munging
my %options; # TL options from local tlpdb
@@ -408,6 +408,21 @@ sub execute_action {
+
+sub do_cmd_and_check {
+ my $cmd = shift;
+ info("running $cmd ... ");
+ my ($out, $ret) = TeXLive::TLUtils::run_cmd("$cmd 2>&1");
+ if ($ret == 0) {
+ info("done\n");
+ log("Output of $cmd:\n$out\n");
+ } else {
+ info("\n");
+ tlwarn("$cmd failed (status $ret), output:\n$out\n");
+ }
+ return $ret;
+}
+
# run external programs (mktexlsr, updmap-sys, etc.) as specified by the
# keys in the RET hash. We return the number of unsuccessful runs, zero
# if all ok.
@@ -420,8 +435,7 @@ sub handle_ret_hash {
my $errors = 0;
if (exists $ret{'mktexlsr'}) {
- info("running mktexlsr\n");
- $errors += system("mktexlsr");
+ $errors += do_cmd_and_check("mktexlsr");
}
if (exists $ret{'map'}) {
@@ -431,12 +445,9 @@ sub handle_ret_hash {
# been the documented way to add fonts for many years. If we called
# create_updmap, such user maps would be lost.
foreach my $m (@{$ret{'map'}}) {
- my $cmd = "updmap-sys --nomkmap --nohash --$m";
- info("running $cmd\n");
- $errors += system($cmd);
+ $errors += do_cmd_and_check("updmap-sys --nomkmap --nohash --$m");
}
- info("running updmap-sys once more\n");
- $errors += system("updmap-sys"); # runs mktexlsr.
+ $errors += do_cmd_and_check("updmap-sys"); # runs mktexlsr.
}
chomp(my $TEXMFSYSVAR = `kpsewhich -var-value=TEXMFSYSVAR`);
@@ -454,15 +465,13 @@ sub handle_ret_hash {
"$TEXMFSYSVAR/web2c/fmtutil.cnf",
"$TEXMFLOCAL/web2c/fmtutil-local.cnf");
if ($opt_fmt && !$ret{'format-regenerate'}) {
- info("running fmtutil-sys --missing\n");
- $errors += system("fmtutil-sys", "--missing");
+ $errors += do_cmd_and_check("fmtutil-sys --missing");
}
}
#
if (exists $ret{'format-regenerate'}) {
my $a = $opt_fmt ? "--all" : "--refresh";
- info("running fmtutil-sys $a to regenerate formats\n");
- $errors += system("fmtutil-sys", $a);
+ $errors += do_cmd_and_check("fmtutil-sys $a");
}
if (exists $ret{'language'}) {
@@ -483,95 +492,12 @@ sub handle_ret_hash {
$lang = "$TEXMFSYSVAR/tex/generic/config/$lang";
}
if ($localtlpdb->option_create_formats) {
- info("running fmtutil-sys --byhyphen $lang\n");
- $errors += system("fmtutil-sys", "--byhyphen", $lang);
+ $errors += do_cmd_and_check("fmtutil-sys --byhyphen $lang");
}
}
}
- return $errors / 256; # we were accumulating wait statuses
-}
-
-
-#
-# remove_package removes a single package with all files (including the
-# tlpobj files) and the entry from the tlpdb.
-#
-sub remove_package {
- my ($pkg, $localtlpdb) = @_;
- 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";
- }
- #
- # 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) {
- 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");
- }
- }
- my @removals = &removed_dirs (@goodfiles);
- foreach my $entry (@goodfiles) {
- unlink $entry;
- }
- 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;
- # do the post removal actions
- if (defined($PostRemove{$pkg})) {
- info("running post remove action for $pkg\n");
- &{$PostRemove{$pkg}}($localtlpdb->root);
- }
- }
- return \%ret;
+ return $errors;
}
@@ -686,7 +612,8 @@ sub action_remove {
# the rest will not be run in dry_run mode
$foo{'mktexlsr'} = 1;
} else {
- merge_into(\%foo, &remove_package($pkg, $localtlpdb));
+ merge_into(\%foo,
+ $localtlmedia->remove_package($pkg));
logpackage("remove: $pkg");
}
if (keys %foo) {
@@ -709,7 +636,8 @@ sub action_remove {
info ("remove $pkg\n");
if (!$opts{"dry-run"}) {
my %foo;
- merge_into(\%foo, &remove_package($pkg, $localtlpdb));
+ merge_into(\%foo,
+ $localtlmedia->remove_package($pkg));
if (keys %foo) {
# removal was successful
logpackage("remove: $pkg");
@@ -913,8 +841,13 @@ sub action_search {
$tlpdb = $localtlpdb;
}
foreach my $pkg ($tlpdb->list_packages) {
+ my $tlp = $tlpdb->get_package($pkg);
if ($opts{"file"}) {
- my @ret = grep(m;$r;, $tlpdb->get_package($pkg)->all_files);
+ my @files = $tlp->all_files;
+ if ($tlp->relocated) {
+ for (@files) { s:^$RelocPrefix/:$RelocTree/:; }
+ }
+ my @ret = grep(m;$r;, @files);
if (@ret) {
print "$pkg:\n";
foreach (@ret) {
@@ -983,7 +916,7 @@ sub action_restore {
closedir (DIR) || warn "closedir($opts{'backupdir'}) failed: $!";
for my $dirent (@dirents) {
next if (-d $dirent);
- next if ($dirent !~ m/^(.*)\.r([0-9]+)\.tar\.lzma$/);
+ next if ($dirent !~ m/^(.*)\.r([0-9]+)\.tar\.xz$/);
$backups{$1}->{$2} = 1;
}
my ($pkg, $rev) = @ARGV;
@@ -1016,14 +949,14 @@ sub action_restore {
finish(0);
}
}
- print "Restoring $pkg, $rev from $opts{'backupdir'}/${pkg}.r${rev}.tar.lzma\n";
+ print "Restoring $pkg, $rev from $opts{'backupdir'}/${pkg}.r${rev}.tar.xz\n";
if (!$opts{"dry"}) {
init_local_db(1);
# first remove the package, then reinstall it
# this way we get rid of useless files
$opts{"backupdir"} = abs_path($opts{"backupdir"});
- merge_into(\%ret, &remove_package($pkg, $localtlpdb));
- TeXLive::TLMedia->_install_package("$opts{'backupdir'}/${pkg}.r${rev}.tar.lzma" , [] ,$localtlpdb);
+ merge_into(\%ret, $localtlmedia->remove_package($pkg));
+ TeXLive::TLMedia->_install_package("$opts{'backupdir'}/${pkg}.r${rev}.tar.xz" , [] ,$localtlpdb);
logpackage("restore: $pkg ($rev)");
# now we have to read the .tlpobj file and add it to the DB
my $tlpobj = TeXLive::TLPOBJ->new;
@@ -1132,9 +1065,9 @@ sub action_backup {
} else {
my $tlp = $localtlpdb->get_package($pkg);
info("saving current status of $pkg to $opts{'backupdir'}/${pkg}.r" .
- $tlp->revision . "tar.lzma\n");
+ $tlp->revision . "tar.xz\n");
if (!$opts{"dry-run"}) {
- $tlp->make_container("lzma", $localtlpdb->root,
+ $tlp->make_container("xz", $localtlpdb->root,
$opts{"backupdir"}, "${pkg}.r" . $tlp->revision);
}
}
@@ -1191,22 +1124,22 @@ sub write_w32_updater {
}
foreach $pkg_part (@pkg_parts) {
if ($media eq 'CD') {
- copy("$repo/$pkg_part.tar.lzma", "$temp");
+ copy("$repo/$pkg_part.tar.xz", "$temp");
} else { # net
- TeXLive::TLUtils::download_file("$repo/$pkg_part.tar.lzma", "$temp/$pkg_part.tar.lzma");
+ TeXLive::TLUtils::download_file("$repo/$pkg_part.tar.xz", "$temp/$pkg_part.tar.xz");
}
# now we should have the file present
- if (!-r "$temp/$pkg_part.tar.lzma") {
- tlwarn("Couldn't get $pkg_part.tar.lzma, that is bad\n");
+ if (!-r "$temp/$pkg_part.tar.xz") {
+ tlwarn("Couldn't get $pkg_part.tar.xz, that is bad\n");
return 1; # abort
}
- # unpack lzma archive
- $sysret = system("$::progs{'lzmadec'} < \"$temp/$pkg_part.tar.lzma\" > \"$temp/$pkg_part.tar\"");
+ # unpack xz archive
+ $sysret = system("$::progs{'xzdec'} < \"$temp/$pkg_part.tar.xz\" > \"$temp/$pkg_part.tar\"");
if ($sysret) {
- tlwarn("Couldn't unpack $pkg_part.tar.lzma\n");
+ tlwarn("Couldn't unpack $pkg_part.tar.xz\n");
return 1; # unpack failed? abort
}
- unlink("$temp/$pkg_part.tar.lzma"); # we don't need that archive anymore
+ unlink("$temp/$pkg_part.tar.xz"); # we don't need that archive anymore
push @updater_args, $pkg_part, $oldrev, $newrev;
}
}
@@ -1577,7 +1510,7 @@ sub action_update {
}
}
if (!($opts{"dry-run"} or $opts{"list"} or $opts{"no-remove"})) {
- merge_into(\%ret, &remove_package($p, $localtlpdb));
+ merge_into(\%ret, $localtlmedia->remove_package($p));
logpackage("remove: $p");
}
}
@@ -1635,10 +1568,10 @@ sub action_update {
}
if ($opts{"backup"} && !$opts{"dry-run"}) {
- $tlp->make_container("lzma", $root,
+ $tlp->make_container("xz", $root,
$opts{"backupdir"}, "${pkg}.r" . $tlp->revision);
$unwind_package =
- "$opts{'backupdir'}/${pkg}.r" . $tlp->revision . ".tar.lzma";
+ "$opts{'backupdir'}/${pkg}.r" . $tlp->revision . ".tar.xz";
if ($autobackup) {
# in case we do auto backups we remove older backups
@@ -1680,7 +1613,7 @@ sub action_update {
#
# the remove_package should also remove empty dirs in case
# a dir is changed into a file
- merge_into(\%ret, &remove_package($pkg, $localtlpdb));
+ merge_into(\%ret, $localtlmedia->remove_package($pkg));
my $foo = $tlmediasrc->install_package($pkg, $localtlpdb);
if (ref $foo) {
# installation succeeded because we got a reference
@@ -2313,7 +2246,7 @@ sub action_recreate_tlpdb {
my $tlpdb = TeXLive::TLPDB->new;
$tlpdb->root($Master);
my $inst = TeXLive::TLPOBJ->new;
- $inst->name("00texlive-installation.config");
+ $inst->name("00texlive.installation");
$inst->category("TLCore");
my @deps;
push @deps, "location:$TeXLive::TLConfig::TeXLiveURL";
@@ -2422,7 +2355,11 @@ sub check_files {
# ignore files in the installer
next if ($p eq "00texlive.installer");
my $tlp = $localtlpdb->get_package($p);
- for my $f ($tlp->all_files) {
+ my @files = $tlp->all_files;
+ if ($tlp->relocated) {
+ for (@files) { s:^$RelocPrefix/:$RelocTree/:; }
+ }
+ for my $f (@files) {
push @{$filetopacks{$f}}, $p;
}
}
@@ -2554,10 +2491,13 @@ sub init_local_db {
# if the localtlpdb is already defined do simply return here already
# to make sure that the settings in the local tlpdb do not overwrite
# stuff changed via the GUI
+ return if defined $localtlmedia;
return if defined $localtlpdb;
- $localtlpdb = TeXLive::TLPDB->new ("root" => $Master);
+ $localtlmedia = TeXLive::TLMedia->new ( $Master );
+ die("cannot setup TLMedia in $Master") unless (defined($localtlmedia));
+ $localtlpdb = $localtlmedia->tlpdb;
die("cannot find tlpdb in $Master") unless (defined($localtlpdb));
- # setup the programs, for w32 we need the shipped wget/lzma etc, so we
+ # setup the programs, for w32 we need the shipped wget/xz etc, so we
# pass the location of these files to setup_programs.
if (!setup_programs("$Master/tlpkg/installer",
$localtlpdb->option_platform)) {
@@ -2668,14 +2608,14 @@ sub clear_old_backups
my @backups;
for my $dirent (@dirents) {
next if (-d $dirent);
- next if ($dirent !~ m/^$pkg\.r([0-9]+)\.tar\.lzma$/);
+ next if ($dirent !~ m/^$pkg\.r([0-9]+)\.tar\.xz$/);
push @backups, $1;
}
my $i = 1;
for my $e (reverse sort {$a <=> $b} @backups) {
if ($i > $autobackup) {
- info ("Removing backup $backupdir/$pkg.r$e.tar.lzma\n");
- unlink("$backupdir/$pkg.r$e.tar.lzma") unless $dryrun;
+ info ("Removing backup $backupdir/$pkg.r$e.tar.xz\n");
+ unlink("$backupdir/$pkg.r$e.tar.xz") unless $dryrun;
}
$i++;
}
diff --git a/Master/texmf/scripts/texlive/tlmgrgui/do_listframe.pl b/Master/texmf/scripts/texlive/tlmgrgui/do_listframe.pl
index 3eb679d9abf..3df4a668b63 100644
--- a/Master/texmf/scripts/texlive/tlmgrgui/do_listframe.pl
+++ b/Master/texmf/scripts/texlive/tlmgrgui/do_listframe.pl
@@ -1,7 +1,8 @@
# guinb1.pl
# $Id$
#
-# Copyright 2008 Tomasz Luczak, Norbert Preining
+# Copyright 2008 Tomasz Luczak
+# Copyright 2008, 2009 Norbert Preining
#
# GUI for tlmgr
#
diff --git a/Master/texmf/scripts/texlive/tlmgrgui/gui-arch.pl b/Master/texmf/scripts/texlive/tlmgrgui/gui-arch.pl
index d475e31d62a..010c4cbf2fc 100644
--- a/Master/texmf/scripts/texlive/tlmgrgui/gui-arch.pl
+++ b/Master/texmf/scripts/texlive/tlmgrgui/gui-arch.pl
@@ -1,7 +1,8 @@
# gui-arch.pl
# $Id$
#
-# Copyright 2008 Tomasz Luczak, Norbert Preining
+# Copyright 2008 Tomasz Luczak
+# Copyright 2008, 2009 Norbert Preining
#
# GUI for tlmgr
#
diff --git a/Master/texmf/scripts/texlive/tlmgrgui/gui-config.pl b/Master/texmf/scripts/texlive/tlmgrgui/gui-config.pl
index a90e33535e2..bc910bad907 100644
--- a/Master/texmf/scripts/texlive/tlmgrgui/gui-config.pl
+++ b/Master/texmf/scripts/texlive/tlmgrgui/gui-config.pl
@@ -1,7 +1,8 @@
# gui-config2.pl
# $Id$
#
-# Copyright 2008 Tomasz Luczak, Norbert Preining
+# Copyright 2008 Tomasz Luczak
+# Copyright 2008, 2009 Norbert Preining
#
# GUI for tlmgr
#
@@ -158,11 +159,29 @@ my $back_config_act = $lower->Labelframe(-text => ___"actions");
$back_config_act->Button(-text => ___"reinitlsr",
- -command => sub { run_program_show_output("mktexlsr"); })->pack(-expand => 1, -fill => "x", -padx => "2m", -pady => "2m");
+ -command => sub {
+ $mw->Busy(-recurse => 1);
+ info("Running mktexlsr, this may take some time ...\n");
+ info(`mktexlsr 2>&1`);
+ $mw->Unbusy;
+ })->pack(-expand => 1, -fill => "x",
+ -padx => "2m", -pady => "2m");
$back_config_act->Button(-text => ___"recreateformats",
- -command => sub { run_program_show_output("fmtutil-sys --all"); })->pack(-expand => 1, -fill => "x", -padx => "2m", -pady => "2m");
+ -command => sub {
+ $mw->Busy(-recurse => 1);
+ info("Running fmtutil-sys --all, this may take some time ...\n");
+ info(`fmtutil-sys --all 2>&1`);
+ $mw->Unbusy;
+ })->pack(-expand => 1, -fill => "x",
+ -padx => "2m", -pady => "2m");
$back_config_act->Button(-text => ___"updatemaps",
- -command => sub { run_program_show_output("updmap-sys"); })->pack(-expand => 1, -fill => "x", -padx => "2m", -pady => "2m");
+ -command => sub {
+ $mw->Busy(-recurse => 1);
+ info("Running updmap-sys, this may take some time ...\n");
+ info(`updmap-sys 2>&1`);
+ $mw->Unbusy;
+ })->pack(-expand => 1, -fill => "x",
+ -padx => "2m", -pady => "2m");
$back_config_act->pack(-side => 'right', -fill => "both", -padx => "2m", -pady => "2m", -expand => 1, -ipadx => "2m", -ipady => "2m");
diff --git a/Master/texmf/scripts/texlive/tlmgrgui/gui-uninstall.pl b/Master/texmf/scripts/texlive/tlmgrgui/gui-uninstall.pl
index 76caa2d4c75..ffb7623181d 100644
--- a/Master/texmf/scripts/texlive/tlmgrgui/gui-uninstall.pl
+++ b/Master/texmf/scripts/texlive/tlmgrgui/gui-uninstall.pl
@@ -1,7 +1,8 @@
# gui-uninstall.pl
# $Id$
#
-# Copyright 2008 Tomasz Luczak, Norbert Preining
+# Copyright 2008 Tomasz Luczak
+# Copyright 2008, 2009 Norbert Preining
#
# GUI for tlmgr
#
diff --git a/Master/texmf/scripts/texlive/tlmgrgui/tlmgrgui.pl b/Master/texmf/scripts/texlive/tlmgrgui/tlmgrgui.pl
index c3990acd274..a9d9b95443a 100755
--- a/Master/texmf/scripts/texlive/tlmgrgui/tlmgrgui.pl
+++ b/Master/texmf/scripts/texlive/tlmgrgui/tlmgrgui.pl
@@ -2,7 +2,8 @@
#
# $Id$
#
-# Copyright 2008 Tomasz Luczak, Norbert Preining
+# Copyright 2008 Tomasz Luczak
+# Copyright 2008, 2009 Norbert Preining
#
# GUI for tlmgr
#
@@ -397,58 +398,6 @@ sub set_text_win {
$w->see("0.0");
}
-sub run_program_show_output {
- my $td = $mw->Toplevel(-title => ___"tlmgr process");
- $td->transient($mw);
- $td->grab();
- my $tf = $td->Scrolled("ROText", -width => 80,
- -height => 10,
- -wrap => "none",
- -scrollbars => "ose"
- )->pack(-expand => 1, -fill => "both");
- my $ok = $td->Button(-text => ___"ok", -padx => "3m", -pady => "3m",
- -command => sub { $td->destroy; });
- # start the installation, read the output
- $mw->update;
- $::sww->update;
- #
- # ok, that stupid perl for windows does not have fork, why? no idea
- # we have to deal with that
- if ($^O=~/^MSWin(32|64)$/i) {
- $tf->insert("end", ___("starting") . " @_\n\n" . ___"maytaketime");
- $mw->update;
- $::sww->update;
- my $ret = `@_`;
- $tf->insert("end", "$ret\n\n" . ___("completed") . "\n");
- $tf->see("end");
- $ok->pack;
- $mw->update;
- $::sww->update;
- } else {
- my $pid = open(KID_TO_READ, "-|");
- if ($pid) { # parent
- while (<KID_TO_READ>) {
- $tf->insert("end",$_);
- $tf->see("end");
- $mw->update;
- $::sww->update;
- }
- close(KID_TO_READ) || warn "kid exited $?";
- $tf->insert("end","\n\nCOMPLETED\n");
- $tf->see("end");
- $ok->pack;
- } else { #kid
- # do not buffer lines ...
- $| = 1;
- open STDERR, '>&STDOUT';
- print ___("starting") . " @_\n";
- exec(@_)
- || die "can't exec program: $!";
- # NOTREACHED
- }
- }
-}
-
sub install_selected_packages {
if (@_) {
my @args = qw/install/;
@@ -539,7 +488,7 @@ sub create_update_list {
$localtlpdb, @TeXLive::TLConfig::CriticalPackagesList);
if (defined($tlmediatlpdb)) {
foreach my $lp ($localtlpdb->list_packages) {
- next if ($lp =~ m/00texlive-installation.config/);
+ next if ($lp =~ m/00texlive.installation/);
my $lrev = $localtlpdb->get_package($lp)->revision;
my $up = $tlmediatlpdb->get_package($lp);
my $urev;
diff --git a/Master/texmf/scripts/texlive/uninstall-win32.pl b/Master/texmf/scripts/texlive/uninstall-win32.pl
index 8f14630f832..4c0e52bb7c9 100644
--- a/Master/texmf/scripts/texlive/uninstall-win32.pl
+++ b/Master/texmf/scripts/texlive/uninstall-win32.pl
@@ -17,6 +17,10 @@ BEGIN {
}
use TeXLive::TLWinGoo;
+use TeXLive::TLPDB;
+use TeXLive::TLPOBJ;
+use TeXLive::TLConfig;
+use TeXLive::TLUtils;
use Tk;
use Tk::Dialog;
@@ -39,6 +43,19 @@ $ok->pack(-side => 'left', -padx => "3m");
$cancel->pack(-side => 'left' , -padx => "3m");
sub doit {
+ # first we remove the whole bunch of shortcuts and menu entries
+ # by calling all the post action codes for the installed packages
+ my $localtlpdb = TeXLive::TLPDB->new ("root" => $Master);
+ if (!defined($localtlpdb)) {
+ tlwarn("Cannot load the TLPDB from $Master, are you sure there is an installation?\n");
+ } else {
+ for my $pkg ($localtlpdb->list_packages) {
+ &TeXLive::TLUtils::do_postaction("remove", $pkg);
+ }
+ }
+ my $menupath = &TeXLive::TLWinGoo::menu_path();
+ $menupath =~ s!/!\\!g;
+ `rmdir /s /q "$menupath\\$TeXLive::TLConfig::WindowsMainMenuName" 2>nul`;
remove_texbindirs_from_path();
unsetenv_reg("TEXBINDIR");
# from_dvd case: