[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

bundledoc is broken in ubuntu 18.04 ( due to perl 5.26 change regarding {)



Hello,

warning
A bit of a warning first: I am not a coder, and I apologize in advance if this email does not conform to best practice in bug reporting / patch proposing.
I think I found a bug (two?) in bundledoc and somehow fixed it (them).
perl is not a language I really master, so my fix is most probably ugly.
/warning

It seems that bundledoc (part of texlive-extra-utils) is broken in Ubuntu 18.04 due to perl 5.26 deprecating the use of unescaped left brace in regexpr.

Running /usr/bin/bundledoc on any trivial example results in the following error:

bundledoc --config=texlive-unix.cfg --verbose --localonly --exclude=.fd --exclude=.cfg --include="*.bib" --manifest="" hello.dep
BDBASE = '/tmp/bundledoc/hello'
Unescaped left brace in regex is illegal here in regex; marked by <-- HERE in m/^\s*\*{ <-- HERE ([^}]*)}\s*{([^}]*)}\s*{([^}]*)}\s*$/ at /data/bundledoc line 141, <DEPFILE> line 1.

This error can be fixed by replacing line 136:
    my $braced = "{([^\}]*)}";   # Regular expression for a braced name
with
    my $braced = "\\{([^\}]*)}";   # Regular expression for a braced name

Another issue seems to be related to temp file/folder creation.
It can be fixed by adding:
   use File::Temp qw/ :POSIX /;
at the beginning of the file.

I tried to generate a patch to fix bundledoc (see attachment).

Do not hesitate to contact me if clarifications are needed.


Antoine


38a39,40
> use File::Temp qw/ :POSIX /; # BOZ EDIT
> 
136c138,139
<     my $braced = "{([^\}]*)}";   # Regular expression for a braced name
---
> #     my $braced = "{([^\}]*)}";   # Regular expression for a braced name 
>     my $braced = "\\{([^\}]*)}";   # Regular expression for a braced name # BOZ EDIT
145d147
< 

Reply to: