Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 584444 - app-misc/when fails to run with perl-5.24
Summary: app-misc/when fails to run with perl-5.24
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Shell Tools project
URL: https://github.com/bcrowell/when/issu...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-05-29 12:00 UTC by Hendrik v. Raven
Modified: 2016-08-19 02:39 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
patch for when to remove failing dead code. (when_dist.patch,1.23 KB, patch)
2016-06-03 08:39 UTC, Kent Fredric (IRC: kent\n) (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Hendrik v. Raven 2016-05-29 12:00:51 UTC
Just updated my system to perl 5.24. If I now try to run when I get the following error message:
Invalid range "y-a" in transliteration operator at /usr/bin/when line 2821.
Comment 1 Kent Fredric (IRC: kent\n) (RETIRED) gentoo-dev 2016-06-03 08:13:03 UTC
Did it actually work on a previous Perl? 

The error in question dates back to before 5.8.1 somewhere, so this is not a "new" error message type.

The question is why its happening at all.
Comment 2 Kent Fredric (IRC: kent\n) (RETIRED) gentoo-dev 2016-06-03 08:36:09 UTC
Ok, can confirm. This is a weird case:

1. Firstly, the code is in an if(0) { } , so it shouldn't matter, but it does.
2. The nature of the tr// error should have been happening since sometime before 5.8, but it wasn't, somehow Unicode is implicated:

> $x =~ tr/\x{101}/b-a/;

This code errors since 5.24

but with a non-unicode character on the left hand side, it errors as it aught to. 

Recommended solution: 

Patch out the whole "if( 0 ){ ... }" block, because its not actually needed.
Comment 3 Kent Fredric (IRC: kent\n) (RETIRED) gentoo-dev 2016-06-03 08:39:16 UTC
Created attachment 436280 [details, diff]
patch for when to remove failing dead code.
Comment 4 Kent Fredric (IRC: kent\n) (RETIRED) gentoo-dev 2016-06-03 08:44:55 UTC
This is incidentally exactly what upstream have done.

https://github.com/bcrowell/when/commit/5de0120f2c3b985bf791362e0f7b2f6eaa46f415#diff-df491a4de50739fa9cffdbd4e3f4b4bbL2819
Comment 5 Tim Harder gentoo-dev 2016-08-19 02:39:35 UTC
Fixed in the 1.1.36 in the tree.