rubber doesn't support filenames with spaces on the command line

Bug #639983 reported by Sébastien Wilmet
14
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Rubber
Fix Released
Undecided
Paul Natsuo Kishimoto
gedit-latex-plugin (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

If the filename of a document contains spaces, rubber will report an error like this:

$ rubber filename\ with\ spaces.tex
compiling filename with spaces.tex...
Could not run latex.

If the filename doesn't contain spaces, everything works well.

description: updated
Revision history for this message
Sébastien Wilmet (sebastien-wilmet) wrote :

Here is the output with -vvv:

$ rubber -vvv ~/test/one\ space.tex
This is Rubber version 1.1.
parsing /home/seb/test/one space.tex
no support found for article
no support found for fontenc
no support found for inputenc
no support found for lmodern
end of /home/seb/test/one space.tex
dependencies: ['/home/seb/test/one space.tex']
checking if compiling is necessary...
the output file doesn't exist
building additional files...
compiling /home/seb/test/one space.tex...
executing: latex \nonstopmode \input{/home/seb/test/one space.tex}
  with environment: {'TEXINPUTS': '/home/seb/programmation/codes-sources/rubber-1.1/build/scripts-2.7:/home/seb/test:'}
process 6864 (latex) returned 256
Could not run latex.
There were errors compiling /home/seb/test/one space.tex.

Revision history for this message
Xavier (xpucel) wrote :

A patch for this bug has been suggested here : http://live.gnome.org/Gedit/LaTeXPlugin/FAQ last question.
I did not personally test it, but if it works it would be great to integrate it in the official release.

Revision history for this message
Sébastien Wilmet (sebastien-wilmet) wrote :

This patch is written for Rubber 1.1, it can not be applied on the development branch.
But it doesn't work for me:

$ rubber --pdf one\ space.tex
compiling one space.tex...
Could not run pdflatex.
path /home/seb/test/test_rubber/one space.tex
cmd ['\\nonstopmode', '\\input{%s}']
env {'TEXINPUTS': '/home/seb/test/test_rubber:/home/seb/test/test_rubber:'}
inputs /home/seb/test/test_rubber:/home/seb/test/test_rubber:
other one space
cmd1 \nonstopmode
cmd2 \input{one space}

There are just more debugging messages.

Revision history for this message
Paul Natsuo Kishimoto (khaeru) wrote :

I don't experience this with rubber 1.1-2.2ubuntu2 in Ubuntu 10.04, but it may still be present in trunk if the Ubuntu/Debian packaging includes a patch for this bug.

Changed in gedit-latex-plugin (Ubuntu):
status: New → Invalid
Changed in rubber:
assignee: nobody → Paul Kishimoto (khaeru)
status: New → In Progress
status: In Progress → Triaged
Revision history for this message
Sébastien Wilmet (sebastien-wilmet) wrote :

http://packages.ubuntu.com/maverick/rubber

There are a lot of patches there that are not applied upstream!
We can read this:

Quote filenames in rules/latex/__init__.py to stop crashes on files with spaces in the filename.

So this bug is fixed in the Ubuntu package, but not upstream.

Why these patches are not applied upstream? It's not the fist time that I see some patches in Ubuntu that are not applied upstream. It's a very bad behaviour! That's why I widely prefer Fedora...

Revision history for this message
Paul Natsuo Kishimoto (khaeru) wrote :

As it turns out, this bug *is* fixed in trunk.

See at
http://bazaar.launchpad.net/~rubber-devs/rubber/main/view/head:/src/converters/latex.py#L1124
, where the variable "file" is quoted in the same manner as in the .diff.gz from the Ubuntu package.

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