summaryrefslogtreecommitdiff
path: root/Master/tlpkg
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2014-11-23 18:05:32 +0000
committerKarl Berry <karl@freefriends.org>2014-11-23 18:05:32 +0000
commitbf026a233643ee44ad14a8dcdc7a003f10b3af7b (patch)
tree8c78d177d07b199c764a79b0e4cd61f5477d7986 /Master/tlpkg
parent9e696bd1663d7bd2f02ab39e0e22b63459100a9f (diff)
* install-tl (run_postinst_cmd): new fn.
(do_postinst_stuff): call it; accumulate error count. * TLUtils.pm (wsystem): call system and warn if failure. * tl-update-tlnet: reimplement --no-consistency. git-svn-id: svn://tug.org/texlive/trunk@35647 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/tlpkg')
-rw-r--r--Master/tlpkg/TeXLive/TLUtils.pm53
-rwxr-xr-xMaster/tlpkg/bin/tl-update-tlnet12
2 files changed, 40 insertions, 25 deletions
diff --git a/Master/tlpkg/TeXLive/TLUtils.pm b/Master/tlpkg/TeXLive/TLUtils.pm
index 2b77add8f67..7668697c4c8 100644
--- a/Master/tlpkg/TeXLive/TLUtils.pm
+++ b/Master/tlpkg/TeXLive/TLUtils.pm
@@ -27,7 +27,7 @@ C<TeXLive::TLUtils> -- utilities used in the TeX Live infrastructure
use TeXLive::TLUtils;
-=head2 Platform Detection
+=head2 Platform detection
TeXLive::TLUtils::platform();
TeXLive::TLUtils::platform_name($canonical_host);
@@ -35,17 +35,18 @@ C<TeXLive::TLUtils> -- utilities used in the TeX Live infrastructure
TeXLive::TLUtils::win32();
TeXLive::TLUtils::unix();
-=head2 System Tools
+=head2 System tools
TeXLive::TLUtils::getenv($string);
TeXLive::TLUtils::which($string);
TeXLive::TLUtils::get_system_tmpdir();
TeXLive::TLUtils::tl_tmpdir();
TeXLive::TLUtils::xchdir($dir);
+ TeXLive::TLUtils::wsystem($msg,@args);
TeXLive::TLUtils::xsystem(@args);
TeXLive::TLUtils::run_cmd($cmd);
-=head2 File Utilities
+=head2 File utilities
TeXLive::TLUtils::dirname($path);
TeXLive::TLUtils::basename($path);
@@ -65,7 +66,7 @@ C<TeXLive::TLUtils> -- utilities used in the TeX Live infrastructure
TeXLive::TLUtils::nulldev();
TeXLive::TLUtils::get_full_line($fh);
-=head2 Installer Functions
+=head2 Installer functions
TeXLive::TLUtils::make_var_skeleton($path);
TeXLive::TLUtils::make_local_skeleton($path);
@@ -175,6 +176,7 @@ BEGIN {
&create_mirror_list
&extract_mirror_entry
&tlmd5
+ &wsystem
&xsystem
&run_cmd
&announce_execute_actions
@@ -207,8 +209,8 @@ use TeXLive::TLConfig;
$::opt_verbosity = 0; # see process_logging_options
-
-=head2 Platform Detection
+
+=head2 Platform detection
=over 4
@@ -483,7 +485,7 @@ sub get_system_tmpdir {
=item C<tl_tmpdir>
-Create a temporary directory which is cleaned up as soon as the program
+Create a temporary directory which is removed when the program
is terminated.
=cut
@@ -505,9 +507,28 @@ sub xchdir {
}
+=item C<wsystem($msg, @args)>
+
+Call C<info> about what is being done starting with C<$msg>, then run
+C<system(@args)>; C<tlwarn> if unsuccessful and return the exit status.
+
+=cut
+
+sub wsystem {
+ my ($msg,@args) = @_;
+ info("$msg @args ...\n");
+ my $status = system(@args);
+ if ($status != 0) {
+ tlwarn("$0: command failed: @args: $!\n");
+ }
+ return $status;
+}
+
+
=item C<xsystem(@args)>
-Run C<system(@args)> and die if unsuccessful.
+Call C<ddebug> about what is being done, then run C<system(@args)>, and
+die if unsuccessful.
=cut
@@ -524,7 +545,7 @@ sub xsystem {
=item C<run_cmd($cmd)>
-runs shell CMD and captures its output. Returns a list with CMD's
+Run shell command C<$cmd> and captures its output. Returns a list with CMD's
output as the first element and the return value (exit code) as second.
=cut
@@ -542,8 +563,6 @@ sub run_cmd {
}
-
-
=back
=head2 File Utilities
@@ -1045,9 +1064,6 @@ sub touch {
}
}
-
-
-
=item C<collapse_dirs(@files)>
@@ -2352,7 +2368,6 @@ sub read_file_ignore_cr {
return $ret;
}
-
=item C<setup_programs($bindir, $platform)>
@@ -2673,7 +2688,7 @@ sub get_full_line {
return $line . $cont;
}
-
+
=back
=head2 Installer Functions
@@ -2728,7 +2743,6 @@ sub make_local_skeleton {
mkdirhier "$prefix/web2c";
}
-
=item C<create_fmtutil($tlpdb, $dest, $localconf)>
@@ -3074,7 +3088,7 @@ sub parse_AddFormat_line {
return %ret;
}
-
+
=back
=head2 Miscellaneous
@@ -3930,8 +3944,6 @@ sub sort_archs ($$) {
$aa cmp $bb ;
}
-#############################################
-#
# Taken from Text::ParseWords
#
sub quotewords {
@@ -4086,7 +4098,6 @@ sub mktexupd {
return $hash;
}
-
=back
=cut
1;
diff --git a/Master/tlpkg/bin/tl-update-tlnet b/Master/tlpkg/bin/tl-update-tlnet
index 07c97a4fa36..63d85a834fc 100755
--- a/Master/tlpkg/bin/tl-update-tlnet
+++ b/Master/tlpkg/bin/tl-update-tlnet
@@ -11,7 +11,7 @@ unset LS_COLORS
yyyy=2014
-check_consistency=check-tlnet-consistency
+check_consistency=true
chicken=false
critical=
pretest=false
@@ -26,8 +26,8 @@ while test $# -gt 0; do
--critical) critical=--all;;
--dry-run|-n) chicken=true;;
--master) shift; Master=$1;;
- --no-consistency) check_consistency=true;; # takes a long time.
- --no-testinstall|-N) testinstall=false;; # and no updates; quit early.
+ --no-consistency) check_consistency=false;; # takes a long time.
+ --no-testinstall|-N) testinstall=false;; # and no updates; quit early.
--pretest) tlweb=/home/ftp/texlive/tlpretest;;
--recreate) recreate=--recreate;;
--scheme) shift; scheme=$1;;
@@ -192,10 +192,14 @@ if test $failure = false; then
for cmd in \
"$tltryinst/$yyyy/bin/*/tlmgr --repository $tltry update --list" \
"$tltryinst/$yyyy/bin/*/updmap-sys -n" \
- "$Master/tlpkg/bin/$check_consistency --location=$tltry" \
+ "$Master/tlpkg/bin/check-tlnet-consistency --location=$tltry" \
"$Master/tlpkg/bin/tl-compare-tlpdbs $critical $tltry/tlpkg/texlive.tlpdb" \
; do
cmdname=`echo "$cmd" | awk '{print $1}'`
+ if echo "$cmdname" | grep check-tlnet-consistency >/dev/null; then
+ # skip consistency check if requested (for development only).
+ $check_consistency || continue
+ fi
basecmd=`basename $cmdname`
echo "$0: Running $basecmd ($cmd)"
outfile=/tmp/tlnet.$basecmd