Opened 7 years ago

Closed 7 years ago

#14199 closed defect (fixed)

Docbuilder changes sagetex.rst

Reported by: jdemeyer Owned by: mvngu
Priority: blocker Milestone: sage-5.8
Component: documentation Keywords:
Cc: jhpalmieri Merged in: sage-5.8.beta4
Authors: John Palmieri Reviewers: Jeroen Demeyer
Report Upstream: N/A Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Description (last modified by jdemeyer)

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:

  • doc/en/reference/misc/sagetex.rst

    diff --git a/doc/en/reference/misc/sagetex.rst b/doc/en/reference/misc/sagetex.rst
    a b  
    1 Installing and using SageTeX
    2 ============================
     1.. nodoctest
    32
    4 SageTeX is a system for embedding computations and plots from Sage into
    5 LaTeX documents. It is included by default with Sage, so if you have
    6 installed Sage, you already have SageTeX. However, to get it to work,
    7 you need to make TeX aware of SageTeX. Instructions for that are in the
    8 "Make SageTeX known to TeX" section of the `Sage installation guide
    9 <http://sagemath.org/doc/installation/index.html>`_ (`this link
    10 <../../installation/index.html>`_ should take you to a local copy of the
    11 installation guide).
     3.. _sagetex:
     4
     5MISSING TITLE
     6=============
     7
     8.. This file has been autogenerated.
     9
     10
     11.. automodule:: sagetex
     12   :members:
     13   :undoc-members:
     14   :show-inheritance:
     15
     16

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'

Attachments (1)

trac_14199.patch (1.2 KB) - added by jhpalmieri 7 years ago.

Download all attachments as: .zip

Change History (14)

comment:1 Changed 7 years ago by jdemeyer

  • Description modified (diff)

comment:2 Changed 7 years ago by jdemeyer

  • Description modified (diff)

comment:3 Changed 7 years ago by jdemeyer

  • Description modified (diff)

comment:4 Changed 7 years ago by jhpalmieri

  • Cc jhpalmieri added

comment:5 follow-up: Changed 7 years ago by jhpalmieri

I think I may have seen something like this a long time ago, in the early stages of testing #6495, but then I thought it had to do with maybe not deleting the old doc output or something like that. Was this a build from scratch or an upgrade?

I think that the only OS X 10.6 system that I have access to is bsd.math.washington.edu, and I can't reproduce this there, at least after building the docs a few times with a freshly built Sage 5.8.beta2.

comment:6 in reply to: ↑ 5 Changed 7 years ago by jdemeyer

Replying to jhpalmieri:

Was this a build from scratch or an upgrade?

I don't remember, it was on a buildbot machine (bsd.math), but I guess it was a build from scratch. On bsd.math look for /Users/buildbot/sage-5.8.beta2-14199.tar.bz2 which is a build with this problem.

comment:7 Changed 7 years ago by jdemeyer

  • Description modified (diff)

comment:8 Changed 7 years ago by jdemeyer

  • Description modified (diff)

comment:9 Changed 7 years ago by jhpalmieri

  • Authors set to John Palmieri
  • Status changed from new to needs_review

Okay, I think I've figured it out: the problem is that "sagetex.rst" starts with "sage". See the attached patch.

comment:10 Changed 7 years ago by jdemeyer

  • Summary changed from Docbuilder and auto-generated files to Docbuilder changes sagetex.rst

comment:11 Changed 7 years ago by jdemeyer

Maybe you should document better what's the purpose of the condition

if name.startswith('sage' + os.sep):

Changed 7 years ago by jhpalmieri

comment:12 Changed 7 years ago by jhpalmieri

I added a comment to try to address your suggestion.

comment:13 Changed 7 years ago by jdemeyer

  • Merged in set to sage-5.8.beta4
  • Resolution set to fixed
  • Reviewers set to Jeroen Demeyer
  • Status changed from needs_review to closed
Note: See TracTickets for help on using tickets.