Patchwork [U-Boot] checkpatch.pl: Do not hardcode perl path

login
register
mail settings
Submitter Jagannadha Sutradharudu Teki
Date June 16, 2013, 4:10 p.m.
Message ID <d5fa0d2c-f46c-49a9-83e6-948b9437712e@CH1EHSMHS008.ehs.local>
Download mbox | patch
Permalink /patch/251711/
State Not Applicable
Headers show

Comments

Jagannadha Sutradharudu Teki - June 16, 2013, 4:10 p.m.
From: Joel A Fernandes [mailto:agnel.joel@gmail.com]
Sent: 16 June 2013 21:15
To: Jagannadha Sutradharudu Teki
Cc: u-boot@lists.denx.de; Tom Rini
Subject: Re: [U-Boot] [PATCH] checkpatch.pl: Do not hardcode perl path



On Sunday, June 16, 2013, Jagannadha Sutradharudu Teki wrote:
From: Jagannadha Sutradharudu Teki <jagannadh.teki@gmail.com>

checkpatch.pl<http://checkpatch.pl> requires perl v5.10.0 to run but it
doesn't require to place in /usr/bin/perl
Use env to ensure that the interpreter used is the
first one on environment's $PATH on system with
several versions of perl installed.

Signed-off-by: Jagannadha Sutradharudu Teki <jagannadh.teki@gmail.com>
---
 tools/checkpatch.pl<http://checkpatch.pl> | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)


 # (c) 2001, Dave Jones. (the file handling bit)
 # (c) 2005, Joel Schopp <jschopp@austin.ibm.com> (the ugly bit)
 # (c) 2007,2008, Andy Whitcroft <apw@uk.ibm.com> (new conditions, test suite)
 # (c) 2008-2010 Andy Whitcroft <apw@canonical.com>
 # Licensed under the terms of the GNU GPL License version 2

+use warnings;
 use strict;

 my $P = $0;
--
1.8.3

Patch

diff --git a/tools/checkpatch.pl<http://checkpatch.pl> b/tools/checkpatch.pl<http://checkpatch.pl>
index 896e2bc..8dc5b9c 100755
--- a/tools/checkpatch.pl<http://checkpatch.pl>
+++ b/tools/checkpatch.pl<http://checkpatch.pl>
@@ -1,10 +1,11 @@ 
-#!/usr/bin/perl -w
+#!/usr/bin/env perl

Would it not work to pass in the -w here?

Yes it will not work just to pass -w
It's taking -w as a file.

Thanks,
Jagan.

Joel