Skip Menu |

This queue is for tickets about the DBIx-Class CPAN distribution.

Report information
The Basics
Id: 106810
Status: rejected
Priority: 0/
Queue: DBIx-Class

People
Owner: Nobody in particular
Requestors: dolmen [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in:
  • 0.082820
  • 0.082899_14
Fixed in: (no value)



Subject: dbicadmin: shebang should be /usr/bin/perl
Hi

Here is the first line of script/dbicadmin in DBIx-Class-0.082820 (and DBIx-Class-0.082899_14):
    #!/usr/bin/env perl

The use of /usr/bin/env stops EUMM from replacing the shebang with the real perl location during install. This can lead to situations where the dbicadmin script runs with a perl that doesn't have the DBIx::Class modules installed.

The fix is to replace the shebang with:
     #!/usr/bin/perl

-- 
Olivier Mengué - http://perlresume.org/DOLMEN - https://gratipay.com/dolmen/
Or better, replace with:
      #!perl


-- 
Olivier Mengué - http://perlresume.org/DOLMEN - https://gratipay.com/dolmen/
Subject: Re: [rt.cpan.org #106810] dbicadmin: shebang should be /usr/bin/perl
Date: Tue, 01 Sep 2015 17:21:48 +0200
To: bug-DBIx-Class [...] rt.cpan.org
From: Peter Rabbitson <ribasushi [...] cpan.org>
On 09/01/2015 04:58 PM, Olivier Mengué via RT wrote: Show quoted text
> The use of /usr/bin/env stops EUMM from replacing the shebang with the real > perl location during install.
Last I checked this was *not* the case, and .../env was the preferred way for both perlbrew and local::lib based deployments. Please double check this on #toolchain, as I will not have a chance in the next ~1 week to look into this.
On Tue Sep 01 10:58:35 2015, DOLMEN wrote: Show quoted text
> Hi > > Here is the first line of script/dbicadmin in DBIx-Class-0.082820 (and > DBIx-Class-0.082899_14): > #!/usr/bin/env perl > > The use of /usr/bin/env stops EUMM from replacing the shebang with the > real > perl location during install. This can lead to situations where the > dbicadmin > script runs with a perl that doesn't have the DBIx::Class modules > installed.
16:54 <@mst> once you're stacking local::libs etc. you need to make sure you're using the right versions of scripts 16:54 <@mst> and if people build against a perl in one location then re-use the local::lib against another it breaks stuff 16:55 <@rjbs> Why would env be preferred? 16:56 <@mst> because we've had situations where we moved an install from one place to another and had e.g. an identical perl at a different path 16:56 <@mst> you can't re-use 16:57 <@mst> removing env will break deployments that currently work
On 2015-09-01 08:22:04, RIBASUSHI wrote: Show quoted text
> On 09/01/2015 04:58 PM, Olivier Mengué via RT wrote:
> > The use of /usr/bin/env stops EUMM from replacing the shebang with > > the real > > perl location during install.
> > Last I checked this was *not* the case, and .../env was the preferred > way for both perlbrew and local::lib based deployments. Please double > check this on #toolchain, as I will not have a chance in the next ~1 > week to look into this.
dolmen is correct -- #!/usr/bin/env perl is not rewritten during the install process, but #!/usr/bin/perl is. (Note that I am including old EUMMs in this statement, as I assume it is not acceptable to configure-require a recent EUMM.) https://github.com/Perl-Toolchain-Gang/ExtUtils-MakeMaker/issues/58
Note if you can prove that such deployments are extremely rare, this could be re-opened. But right now it seems like you're asking us to exchange one set of problems for another.
Show quoted text
> dolmen is correct -- #!/usr/bin/env perl is not rewritten during the > install process, but #!/usr/bin/perl is.
dolmen is correct about the current behaviour. Whether we should make this change and risk breaking currently-working deployments is the question. Re-opening while that's discussed.
Le 2015-09-01 18:08:54, MSTROUT a écrit :
Show quoted text
> Whether we should make this change and risk breaking currently-working
> deployments is the question.

I understand your point of view.
As not really affected by the issue (I'm not really using DBIx::Class, I was just trying to have some consistency in perl scipts installed in my $PATH from CPAN), I am not strongly opiniated about this issue.

Show quoted text
> Re-opening while that's discussed.

Closing. The only right fix would be to implement the SHEBANG_FIX=0 in installers as suggested in the GitHub issue.

-- 
Olivier Mengué - http://perlresume.org/DOLMEN - https://gratipay.com/dolmen/