Mailinglist Archive: opensuse-factory (826 mails)

< Previous Next >
Re: [opensuse-factory] rpmlint 1.10 about to enter openSUSE Factory
On 2017-10-11 10:21, Dirk Müller wrote:
And for the 2nd parameter: env evaluates your $PATH, so there is no
way for rpm to figure out which interpreter you meant because it
doesn"t know the setting of $PATH at the time the script got executed.
and it would be just as bad it "guessing" wrong than not guessing at

It could evaluate it at build time with a standard $PATH, so if there is
a /usr/bin/python,
#!/usr/bin/env python could be rewritten to

something like

#!/usr/bin/perl -i.bak -p
if($. == 1 &&
m{^#!/usr/bin/env (.*)} &&
(my $fullpath=`which $1 2>/dev/null`)) {
$_ = "#!$fullpath";
To unsubscribe, e-mail: opensuse-factory+unsubscribe@xxxxxxxxxxxx
To contact the owner, e-mail: opensuse-factory+owner@xxxxxxxxxxxx

< Previous Next >
Follow Ups