Bug 61890 - make-hash-tools.pl: Perl 5.14 compatibility
: make-hash-tools.pl: Perl 5.14 compatibility
Status: RESOLVED FIXED
: WebKit
Tools / Tests
: 528+ (Nightly build)
: PC Linux
: P2 Minor
Assigned To:
:
:
:
:
  Show dependency treegraph
 
Reported: 2011-06-01 16:05 PST by
Modified: 2011-07-18 10:15 PST (History)


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


Note

You need to log in before you can comment on or make changes to this bug.


Description From 2011-06-01 16:05:47 PST
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
------- Comment #1 From 2011-06-20 05:11:15 PST -------
(In reply to comment #0)
> Created an attachment (id=95682) [details] [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 From 2011-06-20 05:24:30 PST -------
I agree with Andras, given/when can make <5.10 perl users unhappy, 
so if/elsif would be better here.
------- Comment #3 From 2011-06-20 05:50:18 PST -------
Created an attachment (id=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 From 2011-06-20 05:52:27 PST -------
Created an attachment (id=97789) [details]
proposed patch with newline
------- Comment #5 From 2011-06-20 05:59:24 PST -------
(From update of attachment 97789 [details])
LGTM, r=me
------- Comment #6 From 2011-06-20 06:01:12 PST -------
(From update of attachment 97789 [details])
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 From 2011-06-20 06:03:06 PST -------
(From update of attachment 97789 [details])
One more attempt to cq+
------- Comment #8 From 2011-06-20 06:06:17 PST -------
(From update of attachment 97789 [details])
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 From 2011-06-20 06:10:22 PST -------
Eric, have you got any idea why CQ rejects this patch?
------- Comment #10 From 2011-06-20 11:18:53 PST -------
No, but we saw one other such rejection the other day.  Maybe one of the bots got sick.
------- Comment #11 From 2011-06-20 11:36:33 PST -------
(From update of attachment 97789 [details])
Let's have another try.
------- Comment #12 From 2011-06-20 11:40:15 PST -------
(From update of attachment 97789 [details])
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 From 2011-06-20 11:51:21 PST -------
(From update of attachment 97789 [details])
Clearing flags on attachment: 97789

Committed r89265: <http://trac.webkit.org/changeset/89265>
------- Comment #14 From 2011-06-20 11:51:28 PST -------
All reviewed patches have been landed.  Closing bug.
------- Comment #15 From 2011-06-20 11:53:36 PST -------
I think our handling of Ossy's name is broken again.