#14199: Docbuilder and auto-generated files
---------------------------------+------------------------------------------
       Reporter:  jdemeyer       |         Owner:  mvngu   
           Type:  defect         |        Status:  new     
       Priority:  blocker        |     Milestone:  sage-5.8
      Component:  documentation  |    Resolution:          
       Keywords:                 |   Work issues:          
Report Upstream:  N/A            |     Reviewers:          
        Authors:                 |     Merged in:          
   Dependencies:                 |      Stopgaps:          
---------------------------------+------------------------------------------
Description changed by jdemeyer:

Old description:

> On some OS X 10.6 system, I noticed that suddenly the following changes
> appeared in my working repository:
> {{{
> #!diff
> diff --git a/doc/en/reference/misc/sagetex.rst
> b/doc/en/reference/misc/sagetex.rst
> --- a/doc/en/reference/misc/sagetex.rst
> +++ b/doc/en/reference/misc/sagetex.rst
> @@ -1,11 +1,16 @@
> -Installing and using SageTeX
> -============================
> +.. nodoctest
>
> -SageTeX is a system for embedding computations and plots from Sage into
> -LaTeX documents. It is included by default with Sage, so if you have
> -installed Sage, you already have SageTeX. However, to get it to work,
> -you need to make TeX aware of SageTeX. Instructions for that are in the
> -"Make SageTeX known to TeX" section of the `Sage installation guide
> -<http://sagemath.org/doc/installation/index.html>`_ (`this link
> -<../../installation/index.html>`_ should take you to a local copy of the
> -installation guide).
> +.. _sagetex:
> +
> +MISSING TITLE
> +=============
> +
> +.. This file has been autogenerated.
> +
> +
> +.. automodule:: sagetex
> +   :members:
> +   :undoc-members:
> +   :show-inheritance:
> +
> +
> }}}
> If this an autogenerated file, it should not be tracked by Mercurial. And
> also, what happened to this file, why did all content get removed?
>
> This happened with sage-5.8.beta2, it is always reproducible (at least on
> this particular build), even when no source files have changed. The
> output of a `make doc-html` run can be found in [attachment:doc.log].
>
> Making the file `sagetex.rst` unwritable shows where the file is written:
> {{{
> Traceback (most recent call last):
>   File "/Users/buildbot/sage-5.8.beta2/devel/sage/doc/common/builder.py",
> line 45, in build_ref_doc
>     getattr(ReferenceSubBuilder(doc, lang), format)(*args, **kwds)
>   File "/Users/buildbot/sage-5.8.beta2/devel/sage/doc/common/builder.py",
> line 662, in _wrapper
>     self.write_auto_rest_file(module_name.replace(os.path.sep, '.'))
>   File "/Users/buildbot/sage-5.8.beta2/devel/sage/doc/common/builder.py",
> line 924, in write_auto_rest_file
>     outfile = open(filename, 'w')
> IOError: [Errno 13] Permission denied:
> '/Users/buildbot/sage-5.8.beta2/devel/sage/doc/en/reference/misc/sagetex.rst'
> }}}

New description:

 Install sage-5.8.beta2 and build the documentation. Now
 {{{
 $ touch devel/sage/doc/en/reference/misc/sagetex.rst
 $ make doc
 }}}
 and you will see the following change appear:
 {{{
 #!diff
 diff --git a/doc/en/reference/misc/sagetex.rst
 b/doc/en/reference/misc/sagetex.rst
 --- a/doc/en/reference/misc/sagetex.rst
 +++ b/doc/en/reference/misc/sagetex.rst
 @@ -1,11 +1,16 @@
 -Installing and using SageTeX
 -============================
 +.. nodoctest

 -SageTeX is a system for embedding computations and plots from Sage into
 -LaTeX documents. It is included by default with Sage, so if you have
 -installed Sage, you already have SageTeX. However, to get it to work,
 -you need to make TeX aware of SageTeX. Instructions for that are in the
 -"Make SageTeX known to TeX" section of the `Sage installation guide
 -<http://sagemath.org/doc/installation/index.html>`_ (`this link
 -<../../installation/index.html>`_ should take you to a local copy of the
 -installation guide).
 +.. _sagetex:
 +
 +MISSING TITLE
 +=============
 +
 +.. This file has been autogenerated.
 +
 +
 +.. automodule:: sagetex
 +   :members:
 +   :undoc-members:
 +   :show-inheritance:
 +
 +
 }}}
 If this an autogenerated file, it should not be tracked by Mercurial. And
 why did all content get removed?

 Making the file `sagetex.rst` unwritable shows where the file is written:
 {{{
 Traceback (most recent call last):
   File "/Users/buildbot/sage-5.8.beta2/devel/sage/doc/common/builder.py",
 line 45, in build_ref_doc
     getattr(ReferenceSubBuilder(doc, lang), format)(*args, **kwds)
   File "/Users/buildbot/sage-5.8.beta2/devel/sage/doc/common/builder.py",
 line 662, in _wrapper
     self.write_auto_rest_file(module_name.replace(os.path.sep, '.'))
   File "/Users/buildbot/sage-5.8.beta2/devel/sage/doc/common/builder.py",
 line 924, in write_auto_rest_file
     outfile = open(filename, 'w')
 IOError: [Errno 13] Permission denied:
 '/Users/buildbot/sage-5.8.beta2/devel/sage/doc/en/reference/misc/sagetex.rst'
 }}}

--

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/14199#comment:8>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica, 
and MATLAB

-- 
You received this message because you are subscribed to the Google Groups 
"sage-trac" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-trac?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to