summaryrefslogtreecommitdiff
path: root/Build
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2017-12-13 22:05:35 +0000
committerKarl Berry <karl@freefriends.org>2017-12-13 22:05:35 +0000
commit9eecfccbaf17b0f02788147c79ad139000907173 (patch)
tree9bfa8e18d1ee98beb458806db40f90d1cb50f31c /Build
parent2933c4d36a4e58acd8c420a4371868262928ae96 (diff)
latexmk (13dec17)
git-svn-id: svn://tug.org/texlive/trunk@46062 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build')
-rwxr-xr-xBuild/source/texk/texlive/linked_scripts/latexmk/latexmk.pl42
-rwxr-xr-xBuild/source/texk/texlive/linked_scripts/texlive/tlmgr.pl10
2 files changed, 40 insertions, 12 deletions
diff --git a/Build/source/texk/texlive/linked_scripts/latexmk/latexmk.pl b/Build/source/texk/texlive/linked_scripts/latexmk/latexmk.pl
index 343fc01dc6e..9bc55d134b7 100755
--- a/Build/source/texk/texlive/linked_scripts/latexmk/latexmk.pl
+++ b/Build/source/texk/texlive/linked_scripts/latexmk/latexmk.pl
@@ -1,7 +1,5 @@
#!/usr/bin/env perl
-# SEE "POSSIBLE BUG" aournd line 2221
-
# ?? Still need to fix bcf error issue.
# Don't keep looping after error
# pvc: Only re-run on USER FILE CHANGE.
@@ -123,13 +121,39 @@ use warnings;
$my_name = 'latexmk';
$My_name = 'Latexmk';
-$version_num = '4.54';
-$version_details = "$My_name, John Collins, 20 Nov. 2017";
+$version_num = '4.54c';
+$version_details = "$My_name, John Collins, 12 Dec. 2017";
use Config;
use File::Basename;
use File::Copy;
-use File::Glob ':bsd_glob'; # Better glob. Does not use space as item separator.
+
+# If possible, use better glob, which does not use space as item separator.
+# It's either File::Glob::bsd_glob or File::Glob::glob
+# The first does not exist in old versions of Perl, while the second
+# is deprecated in more recent versions and will be removed
+$have_bsd_glob = 0;
+sub my_glob {
+ if ($have_bsd_glob) { return bsd_glob( $_[0] ); }
+ else { return glob( $_[0] ); }
+}
+use File::Glob;
+if ( eval{ File::Glob->import('bsd_glob'); 1; } ) {
+ # Success in importing bsd_glob
+ $have_bsd_glob = 1;
+}
+elsif ( eval{ File::Glob->import('glob'); 1; } ) {
+ warn "$My_name: I could not import File::Glob:bsd_glob, probably because your\n",
+ " Perl is too old. I have arranged to use the deprecated File::Glob:glob\n",
+ " instead.\n",
+ " WARNING: It may malfunction on clean up operation on filenames containing\n",
+ " spaces.\n";
+ $have_bsd_glob = 0;
+}
+else {
+ die "Could not import 'File::Glob:bsd_glob' or 'File::Glob:glob'\n";
+}
+
use File::Path 2.08 qw( make_path );
use FileHandle;
use File::Find;
@@ -197,6 +221,9 @@ else {
##
## 12 Jan 2012 STILL NEED TO DOCUMENT some items below
##
+## 12 Dec 2017 John Collins Further correct bsd_glob fudge (to be in subroutine my_glob)
+## 8 Dec 2017 John Collins Correct bsd_glob fudge
+## 2 Dec 2017 John Collins Fudge on bsd_glob if it doesn't exist
## 20 Nov 2017 John Collins Ver. 4.54
## 18 Nov 2017 John Collins Add item to @file_not_found for generic
## package warning about "No file", as produced
@@ -3356,7 +3383,7 @@ sub cleanup1 {
my $root_fixed = fix_pattern( $root_filename );
foreach (@_) {
(my $name = /%R/ ? $_ : "%R.$_") =~ s/%R/${dir}${root_fixed}/;
- unlink_or_move( bsd_glob( "$name" ) );
+ unlink_or_move( my_glob( "$name" ) );
}
} #END cleanup1
@@ -7910,8 +7937,7 @@ sub glob_list1 {
push @globbed, $file_spec;
}
else {
- # This glob fails to work as desired, if the pattern contains spaces.
- push @globbed, bsd_glob( "$file_spec" );
+ push @globbed, my_glob( "$file_spec" );
}
}
return @globbed;
diff --git a/Build/source/texk/texlive/linked_scripts/texlive/tlmgr.pl b/Build/source/texk/texlive/linked_scripts/texlive/tlmgr.pl
index 431eabca763..63ea4ec37b0 100755
--- a/Build/source/texk/texlive/linked_scripts/texlive/tlmgr.pl
+++ b/Build/source/texk/texlive/linked_scripts/texlive/tlmgr.pl
@@ -1,13 +1,13 @@
#!/usr/bin/env perl
-# $Id: tlmgr.pl 46009 2017-12-07 01:54:36Z preining $
+# $Id: tlmgr.pl 46034 2017-12-11 01:54:21Z preining $
#
# Copyright 2008-2017 Norbert Preining
# This file is licensed under the GNU General Public License version 2
# or any later version.
#
-my $svnrev = '$Revision: 46009 $';
-my $datrev = '$Date: 2017-12-07 02:54:36 +0100 (Thu, 07 Dec 2017) $';
+my $svnrev = '$Revision: 46034 $';
+my $datrev = '$Date: 2017-12-11 02:54:21 +0100 (Mon, 11 Dec 2017) $';
my $tlmgrrevision;
my $tlmgrversion;
my $prg;
@@ -1537,6 +1537,8 @@ sub action_info {
}
# loading of tlpdb is done below
}
+ } elsif (!$what || $what =~ m/^(collections|schemes)$/i) {
+ $fmt = "list";
} else {
$fmt = "detail";
}
@@ -9331,7 +9333,7 @@ This script and its documentation were written for the TeX Live
distribution (L<http://tug.org/texlive>) and both are licensed under the
GNU General Public License Version 2 or later.
-$Id: tlmgr.pl 46009 2017-12-07 01:54:36Z preining $
+$Id: tlmgr.pl 46034 2017-12-11 01:54:21Z preining $
=cut
# to remake HTML version: pod2html --cachedir=/tmp tlmgr.pl >/tmp/tlmgr.html