Rubber does not handle uppercase extensions correct

Bug #1583475 reported by Matthias Goldhoorn
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Rubber
Fix Released
Undecided
Unassigned

Bug Description

Handle uppercase filename extensions.

On Linux Systems there is a separation between upper/lowercase filenames
however, latex does not take respect to the case of filenames too
therefore interpret all filename extensions as upper/lowercase in the same
manner.

Revision history for this message
Matthias Goldhoorn (matthias-l) wrote :
Revision history for this message
Emmanuel Beffara (manu-beffara) wrote :

I believe it is not correct: LaTeX uses standard operating system behaviour as far as I know. For instance if on a Linux (in a case-sensitive file system like ext4) I have a file "a.TEX" and a file "b.tex" that contains "\include{a}" or "\input{a}", then on compilation of "b.tex" the file "a.TEX" will not be used.

Looking at your patch it seems that the case insensitivity you are referring to applies for graphics inclusion. In fact, the situation is much simpler than full case insensitivity: the standard file "pdftex.def" explicitly declares extensions ".png,.pdf,.jpg,.mps,.jpeg,.PNG,.PDF,.JPG,.JPEG" for graphics.

So the proper fix would be to change the definition of "drv_suffixes" in "graphics.py" to reflect that. One should check how the various drivers behave, maybe graphics converters should also be extended to handle case distinction better.

Revision history for this message
Matthias Goldhoorn (matthias-l) wrote : Re: [Bug 1583475] Re: Rubber does not handle uppercase extensions correct

Sorry Emmanuel is right, latex DO differ between the filename casivity.
However, if \includegraphics..{foo} latex does not care of JPG or jpg,
this was the reason why I stumbled over this.

I personally don't care where this fix is applied. My patch only accepts the
if the extensions are uppercase, it does not influence the basename of
the file itself.
You can either extend the filename lists in rules.ini to match the one
from latex or apply my patch.
My patch handles this generically.

If you want me to, I can update the patch with the right description and
source-code comment

Am 19.05.2016 um 10:41 schrieb Emmanuel Beffara:
> I believe it is not correct: LaTeX uses standard operating system
> behaviour as far as I know. For instance if on a Linux (in a case-
> sensitive file system like ext4) I have a file "a.TEX" and a file
> "b.tex" that contains "\include{a}" or "\input{a}", then on compilation
> of "b.tex" the file "a.TEX" will not be used.
>
> Looking at your patch it seems that the case insensitivity you are
> referring to applies for graphics inclusion. In fact, the situation is
> much simpler than full case insensitivity: the standard file
> "pdftex.def" explicitly declares extensions
> ".png,.pdf,.jpg,.mps,.jpeg,.PNG,.PDF,.JPG,.JPEG" for graphics.
>
> So the proper fix would be to change the definition of "drv_suffixes" in
> "graphics.py" to reflect that. One should check how the various drivers
> behave, maybe graphics converters should also be extended to handle case
> distinction better.
>

Revision history for this message
Matthias Goldhoorn (matthias-l) wrote :

Ah... I now see the variable you propose.
I created a new patch which automatically generates the uppercase Filename extensions.

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

Merged.

Changed in rubber:
status: New → Fix Committed
Changed in rubber:
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.