[tex-live] [install-tl] Limitation on length of installation path?

Reinhard Kotucha reinhard.kotucha at web.de
Sat Sep 8 02:24:40 CEST 2012


On 2012-09-07 at 23:00:51 +0200, Zdenek Wagner wrote:

 > 2012/9/7 Reinhard Kotucha <reinhard.kotucha at web.de>:
 > > On 2012-09-07 at 19:28:02 +0900, Vladimir Lomov wrote:
 > >
 > >  > Hello,
 > >  >
 > >  > ** Norbert Preining [2012-09-07 19:07:03 +0900]:
 > >  >
 > >  > > Hi
 > >  >
 > >  > >> Also, removing either `local' or `texlive' (i.e. setting
 > >  > >> installation path to
 > >  > >>  /home/vladimir/usr/texlive/2012
 > >  > >> or
 > >  > >>  /home/vladimir/usr/local/2012
 > >  > >> ) allows to install TL without manual intervetion.
 > >  >
 > >  > >> Is this intended limitation?
 > >  >
 > >  > > Yes and no. We check on writeabity two levels up in the
 > >  > > hierarchy, but if that does not even exist it looks like it
 > >  > > breaks.
 > >  >
 > >  > I naively thought that it is enough to check permission to write
 > >  > (create) in top directory, like e.g. ~/usr (I assume that this
 > >  > directory exists) or `~', if to talk about `~/usr/local/...'. Is
 > >  > this perl limitation, e.g. missing analog of `-p' parameter of
 > >  > `mkdir' or something other? I'm just curious.
 > >
 > > No, there is a function mkdirhier() in TLUtils.pm which does the same
 > > as mkdir -p .  It has been written in order to create the directory
 > > tree in TEXMFLOCAL.
 > >
 > Is there any difference from the mkpath function trom the File::Path
 > module? I have been using mkpath in my programs for years. 

Don't know.  I wrote the function in order to keep the network
installer for Windows as small as possible.  Many Perl modules provide
much more than actually needed and support ancient operating systems
which will never be supported by TeX Live (NOS/VE, VMS,...).

BTW, when I wrote this function, the TL network installer for Windows
was much smaller than it's today.  It grew significantly when Norbert
added the GUI and localization.  The latter requires full Unicode
support, hence many files.  I suppose that the network installer for
Windows currently contains many files which are not used at all,
simply because it's too hard to compose a tiny Perl distribution
manually.  If we had something like strace(1) on Windows, it would be
easy to omit all unused files and it would then make more sense again
to avoid Perl modules if they save only ten lines of code.

 > I used it even in Perl on OS/2 Warp 4.

mkdirhier() is quite platform independent too.  It uses Perl core
functions like mkdir() only, but no shell escapes.  The function
supports all systems with either / or \ as directory separators.
Honestly, mkdirhier() is simple.  It just checks each path component
for existence and creates it if necessary.  If a directory cannot be
created, it aborts with an error message.  That's all.  mkdir -p does
the same, AFAIK.

I wouldn't be amazed if mkdirhier() works on OS/2 too.  Doesn't OS/2
support the same directory separators as MS-DOG?

Regards,
  Reinhard

-- 
----------------------------------------------------------------------------
Reinhard Kotucha                                      Phone: +49-511-3373112
Marschnerstr. 25
D-30167 Hannover                              mailto:reinhard.kotucha at web.de
----------------------------------------------------------------------------
Microsoft isn't the answer. Microsoft is the question, and the answer is NO.
----------------------------------------------------------------------------


More information about the tex-live mailing list