summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xMaster/texmf/scripts/texlive/tlmgr2.pl37
1 files changed, 20 insertions, 17 deletions
diff --git a/Master/texmf/scripts/texlive/tlmgr2.pl b/Master/texmf/scripts/texlive/tlmgr2.pl
index 3c0ed2f2d9e..18553a59d7a 100755
--- a/Master/texmf/scripts/texlive/tlmgr2.pl
+++ b/Master/texmf/scripts/texlive/tlmgr2.pl
@@ -114,13 +114,13 @@ if (!defined($action) && $opt_gui) {
}
if ($opt_version || (defined $action && $action eq "version")) {
- print "tlmgr revision $tlmgrrevision\n";
- print "tlmgr using installation: $Master\n";
+ info("tlmgr revision $tlmgrrevision\n");
+ info("tlmgr using installation: $Master\n");
if (open (REL_TL, "$Master/release-texlive.txt")) {
# print first and last lines, which have the TL version info.
my @rel_tl = <REL_TL>;
- print $rel_tl[0];
- print $rel_tl[$#rel_tl];
+ info($rel_tl[0]);
+ info($rel_tl[$#rel_tl]);
close (REL_TL);
}
finish(0);
@@ -267,7 +267,7 @@ sub execute_action {
}
# close the special log file
if ($packagelogfile && $::do_finish) {
- print "tlmgr: package log updated at $packagelogfile\n" if $packagelogged;
+ info("tlmgr: package log updated at $packagelogfile\n") if $packagelogged;
close(PACKAGELOG);
}
# run external programs.
@@ -288,13 +288,13 @@ sub handle_ret_hash
my $errors = 0;
if (defined($ret{'mktexlsr'})) {
- print "running mktexlsr\n";
+ info("running mktexlsr\n");
$errors += system("mktexlsr");
}
if (defined($ret{'map'})) {
foreach my $m (@{$ret{'map'}}) {
- print "$m\n";
+ info("$m\n");
$errors += system("updmap-sys --nomkmap --nohash --$m");
}
$errors += system("mktexlsr");
@@ -305,13 +305,13 @@ sub handle_ret_hash
chomp (my $TEXMFLOCAL = `kpsewhich -var-value=TEXMFLOCAL`);
if (defined($ret{'format'})) {
- print "regenerating fmtutil.cnf\n";
+ info("regenerating fmtutil.cnf\n");
TeXLive::TLUtils::create_fmtutil($localtlpdb,
"$TEXMFSYSVAR/web2c/fmtutil.cnf",
"$TEXMFLOCAL/web2c/fmtutil-local.cnf");
# run fmtutil-sys only if the option for building formats is set.
if ($localtlpdb->option_create_formats) {
- print "running fmtutil-sys --missing\n";
+ info("running fmtutil-sys --missing\n");
$errors += system("fmtutil-sys", "--missing");
}
}
@@ -319,7 +319,7 @@ sub handle_ret_hash
if (defined($ret{'language'})) {
for my $ext ("dat", "def") {
my $lang = "language.$ext";
- print "regenerating $lang\n";
+ info("regenerating $lang\n");
my $arg1 = "$TEXMFSYSVAR/tex/generic/config/language.$ext";
my $arg2 = "$TEXMFLOCAL/tex/generic/config/language-local.dat";
@@ -333,8 +333,10 @@ sub handle_ret_hash
# Use full path for external command, except on Windows.
$lang = "$TEXMFSYSVAR/tex/generic/config/$lang";
}
- print "running fmtutil-sys --byhyphen $lang\n";
- $errors += system("fmtutil-sys", "--byhyphen", $lang);
+ if ($localtlpdb->option_create_formats) {
+ info("running fmtutil-sys --byhyphen $lang\n");
+ $errors += system("fmtutil-sys", "--byhyphen", $lang);
+ }
}
}
return $errors / 256; # we were accumulating wait statuses
@@ -527,7 +529,7 @@ sub action_remove {
my $tlp = $localtlpdb->get_package($pkg);
next if defined($already_removed{$pkg});
if (!defined($tlp)) {
- print "$pkg: package not present, cannot remove\n";
+ info("$pkg: package not present, cannot remove\n");
} else {
# in the first round we only remove collections, nothing else
# but removing collections will remove all dependencies, too
@@ -581,9 +583,9 @@ sub action_remove {
$localtlpdb->save;
my @foo = sort keys %already_removed;
if (@foo) {
- print "tlmgr: actually removed these packages: @foo\n";
+ info("tlmgr: actually removed these packages: @foo\n");
} else {
- print "tlmgr: no packages removed.\n";
+ info("tlmgr: no packages removed.\n");
}
return(\%ret);
}
@@ -1599,7 +1601,7 @@ sub action_option {
#
sub action_arch {
if ($^O=~/^MSWin(32|64)$/i) {
- printf STDERR "action `arch' not supported on Windows\n";
+ warn("action `arch' not supported on Windows\n");
}
if ($opt_gui) {
action_gui("arch");
@@ -1654,7 +1656,7 @@ sub action_arch {
# we have to install something
foreach my $a (@todoarchs) {
if ($opt_dry) {
- print "Installing $pkg.$a\n";
+ info("Installing $pkg.$a\n");
} else {
info("install: $pkg.$a\n");
merge_into(\%ret, $tlmediasrc->install_package("$pkg.$a", $localtlpdb));
@@ -1785,6 +1787,7 @@ sub init_local_db {
sub action_gui {
my ($guiscreen) = @_;
$::guiscreen = $guiscreen;
+ $::guiscreen = $guiscreen;
unshift (@INC, "$Master/texmf/scripts/texlive/tlmgrgui");
eval { require Tk; };
if ($@) {