Brittleness with texinfo and version numbering

View: New views
6 Messages — Rating Filter:   Alert me  

Brittleness with texinfo and version numbering

by Rik-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

The current octave development version number is 3.3.50+.  The '+'
character is rather special in UNIX naming and in this case it is
breaking the macro @verbatiminclude which is used, for example, in oop.texi.

The actual problem is the value of abs_top_srcdir.  For Mercurial
archives this is whatever the user named the directory when cloning the
repository.  In my case I just used the name 'octave-dev' and my
Mercurial code compiles fine.  However, if one does 'make dist' the
resulting file includes the version (octave-3.3.50+.tar.gz) and this
code will extract to the directory octave-3.3.50+ and will not compile
the documentation.

Offhand I can think of two simple solutions.
1) Stop using '+' or other special characters in version numbering
2) Switch from absolute srcdir naming to relative path naming (../../
avoids any reference to octave-3.3.50+)

Which solution does the community prefer?

--Rik

Brittleness with texinfo and version numbering

by John W. Eaton-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On 12-Oct-2009, octave@... wrote:

| The current octave development version number is 3.3.50+.  The '+'
| character is rather special in UNIX naming and in this case it is
| breaking the macro @verbatiminclude which is used, for example, in oop.texi.
|
| The actual problem is the value of abs_top_srcdir.  For Mercurial
| archives this is whatever the user named the directory when cloning the
| repository.  In my case I just used the name 'octave-dev' and my
| Mercurial code compiles fine.  However, if one does 'make dist' the
| resulting file includes the version (octave-3.3.50+.tar.gz) and this
| code will extract to the directory octave-3.3.50+ and will not compile
| the documentation.
|
| Offhand I can think of two simple solutions.
| 1) Stop using '+' or other special characters in version numbering
| 2) Switch from absolute srcdir naming to relative path naming (../../
| avoids any reference to octave-3.3.50+)
|
| Which solution does the community prefer?

I think this is a but in Texinfo.  If I create a directory called foo+
and process the file

  \input texinfo
  @setfilename foo.info
  @set srcdir foo+
  @verbatiminclude @value{srcdir}/foo
  @bye

with tex, I see the following error:

  $ tex foo.texi
  This is TeX, Version 3.141592 (Web2C 7.5.6)
  (./foo.texi (/usr/share/texmf/tex/texinfo/texinfo.tex
  Loading texinfo [version 2008-04-18.10]: pdf, fonts, page headings, tables,
  conditionals, indexing, sectioning, toc, environments, defuns, macros,
  cross references, insertions,
  (/usr/share/texmf-texlive/tex/generic/epsf/epsf.tex
  This is `epsf.tex' v2.7.3 <23 July 2005>
  ) localization, formatting, and turning on texinfo input format.) (./foo.aux)
  ! I can't find file `foo{'.
  <to be read again>
                     @fam
  @tt ->@fam
             =@ttfam @setfontstyle {tt}
  +->{@tt
          @char 43}
  @value ... not set.}@else @csname SET#1@endcsname
                                                    @fi
  <argument> @value {srcdir}
                            /foo
  @doverbatiminclude ...ble @setupverbatim @input #1
                                                     @afterenvbreak }
  l.7 @verbatiminclude @value{srcdir}/foo

  Please type another input file name:

If I comment out the "@setfilename foo.info" line it works.  Also,
makeinfo can process this either way.

Would you please report the problem to the Texinfo maintainers?

Thanks,

jwe

Re: Brittleness with texinfo and version numbering

by Rik-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

John W. Eaton wrote:

> On 12-Oct-2009, octave@... wrote:
>
> | The current octave development version number is 3.3.50+.  The '+'
> | character is rather special in UNIX naming and in this case it is
> | breaking the macro @verbatiminclude which is used, for example, in oop.texi.
> |
> | The actual problem is the value of abs_top_srcdir.  For Mercurial
> | archives this is whatever the user named the directory when cloning the
> | repository.  In my case I just used the name 'octave-dev' and my
> | Mercurial code compiles fine.  However, if one does 'make dist' the
> | resulting file includes the version (octave-3.3.50+.tar.gz) and this
> | code will extract to the directory octave-3.3.50+ and will not compile
> | the documentation.
> |
> | Offhand I can think of two simple solutions.
> | 1) Stop using '+' or other special characters in version numbering
> | 2) Switch from absolute srcdir naming to relative path naming (../../
> | avoids any reference to octave-3.3.50+)
> |
> | Which solution does the community prefer?
>
> I think this is a but in Texinfo.  If I create a directory called foo+
> and process the file
>
>   \input texinfo
>   @setfilename foo.info
>   @set srcdir foo+
>   @verbatiminclude @value{srcdir}/foo
>   @bye
>
> with tex, I see the following error:
>
>   $ tex foo.texi
>   This is TeX, Version 3.141592 (Web2C 7.5.6)
>   (./foo.texi (/usr/share/texmf/tex/texinfo/texinfo.tex
>   Loading texinfo [version 2008-04-18.10]: pdf, fonts, page headings, tables,
>   conditionals, indexing, sectioning, toc, environments, defuns, macros,
>   cross references, insertions,
>   (/usr/share/texmf-texlive/tex/generic/epsf/epsf.tex
>   This is `epsf.tex' v2.7.3 <23 July 2005>
>   ) localization, formatting, and turning on texinfo input format.) (./foo.aux)
>   ! I can't find file `foo{'.
>   <to be read again>
>     @fam
>   @tt ->@fam
>     =@ttfam @setfontstyle {tt}
>   +->{@tt
>  @char 43}
>   @value ... not set.}@else @csname SET#1@endcsname
>    @fi
>   <argument> @value {srcdir}
>    /foo
>   @doverbatiminclude ...ble @setupverbatim @input #1
>     @afterenvbreak }
>   l.7 @verbatiminclude @value{srcdir}/foo
>
>   Please type another input file name:
>
> If I comment out the "@setfilename foo.info" line it works.  Also,
> makeinfo can process this either way.
>
> Would you please report the problem to the Texinfo maintainers?
>  
I agree it's a problem with texinfo, but I think it will take a longer
to fix it this way than simply avoiding the problem.  If there's a hole
in the sidewalk I can call the city and it might be repaired 6 months
from now.  Or I could just walk down a different street.
 
There were already problems with this exact macro in 2008 when it
wouldn't accept the '@' character and David Bateman had to query and
track down a bug fix.  Not to be mean to the texinfo developers, but I
just don't have time to pursue that process.

--Rik

Re: Brittleness with texinfo and version numbering

by John W. Eaton-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On 13-Oct-2009, Rik wrote:

| I agree it's a problem with texinfo, but I think it will take a longer
| to fix it this way than simply avoiding the problem.

The problem only shows up if you do a "make dist" on an Octave version
from the hg archive, which isn't something that I expect to happen
often.  If I make a snapshot, then I use a "normal" version number.

| If there's a hole
| in the sidewalk I can call the city and it might be repaired 6 months
| from now.  Or I could just walk down a different street.

Would you also call the city while walking down the different street,
or just leave it to someone else to do that job?

| There were already problems with this exact macro in 2008 when it
| wouldn't accept the '@' character and David Bateman had to query and
| track down a bug fix.  Not to be mean to the texinfo developers, but I
| just don't have time to pursue that process.

As I recall, Karl Berry fixed the problem promptly, and all we needed
to do was distribute a patched version of texinfo.tex until a fixed
version was released.  I expect the same might happen this time.

For me, one of the big plusses of free software is that we can fix
bugs rather than just work around them.  But that requires that people
actually report problems that they encounter rather than just trying
to avoid them.

jwe

Re: Brittleness with texinfo and version numbering

by Rik-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

John W. Eaton wrote:

> On 13-Oct-2009, Rik wrote:
>
> | I agree it's a problem with texinfo, but I think it will take a longer
> | to fix it this way than simply avoiding the problem.
>
> The problem only shows up if you do a "make dist" on an Octave version
> from the hg archive, which isn't something that I expect to happen
> often.  If I make a snapshot, then I use a "normal" version number.
>
>  
This is fine.  If it is a low frequency event then it is easier to avoid
it then to fix it.   That was the point I was trying to convey regarding
texinfo as well.

--Rik

Re: Brittleness with texinfo and version numbering

by John W. Eaton-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On 17-Oct-2009, Rik wrote:

| John W. Eaton wrote:
| > On 13-Oct-2009, Rik wrote:
| >
| > | I agree it's a problem with texinfo, but I think it will take a longer
| > | to fix it this way than simply avoiding the problem.
| >
| > The problem only shows up if you do a "make dist" on an Octave version
| > from the hg archive, which isn't something that I expect to happen
| > often.  If I make a snapshot, then I use a "normal" version number.
| >
| >  
| This is fine.  If it is a low frequency event then it is easier to avoid
| it then to fix it.   That was the point I was trying to convey regarding
| texinfo as well.

I sent a bug report about this problem to bug-texinfo@....

jwe