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

Antoine Monmayrant antoine.monmayrant at laas.fr
Mon Nov 18 13:18:42 UTC 2019


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


-------------- next part --------------
A non-text attachment was scrubbed...
Name: bundledoc.patch
Type: text/x-patch
Size: 319 bytes
Desc: not available
URL: <https://lists.ubuntu.com/archives/ubuntu-devel-discuss/attachments/20191118/3f6117f2/attachment.bin>


More information about the Ubuntu-devel-discuss mailing list