Bug 61890 - make-hash-tools.pl: Perl 5.14 compatibility
Summary: make-hash-tools.pl: Perl 5.14 compatibility
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC Linux
: P2 Minor
Assignee: Andras Becsi
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-06-01 16:05 PDT by Evangelos Foutras
Modified: 2011-07-18 10:15 PDT (History)
9 users (show)

See Also:


Attachments
Patch for make-hash-tools.pl to use given/when instead of switch (1.34 KB, patch)
2011-06-01 16:05 PDT, Evangelos Foutras
no flags Details | Formatted Diff | Diff
proposed patch (1.77 KB, patch)
2011-06-20 05:50 PDT, Andras Becsi
no flags Details | Formatted Diff | Diff
proposed patch with newline (1.74 KB, patch)
2011-06-20 05:52 PDT, Andras Becsi
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Evangelos Foutras 2011-06-01 16:05:47 PDT
Created attachment 95682 [details]
Patch for make-hash-tools.pl to use given/when instead of switch

The make-hash-tools.pl script, executed during the build process, uses the Switch module which has been removed from Perl 5.14.

In Arch Linux, we decided to patch make-hash-tools.pl to use the new given/when keywords available in Perl >= 5.10. I have attached our patch, which is quite trivial. However, you might want to retain compatibility with oder Perl versions, in which case a different patch will be needed (my Perl-fu is weak, and can't make a conditional dependency on either the Switch module or the new given/when syntax).

Other reports of this issue:

Gentoo: http://bugs.gentoo.org/show_bug.cgi?id=364489
FreeBSD: http://www.mail-archive.com/freebsd-ports@freebsd.org/msg33878.html
Comment 1 Andras Becsi 2011-06-20 05:11:15 PDT
(In reply to comment #0)
> Created an attachment (id=95682) [details]
> Patch for make-hash-tools.pl to use given/when instead of switch
> 
> The make-hash-tools.pl script, executed during the build process, uses the Switch module which has been removed from Perl 5.14.
> 
> In Arch Linux, we decided to patch make-hash-tools.pl to use the new given/when keywords available in Perl >= 5.10. I have attached our patch, which is quite trivial. However, you might want to retain compatibility with oder Perl versions, in which case a different patch will be needed (my Perl-fu is weak, and can't make a conditional dependency on either the Switch module or the new given/when syntax).
> 
> Other reports of this issue:
> 
> Gentoo: http://bugs.gentoo.org/show_bug.cgi?id=364489
> FreeBSD: http://www.mail-archive.com/freebsd-ports@freebsd.org/msg33878.html

Because this is a generator script where performance is not an issue since, I think these could be simply changed to if/elif constructions, so we wouldn't need to worry about compatibility.
Comment 2 Csaba Osztrogonác 2011-06-20 05:24:30 PDT
I agree with Andras, given/when can make <5.10 perl users unhappy, 
so if/elsif would be better here.
Comment 3 Andras Becsi 2011-06-20 05:50:18 PDT
Created attachment 97788 [details]
proposed patch

In addition to the previous comments, during the changes on the generation process only two options remained in this script so switch/case is overkill anyhow.
Comment 4 Andras Becsi 2011-06-20 05:52:27 PDT
Created attachment 97789 [details]
proposed patch with newline
Comment 5 Csaba Osztrogonác 2011-06-20 05:59:24 PDT
Comment on attachment 97789 [details]
proposed patch with newline

LGTM, r=me
Comment 6 WebKit Review Bot 2011-06-20 06:01:12 PDT
Comment on attachment 97789 [details]
proposed patch with newline

Rejecting attachment 97789 [details] from commit-queue.

Failed to run "['./Tools/Scripts/webkit-patch', '--status-host=queues.webkit.org', '--bot-id=ec2-cq-01', '--port..." exit_code: 1

Last 500 characters of output:
cripts/webkitpy/common/system/executive.py", line 382, in run_command
    close_fds=self._should_close_fds())
  File "/mnt/git/webkit-commit-queue/Tools/Scripts/webkitpy/common/system/executive.py", line 438, in popen
    return subprocess.Popen(*args, **kwargs)
  File "/usr/lib/python2.6/subprocess.py", line 623, in __init__
    errread, errwrite)
  File "/usr/lib/python2.6/subprocess.py", line 1141, in _execute_child
    raise child_exception
TypeError: execv() arg 2 must contain only strings

Full output: http://queues.webkit.org/results/8911496
Comment 7 Csaba Osztrogonác 2011-06-20 06:03:06 PDT
Comment on attachment 97789 [details]
proposed patch with newline

One more attempt to cq+
Comment 8 WebKit Review Bot 2011-06-20 06:06:17 PDT
Comment on attachment 97789 [details]
proposed patch with newline

Rejecting attachment 97789 [details] from commit-queue.

Failed to run "['./Tools/Scripts/webkit-patch', '--status-host=queues.webkit.org', '--bot-id=ec2-cq-02', '--port..." exit_code: 1

Last 500 characters of output:
cripts/webkitpy/common/system/executive.py", line 382, in run_command
    close_fds=self._should_close_fds())
  File "/mnt/git/webkit-commit-queue/Tools/Scripts/webkitpy/common/system/executive.py", line 438, in popen
    return subprocess.Popen(*args, **kwargs)
  File "/usr/lib/python2.6/subprocess.py", line 623, in __init__
    errread, errwrite)
  File "/usr/lib/python2.6/subprocess.py", line 1141, in _execute_child
    raise child_exception
TypeError: execv() arg 2 must contain only strings

Full output: http://queues.webkit.org/results/8907579
Comment 9 Csaba Osztrogonác 2011-06-20 06:10:22 PDT
Eric, have you got any idea why CQ rejects this patch?
Comment 10 Eric Seidel (no email) 2011-06-20 11:18:53 PDT
No, but we saw one other such rejection the other day.  Maybe one of the bots got sick.
Comment 11 Andras Becsi 2011-06-20 11:36:33 PDT
Comment on attachment 97789 [details]
proposed patch with newline

Let's have another try.
Comment 12 WebKit Review Bot 2011-06-20 11:40:15 PDT
Comment on attachment 97789 [details]
proposed patch with newline

Rejecting attachment 97789 [details] from commit-queue.

Failed to run "['./Tools/Scripts/webkit-patch', '--status-host=queues.webkit.org', '--bot-id=ec2-cq-01', '--port..." exit_code: 1

Last 500 characters of output:
cripts/webkitpy/common/system/executive.py", line 382, in run_command
    close_fds=self._should_close_fds())
  File "/mnt/git/webkit-commit-queue/Tools/Scripts/webkitpy/common/system/executive.py", line 438, in popen
    return subprocess.Popen(*args, **kwargs)
  File "/usr/lib/python2.6/subprocess.py", line 623, in __init__
    errread, errwrite)
  File "/usr/lib/python2.6/subprocess.py", line 1141, in _execute_child
    raise child_exception
TypeError: execv() arg 2 must contain only strings

Full output: http://queues.webkit.org/results/8885010
Comment 13 Andras Becsi 2011-06-20 11:51:21 PDT
Comment on attachment 97789 [details]
proposed patch with newline

Clearing flags on attachment: 97789

Committed r89265: <http://trac.webkit.org/changeset/89265>
Comment 14 Andras Becsi 2011-06-20 11:51:28 PDT
All reviewed patches have been landed.  Closing bug.
Comment 15 Eric Seidel (no email) 2011-06-20 11:53:36 PDT
I think our handling of Ossy's name is broken again.