bug-texinfo
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug #46007] texi2dvi Msys support


From: Vincent Belaïche
Subject: [bug #46007] texi2dvi Msys support
Date: Sun, 20 Sep 2015 15:11:17 +0000
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64; Trident/7.0; rv:11.0) like Gecko

URL:
  <http://savannah.gnu.org/bugs/?46007>

                 Summary: texi2dvi Msys support
                 Project: texinfo - GNU documentation system
            Submitted by: vincentb1
            Submitted on: dim. 20 sept. 2015 15:11:16 GMT
                Category: None
                 Release: 
                Priority: 5 - Normal
                Severity: 3 - Normal
              Item Group: None
                 Privacy: Public
             Open/Closed: Open
             Assigned to: None
         Discussion Lock: Any
                  Status: None

    _______________________________________________________

Details:

The texi2dvi code before rev 6632 to set variable path_sep was as folows:


# Systems which define $COMSPEC or $ComSpec use semicolons to separate
# directories in TEXINPUTS -- except for Cygwin et al., where COMSPEC
# might be inherited, but : is used.
if test -n "$COMSPEC$ComSpec" \
   && uname | $EGREP -iv 'cygwin|mingw|djgpp' >/dev/null; then
  path_sep=";"
else
  path_sep=":"
fi


This code has an issue that it would set path_sep to ":" for djgpp,
which I understood incorrect.

The code was corrected as follows:

# Systems which define $COMSPEC or $ComSpec use semicolons to separate
# directories in TEXINPUTS -- except for Cygwin et al., where COMSPEC
# might be inherited, but : is used.
if test -n "$COMSPEC$ComSpec" \
   && uname | $EGREP -iv 'cygwin >/dev/null; then
  path_sep=";"
else
  path_sep=":"
fi


However, this cause texi2dvi to throw this error when launched from an MSYS
console:


You don't have a working TeX binary (tex) installed anywhere in
your PATH, and texi2dvi cannot proceed without one.  If you want to use
this script, you'll need to install TeX (if you don't have it) or change
your PATH or TEX environment variable (if you do).  See the --help
output for more details.

For information about obtaining TeX, please see http://tug.org/texlive,
or do a web search for TeX and your operating system or distro.


Eli's opinion was that trying to launch texi2dvi from an MSYS bash to
run a MinGw TeX is as follows:

-------
If you want to support MSYS, then it's a mess: MSYS converts ':' to
';' in PATH, but it doesn't do anything about other variables, like
TEXINPUTS.  So if you have an MSYS Bash and MinGW TeX, you are screwed
anyway.

Based on that, I wouldn't recommend the Texinfo project to even try
supporting MSYS, since the probability of having MSYS TeX program on a
Windows machine is close to zero
-------


Well, on the second point (the probability of having MSYS TeX program
on a Windows machine is close to zero), I disagree, I realized
experimentally that MikTeX, which is one of the two majors TeX distros
on MSW, is actually an MSYS TeX program, it understands MSYS paths for
the input document source and for the TEXINPUTS and suchlikes.

On the first pint (So if you have an MSYS Bash and MinGW TeX, you are
screwed anyway), I agree that if the TEXINPUTS and suchlikes are non
empty and configured in MSW with the DOS conventions, e.g. like this:

set TEXINPUTS=C:\Way\To\Path1;C:\Way\To\Path2\\;

then, yes, this will screw up texi2dvi, because, as MSYS per se does
not do any conversion on these envvars, texi2dvi will mix up the DOS
convention and the MSYS convention for paths.

I think that to handle this case there are two things that need to be
made *in MikTeX*, not in Texinfo:

- recommend users not to use the TEXINPUTS and suchlikes variables
  (let them empty), and use rather the MikTeX root configurator

- recommand users that if however they will use the the TEXINPUTS and
  suchlikes variables, then they should either:
  - configure them in MSYS format --- which may be problematic if
    there are other non-MSYS TeX installed on the same machine, or
  - source in their MSYS ~/.profile some MikTeX scripts that does that
    conversion from DOS to MSYS. I attached that sort of script to
    this bug report.


Concerning texi2dvi I recommend to have the same handling for Msys as
for cygwin, under the assumption that when you call the script the TeX
envvars are in Msys format (either they are empty, or the user has
configured them in Msys format, or the conversion script was called before)

I atached a texi2dvi patch to do that.









    _______________________________________________________

File Attachments:


-------------------------------------------------------
Date: dim. 20 sept. 2015 15:11:16 GMT  Name: miktex_env_convert.sh  Size: 2 ko
  By: vincentb1

<http://savannah.gnu.org/bugs/download.php?file_id=34935>
-------------------------------------------------------
Date: dim. 20 sept. 2015 15:11:16 GMT  Name: texi2dvi.diff  Size: 2 ko   By:
vincentb1

<http://savannah.gnu.org/bugs/download.php?file_id=34936>

    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?46007>

_______________________________________________
  Message posté via/par Savannah
  http://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]