dependency parsing error

Bug #1049883 reported by David Villa Alises
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Rubber
Fix Released
High
Unassigned

Bug Description

The lstinputlisting files are incorrectly parsed when you put a latex comment (%) after options. You can view a sample tex file producing error on:

https://bitbucket.org/DavidVilla/rubber-bugs/src/d5e14fca90aa/lst-depends-wrong-parse.tex

When you run:

$ rubber -pdf -vv lst-depends-wrong-parse.tex

This is Rubber version 1.1.
parsing /home/david/repos/rubber-bugs/lst-depends-wrong-parse.tex
built-in module listings registered
dependencies: ['/home/david/repos/rubber-bugs/lst-depends-wrong-parse.tex', '%']
built-in module dvips registered
built-in module ps2pdf registered
'%' does not exist
There were errors compiling lst-depends-wrong-parse.tex.

'%' is parsed and procesed as a file name.

A simple Q&D patch for file "src/latex_modules/listings.py" can be:

def hook_input (loc, opt, file):
> if file.strip(' ') in ['%', '\n']:
> return
>
 if file.find('\\') < 0 and file.find('#') < 0:
  doc.add_source(file)

Cheers

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

Thank you, I can reproduce this. Too later for 1.2, however, this will go into the next release.

Changed in rubber:
importance: Undecided → High
milestone: none → 1.3
status: New → Confirmed
Revision history for this message
Sebastian Kapfer (caci) wrote :

Fixed in rubber/trunk, slated for release with 1.3. Thank you for reporting!

Changed in rubber:
status: Confirmed → Fix Committed
Sebastian Kapfer (caci)
Changed in rubber:
milestone: 1.3 → 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.