summaryrefslogtreecommitdiff
path: root/Build/source/texk/tests/TeXLive
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2015-06-24 21:30:31 +0000
committerKarl Berry <karl@freefriends.org>2015-06-24 21:30:31 +0000
commit375ce45529dbb82b8d404a7ce310c5d96227e208 (patch)
treed9ff8e9aa4a6106a04eef6ec12b3129efe1fd60b /Build/source/texk/tests/TeXLive
parent950ff9d2523f08c6d7d855f4af237de38144d3b2 (diff)
sync
git-svn-id: svn://tug.org/texlive/trunk@37656 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk/tests/TeXLive')
-rw-r--r--Build/source/texk/tests/TeXLive/TLConfig.pm17
-rw-r--r--Build/source/texk/tests/TeXLive/TLUtils.pm12
2 files changed, 25 insertions, 4 deletions
diff --git a/Build/source/texk/tests/TeXLive/TLConfig.pm b/Build/source/texk/tests/TeXLive/TLConfig.pm
index 1a4424c8e82..4f9cee081c1 100644
--- a/Build/source/texk/tests/TeXLive/TLConfig.pm
+++ b/Build/source/texk/tests/TeXLive/TLConfig.pm
@@ -5,7 +5,7 @@
package TeXLive::TLConfig;
-my $svnrev = '$Revision: 36787 $';
+my $svnrev = '$Revision: 37643 $';
my $_modulerevision;
if ($svnrev =~ m/: ([0-9]+) /) {
$_modulerevision = $1;
@@ -48,6 +48,7 @@ BEGIN {
%TLPDBConfigs
$NetworkTimeout
$PartialEngineSupport
+ $F_OK $F_WARNING $F_ERROR $F_NOPOSTACTION
);
@EXPORT = @EXPORT_OK;
}
@@ -197,6 +198,20 @@ our $PartialEngineSupport = "luajittex";
# timeout for network connections (wget, LWP) in seconds
our $NetworkTimeout = 30;
+# Flags for error handling across the scripts and modules
+# all fine
+our $F_OK = 0;
+#
+# some warnings, but we still try to run post actions
+our $F_WARNING = 1;
+#
+# error, terminating
+our $F_ERROR = 2;
+#
+# all fine, but no need to run post actions
+our $F_NOPOSTACTION = 4;
+
+
1;
diff --git a/Build/source/texk/tests/TeXLive/TLUtils.pm b/Build/source/texk/tests/TeXLive/TLUtils.pm
index 8763d3dbf6a..2fc4a3992b9 100644
--- a/Build/source/texk/tests/TeXLive/TLUtils.pm
+++ b/Build/source/texk/tests/TeXLive/TLUtils.pm
@@ -5,7 +5,7 @@
package TeXLive::TLUtils;
-my $svnrev = '$Revision: 36818 $';
+my $svnrev = '$Revision: 37234 $';
my $_modulerevision;
if ($svnrev =~ m/: ([0-9]+) /) {
$_modulerevision = $1;
@@ -1875,9 +1875,15 @@ sub _do_postaction_shortcut {
# $cmd can be an URL, in which case we do NOT want to convert it to
# w32 paths!
if ($cmd !~ m!^\s*(http://|ftp://)!) {
+ if (!(-e $cmd) or !(-r $cmd)) {
+ tlwarn("Target of shortcut action does not exist: $cmd\n")
+ if $cmd =~ /\.(exe|bat|cmd)$/i;
+ # if not an executable, just omit shortcut silently
+ return 0;
+ }
$cmd = conv_to_w32_path($cmd);
}
- if ($type eq "menu") {
+ if ($type eq "menu" ) {
TeXLive::TLWinGoo::add_menu_shortcut(
$TeXLive::TLConfig::WindowsMainMenuName,
$name, $icon, $cmd, $args, $hide);
@@ -3521,7 +3527,7 @@ sub conv_to_w32_path {
my $p = shift;
# we need absolute paths, too
my $pabs = tl_abs_path($p);
- if (not defined $pabs) {
+ if (not $pabs) {
$pabs = $p;
tlwarn ("sorry, could not determine absolute path of $p!\n".
"using original path instead");