[OE-core] [PATCH] autogen: fix autoopts script generation to handle shebang

Alexander Kanavin alexander.kanavin at linux.intel.com
Mon May 15 11:53:07 UTC 2017


On 05/15/2017 12:01 PM, Belal, Awais wrote:

> Really did not get the first question. Regarding PERL being set
> twice, I am just trying to manipulate it to the actual host binary,
> is there a better way? 'which perl' or 'env perl' will only point to
> the symlink under HOSTTOOLS.


1. You are replacing

#!/usr/bin/env perl

with

#! <result of calling `readlink -f ${PERL}`>

The first line will guarantee a short shebang, while the second one may 
result in a very long shebang which may hit the hardcoded kernel limit. 
So you are effectively adding the problem instead of fixing it (and 
there is nothing to be fixed).

2. You do this:

PERL=`which perl`
PERL=`readlink -f ${PERL}`

There is no need for the first line, if PERL is immediately set to 
something else.


Alex



More information about the Openembedded-core mailing list