crashes when no aux file generated (with fix)

Bug #1208464 reported by Dan Stahlke
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Rubber
Fix Released
Medium
Sebastian Kapfer

Bug Description

When no *.aux file is generated by pdflatex, the following error occurs:

Traceback (most recent call last):
  File "/usr/bin/rubber", line 9, in <module>
    sys.exit(Main()(sys.argv[1:]))
  File "/usr/lib/python2.7/site-packages/rubber/cmdline.py", line 296, in __call__
    return self.main(cmdline)
  File "/usr/lib/python2.7/site-packages/rubber/cmdline.py", line 260, in main
    ret = env.final.make(self.force)
  File "/usr/lib/python2.7/site-packages/rubber/__init__.py", line 237, in make
    ret = self.run()
  File "/usr/lib/python2.7/site-packages/rubber/rules/latex/__init__.py", line 1230, in run
    if self.compile(): return 1
  File "/usr/lib/python2.7/site-packages/rubber/rules/latex/__init__.py", line 1136, in compile
    self.aux_md5[aux] = md5_file(aux)
  File "/usr/lib/python2.7/site-packages/rubber/util.py", line 23, in md5_file
    file = open(fname)
IOError: [Errno 2] No such file or directory: 'myfile.aux'

The fix appears to be to change rules/latex/__init__.py line 1136 from

   self.aux_md5[aux] = md5_file(aux)

... to ...

   if exists(aux):
    self.aux_md5[aux] = md5_file(aux)
   else:
    self.aux_md5[aux] = None

I didn't deeply investigate the logic, but this seems to mirror usage elsewhere, where the md5 is set to None when the aux file doesn't exist.

Related branches

Revision history for this message
Sebastian Kapfer (caci) wrote :

Potential fix committed to the trunk branch. Can you please verify the problem is properly fixed?

Changed in rubber:
importance: Undecided → Medium
milestone: none → 1.2
status: New → Fix Committed
Sebastian Kapfer (caci)
Changed in rubber:
assignee: nobody → Sebastian Kapfer (caci)
milestone: 1.2 → none
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.