bugtexinfo - GNU documentation system - Bugs: bug #46007, texi2dvi Msys support

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #46007: texi2dvi Msys support

Submitted by:  Vincent Belaïche <vincentb1>
Submitted on:  Sun 20 Sep 2015 03:11:16 PM UTC  
 
Category: NoneRelease: 
Priority: 5 - NormalSeverity: 3 - Normal
Item Group: NonePrivacy: Public
Open/Closed: ClosedAssigned to: None
Status: Fixed

Wed 23 Sep 2015 06:41:00 PM UTC, comment #3:

The latest patch which I have posted (file #34966) is more complete than the previous one (file #34939), as it works with MSW file format for TEXINPUTS-like envars and for TeX engines arguments when MSYS is detected.

This ensure better compatibility to MSYS when the user configures non empty TEXINPUTS-like envars.

Vincent Belaïche <vincentb1>
Sun 20 Sep 2015 08:40:29 PM UTC, comment #2:

Le 20/09/2015 17:31, Eli Zaretskii a écrit : > Follow-up Comment #1, bug
#46007 (project texinfo):

>
>> if test -n "$COMSPEC$ComSpec" \ && uname | $EGREP -iv 'cygwin
>> >/dev/null; then path_sep=";"
>
> Shouldn't that ' before "cygwin" be removed?


Certainly... probably I just edited the old code rather than copy-paste
the new one...

>
> Anyway, the above obviously doesn't cater to MSYS, which is why I
> believe you get the error message about missing TeX.
>
> About your patch: I think it's better to do this:
>
> MSYSTEM=$OSTYPE uname
>
> instead of saving and restoring MSYSTEM. I don't think systems other
> than MSYS will care.


I agree. Is it possible in sh too to do it this way ?

I have attached the updated patch as
file #34939

FYI, I have also open the question of what MikTeX is exactly doing on
the MikTeX user mailing list

https://sourceforge.net/p/miktex/mailman/miktex-users/thread/DUB109-W135533811C5812A87D474E984470%40phx.gbl/#msg34476007

Let us see what Christian will feedback. Very funny : his first reaction
was to tell that MikTeX is not an Msys program, probably there was a
misunderstanding on what I meant, he certainly thought that I was
meaning "built using the MSYS autoconfiture" (FYI, in French "confiture"
means "jam").

Vincent.

Vincent Belaïche <vincentb1>
Sun 20 Sep 2015 03:31:04 PM UTC, comment #1:

> if test -n "$COMSPEC$ComSpec" \
> && uname | $EGREP -iv 'cygwin >/dev/null; then
> path_sep=";"


Shouldn't that ' before "cygwin" be removed?

Anyway, the above obviously doesn't cater to MSYS, which is why I believe you get the error message about missing TeX.

About your patch: I think it's better to do this:

MSYSTEM=$OSTYPE uname

instead of saving and restoring MSYSTEM. I don't think systems other than MSYS will care.

Eli Zaretskii <eliz>
Project Member
Sun 20 Sep 2015 03:11:16 PM UTC, original submission:

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

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

The code was corrected as follows:

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

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.

Vincent Belaïche <vincentb1>

 

Attached Files
file #34966:  texi2dvi.diff added by vincentb1 (5KiB - text/plain)
file #34939:  texi2dvi.diff added by vincentb1 (2KiB - text/plain)
file #34935:  miktex_env_convert.sh added by vincentb1 (2KiB - application/octet-stream)
file #34936:  texi2dvi.diff added by vincentb1 (2KiB - text/plain)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by gavin (Updated the item)
  • -unavailable- added by eliz (Posted a comment)
  • -unavailable- added by vincentb1 (Submitted the item)
  • -unavailable- added by vincentb1 (New thread, was [bug #43122] texi2dvi does not compile enough times to get toc)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 7 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Thu 01 Oct 2015 08:35:45 AM UTCgavinOpen/ClosedOpen=>Closed
      StatusNone=>Fixed
    Wed 23 Sep 2015 06:37:55 PM UTCvincentb1Attached File-=>Added texi2dvi.diff, #34966
    Sun 20 Sep 2015 08:38:22 PM UTCvincentb1Attached File-=>Added texi2dvi.diff, #34939
    Sun 20 Sep 2015 03:11:16 PM UTCvincentb1Attached File-=>Added miktex_env_convert.sh, #34935
      Attached File-=>Added texi2dvi.diff, #34936
      Carbon-Copy-=>Added eli zaretskii

    Back to the top


    Powered by Savane 3.1-cleanup1