summaryrefslogtreecommitdiff
path: root/systems/texlive/tlnet/tlpkg/TeXLive
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2019-12-23 03:00:28 +0000
committerNorbert Preining <norbert@preining.info>2019-12-23 03:00:28 +0000
commita1dedaefa2becaafcd09daa0489ec89a84908e34 (patch)
tree0ea567121e62ae07380883d54d5c2c295ecce47f /systems/texlive/tlnet/tlpkg/TeXLive
parent00707dfd6ac16ef1f4dc0cf9512c42f2fd20ad35 (diff)
CTAN sync 201912230300
Diffstat (limited to 'systems/texlive/tlnet/tlpkg/TeXLive')
-rw-r--r--systems/texlive/tlnet/tlpkg/TeXLive/TLPOBJ.pm13
-rw-r--r--systems/texlive/tlnet/tlpkg/TeXLive/TLUtils.pm66
-rw-r--r--systems/texlive/tlnet/tlpkg/TeXLive/TeXCatalogue.pm6
3 files changed, 55 insertions, 30 deletions
diff --git a/systems/texlive/tlnet/tlpkg/TeXLive/TLPOBJ.pm b/systems/texlive/tlnet/tlpkg/TeXLive/TLPOBJ.pm
index 4cd97fca3f..e49617b87f 100644
--- a/systems/texlive/tlnet/tlpkg/TeXLive/TLPOBJ.pm
+++ b/systems/texlive/tlnet/tlpkg/TeXLive/TLPOBJ.pm
@@ -1,4 +1,4 @@
-# $Id: TLPOBJ.pm 53112 2019-12-12 23:43:12Z karl $
+# $Id: TLPOBJ.pm 53204 2019-12-21 23:18:19Z karl $
# TeXLive::TLPOBJ.pm - module for using tlpobj files
# Copyright 2007-2019 Norbert Preining
# This file is licensed under the GNU General Public License version 2
@@ -6,7 +6,7 @@
package TeXLive::TLPOBJ;
-my $svnrev = '$Revision: 53112 $';
+my $svnrev = '$Revision: 53204 $';
my $_modulerevision = ($svnrev =~ m/: ([0-9]+) /) ? $1 : "unknown";
sub module_revision { return $_modulerevision; }
@@ -796,7 +796,7 @@ sub make_container {
rmdir($InfraLocation) if $removetlpkgdir;
xchdir($cwd);
- debug(" done $containername, size $size, $checksum\n");
+ debug(" done $containername, size $size, csum $checksum\n");
return ($size, $checksum, "$destdir/$containername");
}
@@ -1517,8 +1517,7 @@ string C<RELOC>.
=item C<srcfiles>, C<runfiles>, C<binfiles>, C<docfiles>
each of these items contains addition the sum of sizes of the single
-files (in number of C<TeXLive::TLConfig::BlockSize> blocks,currently
-4k).
+files (in units of C<TeXLive::TLConfig::BlockSize> blocks, currently 4k).
srcfiles size=NNNNNN
runfiles size=NNNNNN
@@ -1531,7 +1530,7 @@ above:
docfiles size=NNNNNN
But the lines listing the files are allowed to have additional tags,
-which come from the TeX Catalogue.
+(which in practice come from the TeX Catalogue)
/------- excerpt from achemso.tlpobj
|...
@@ -1846,7 +1845,7 @@ lines for language.dat.lua that can be generated from the tlpobj.
=head1 SEE ALSO
The other modules in C<Master/tlpkg/TeXLive/> (L<TeXLive::TLConfig> and
-the rest), and the scripts in C<Master/tlpg/bin/> (especially
+the rest), and the scripts in C<Master/tlpkg/bin/> (especially
C<tl-update-tlpdb>), the documentation in C<Master/tlpkg/doc/>, etc.
=head1 AUTHORS AND COPYRIGHT
diff --git a/systems/texlive/tlnet/tlpkg/TeXLive/TLUtils.pm b/systems/texlive/tlnet/tlpkg/TeXLive/TLUtils.pm
index 2b9aa1c547..b37232a524 100644
--- a/systems/texlive/tlnet/tlpkg/TeXLive/TLUtils.pm
+++ b/systems/texlive/tlnet/tlpkg/TeXLive/TLUtils.pm
@@ -1,4 +1,4 @@
-# $Id: TLUtils.pm 53111 2019-12-12 23:22:05Z karl $
+# $Id: TLUtils.pm 53204 2019-12-21 23:18:19Z karl $
# TeXLive::TLUtils.pm - the inevitable utilities for TeX Live.
# Copyright 2007-2019 Norbert Preining, Reinhard Kotucha
# This file is licensed under the GNU General Public License version 2
@@ -6,7 +6,7 @@
package TeXLive::TLUtils;
-my $svnrev = '$Revision: 53111 $';
+my $svnrev = '$Revision: 53204 $';
my $_modulerevision = ($svnrev =~ m/: ([0-9]+) /) ? $1 : "unknown";
sub module_revision { return $_modulerevision; }
@@ -831,7 +831,7 @@ sub dir_creatable {
Tests whether its argument is writable by trying to write to
it. This function is necessary because the built-in C<-w> test just
-looks at mode and uid/guid, which on Windows always returns true and
+looks at mode and uid/gid, which on Windows always returns true and
even on Unix is not always good enough for directories mounted from
a fileserver.
@@ -1318,6 +1318,7 @@ sub collapse_dirs {
my $item = "$d/$dirent"; # prepend directory for comparison
if (! exists $seen{$item}) {
+ ddebug(" no collapse of $d because of: $dirent\n");
$ok_to_collapse = 0;
last; # no need to keep looking after the first.
}
@@ -3662,38 +3663,67 @@ sub merge_into {
=item C<texdir_check($texdir)>
-Test whether installation with TEXDIR set to $texdir would succeed due to
-writing permissions.
+Test whether installation with TEXDIR set to $texdir should be ok, e.g.,
+would be a creatable directory. Return 1 if ok, 0 if not.
Writable or not, we will not allow installation to the root
directory (Unix) or the root of a drive (Windows).
+We also do not allow paths containing various special characters, and
+print a message about this if second argument WARN is true. (We only
+want to do this for the regular text installer, since spewing output in
+a GUI program wouldn't be good; the generic message will have to do for
+them.)
+
=cut
sub texdir_check {
- my $texdir = shift;
- return 0 unless defined $texdir;
+ my ($orig_texdir,$warn) = @_;
+ return 0 unless defined $orig_texdir;
+
# convert to absolute, for safer parsing.
+ # also replaces backslashes with slashes on w32.
# The return value may still contain symlinks,
# but no unnecessary terminating '/'.
- $texdir = tl_abs_path($texdir);
+ my $texdir = tl_abs_path($orig_texdir);
return 0 unless defined $texdir;
- # also reject the root of a drive,
+
+ # reject the root of a drive,
# assuming that only the canonical form of the root ends with /
return 0 if $texdir =~ m!/$!;
- # win32: for now, reject the root of a samba share
+
+ # Unfortunately we have lots of special characters.
+ # On Windows, backslashes are normal but will already have been changed
+ # to slashes by tl_abs_path. And we should only check for : on Unix.
+ my $colon = win32() ? "" : ":";
+ if ($texdir =~ /[,$colon;\\{}\$]/) {
+ if ($warn) {
+ print " !! TEXDIR value has problematic characters: $orig_texdir\n";
+ print " !! (such as comma, colon, semicolon, backslash, braces\n";
+ print " !! and dollar sign; sorry)\n";
+ }
+ # although we could check each character individually and give a
+ # specific error, it seems plausibly useful to report all the chars
+ # that cause problems, regardless of which was there. Simpler too.
+ return 0;
+ }
+ # w32: for now, reject the root of a samba share
return 0 if win32() && $texdir =~ m!^//[^/]+/[^/]+$!;
- my $texdirparent;
- my $texdirpparent;
+ # if texdir already exists, make sure we can write into it.
return dir_writable($texdir) if (-d $texdir);
- ($texdirparent = $texdir) =~ s!/[^/]*$!!;
+
+ # if texdir doesn't exist, make sure we can write the parent.
+ (my $texdirparent = $texdir) =~ s!/[^/]*$!!;
#print STDERR "Checking $texdirparent".'[/]'."\n";
- return dir_creatable($texdirparent) if -d dir_slash($texdirparent);
- # try another level up the tree
- ($texdirpparent = $texdirparent) =~ s!/[^/]*$!!;
+ return dir_creatable($texdirparent) if -d dir_slash($texdirparent);
+
+ # ditto for the next level up the tree
+ (my $texdirpparent = $texdirparent) =~ s!/[^/]*$!!;
#print STDERR "Checking $texdirpparent".'[/]'."\n";
return dir_creatable($texdirpparent) if -d dir_slash($texdirpparent);
+
+ # doesn't look plausible.
return 0;
}
@@ -4663,12 +4693,8 @@ sub array_to_json {
my $ret = "[" . join(",", map { encode_json(\$_) } @$hr) . "]";
return($ret);
}
-
-
-
=back
=cut
-
1;
__END__
diff --git a/systems/texlive/tlnet/tlpkg/TeXLive/TeXCatalogue.pm b/systems/texlive/tlnet/tlpkg/TeXLive/TeXCatalogue.pm
index a9f94e33ff..ad54929075 100644
--- a/systems/texlive/tlnet/tlpkg/TeXLive/TeXCatalogue.pm
+++ b/systems/texlive/tlnet/tlpkg/TeXLive/TeXCatalogue.pm
@@ -1,4 +1,4 @@
-# $Id: TeXCatalogue.pm 53031 2019-12-05 19:14:32Z karl $
+# $Id: TeXCatalogue.pm 53204 2019-12-21 23:18:19Z karl $
# TeXLive::TeXCatalogue - module for accessing the TeX Catalogue
# Copyright 2007-2019 Norbert Preining
# This file is licensed under the GNU General Public License version 2
@@ -13,7 +13,7 @@ use Text::Unidecode;
package TeXLive::TeXCatalogue::Entry;
-my $svnrev = '$Revision: 53031 $';
+my $svnrev = '$Revision: 53204 $';
my $_modulerevision = ($svnrev =~ m/: ([0-9]+) /) ? $1 : "unknown";
sub module_revision { return $_modulerevision; }
@@ -324,7 +324,7 @@ __END__
=head1 SEE ALSO
The other modules in C<Master/tlpkg/TeXLive/> (L<TeXLive::TLConfig> and
-the rest), and the scripts in C<Master/tlpg/bin/> (especially
+the rest), and the scripts in C<Master/tlpkg/bin/> (especially
C<tl-update-tlpdb>), the documentation in C<Master/tlpkg/doc/>, etc.
=head1 AUTHORS AND COPYRIGHT