Skip Menu |

This queue is for tickets about the ORLite-Migrate CPAN distribution.

Report information
The Basics
Id: 44808
Status: resolved
Priority: 0/
Queue: ORLite-Migrate

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

Bug Information
Severity: Important
Broken in: 0.02
Fixed in: (no value)



Subject: Schema migration fails when running under PAR
When running under PAR and the original perl interpreter (as found on the build machine) is not available on the target machine the relevant detection fails. Probe::Perl->find_perl_interpreter will return undef in this case. This also leads to a failing migration (stumbled upon when trying the binary download of padre 0.33m which tried to migrate the schema with a simple migrate-7.pl) A quick solution is attached, just requiring a sane installation where perl is in the path. Of course Probe::Perl should be fixed to return the correct interpreter when running under PAR (whatever that is then). Proposed patch (against 0.02) attached (although not perfect it's better then the current situation).
Subject: ORLite-Migrate-0.02-patch-perl.diff
diff -u -r ORLite-Migrate-0.02/Changes ORLite-Migrate-0.02.new/Changes --- ORLite-Migrate-0.02/Changes 2009-02-15 15:02:21.000000000 +0100 +++ ORLite-Migrate-0.02.new/Changes 2009-04-06 00:46:59.000000000 +0200 @@ -1,5 +1,8 @@ Changes for Perl extension ORLite-Migrate + - Use a default perl interpreter "perl" in case Probe::Perl fails + (e.g. running under PAR and original perl is not available) + 0.02 Mon 16 Feb 2009 - Updating to Module::Install 0.79 - Support creation of database in subdirectories diff -u -r ORLite-Migrate-0.02/lib/ORLite/Migrate.pm ORLite-Migrate-0.02.new/lib/ORLite/Migrate.pm --- ORLite-Migrate-0.02/lib/ORLite/Migrate.pm 2009-02-15 15:02:21.000000000 +0100 +++ ORLite-Migrate-0.02.new/lib/ORLite/Migrate.pm 2009-04-06 00:45:53.000000000 +0200 @@ -100,7 +100,7 @@ require IPC::Run3; # Execute each script - my $perl = Probe::Perl->find_perl_interpreter; + my $perl = Probe::Perl->find_perl_interpreter || "perl"; my $pushd = File::pushd::pushd($timeline); foreach my $patch ( @plan ) { my $stdin = "$file\n";
Subject: Re: [rt.cpan.org #44808] Schema migration fails when running under PAR
Date: Mon, 6 Apr 2009 12:22:52 +1000
To: bug-ORLite-Migrate [...] rt.cpan.org
From: Adam Kennedy <adamkennedybackup [...] gmail.com>
I'll wait for a fix to Prove::Perl (and I'll talk to tsee) Adam K 2009/4/6 Roland Lammel via RT <bug-ORLite-Migrate@rt.cpan.org>: Show quoted text
> Sun Apr 05 18:58:57 2009: Request 44808 was acted upon. > Transaction: Ticket created by LAMMEL >       Queue: ORLite-Migrate >     Subject: Schema migration fails when running under PAR >   Broken in: 0.02 >    Severity: Important >       Owner: Nobody >  Requestors: lammel@cpan.org >      Status: new >  Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=44808 > > > > When running under PAR and the original perl interpreter (as found on > the build machine) is not available on the target machine the relevant > detection fails. Probe::Perl->find_perl_interpreter will return undef in > this case. > > This also leads to a failing migration (stumbled upon when trying the > binary download of padre 0.33m which tried to migrate the schema with a > simple migrate-7.pl) > > A quick solution is attached, just requiring a sane installation where > perl is in the path. Of course Probe::Perl should be fixed to return the > correct interpreter when running under PAR (whatever that is then). > > Proposed patch (against 0.02) attached (although not perfect it's better > then the current situation). >
Subject: Re: [rt.cpan.org #44808] Schema migration fails when running under PAR
Date: Mon, 6 Apr 2009 09:18:00 +0200
To: bug-ORLite-Migrate [...] rt.cpan.org
From: Roland Lammel <lammel [...] cpan.org>
Another option wouldbe to really source the file and use eval to execute the perl code. This would remove the dependency on Probe::Perl and work with whatever runtime fiddling (PAR and friends) is going on, es the running interpreter is just reused. +rl On Mon, Apr 6, 2009 at 04:23, Adam Kennedy via RT <bug-ORLite-Migrate@rt.cpan.org> wrote: Show quoted text
> <URL: https://rt.cpan.org/Ticket/Display.html?id=44808 > > > I'll wait for a fix to Prove::Perl (and I'll talk to tsee) > > Adam K > > 2009/4/6 Roland Lammel via RT <bug-ORLite-Migrate@rt.cpan.org>:
>> Sun Apr 05 18:58:57 2009: Request 44808 was acted upon. >> Transaction: Ticket created by LAMMEL >>       Queue: ORLite-Migrate >>     Subject: Schema migration fails when running under PAR >>   Broken in: 0.02 >>    Severity: Important >>       Owner: Nobody >>  Requestors: lammel@cpan.org >>      Status: new >>  Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=44808 > >> >> >> When running under PAR and the original perl interpreter (as found on >> the build machine) is not available on the target machine the relevant >> detection fails. Probe::Perl->find_perl_interpreter will return undef in >> this case. >> >> This also leads to a failing migration (stumbled upon when trying the >> binary download of padre 0.33m which tried to migrate the schema with a >> simple migrate-7.pl) >> >> A quick solution is attached, just requiring a sane installation where >> perl is in the path. Of course Probe::Perl should be fixed to return the >> correct interpreter when running under PAR (whatever that is then). >> >> Proposed patch (against 0.02) attached (although not perfect it's better >> then the current situation). >>
> >
-- Roland Lammel QuikIT - IT Lösungen - flexibel und schnell Web: http://www.quikit.at Email: info@quikit.at "Enjoy your job, make lots of money, work within the law. Choose any two."
Subject: Re: [rt.cpan.org #44808] Schema migration fails when running under PAR
Date: Mon, 6 Apr 2009 19:29:47 +1000
To: bug-ORLite-Migrate [...] rt.cpan.org
From: Adam Kennedy <adamkennedybackup [...] gmail.com>
Executing every script inside the same process isn't going to work, as each script may need to do varied and differing things in order to achieve their task. Process isolation is essential. Adam K 2009/4/6 Roland Lammel via RT <bug-ORLite-Migrate@rt.cpan.org>: Show quoted text
>       Queue: ORLite-Migrate >  Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=44808 > > > Another option wouldbe to really source the file and use eval to > execute the perl code. > This would remove the dependency on Probe::Perl and work with whatever > runtime fiddling (PAR and friends) is going on, es the running > interpreter is just reused. > > +rl > > On Mon, Apr 6, 2009 at 04:23, Adam Kennedy via RT > <bug-ORLite-Migrate@rt.cpan.org> wrote:
>> <URL: https://rt.cpan.org/Ticket/Display.html?id=44808 > >> >> I'll wait for a fix to Prove::Perl (and I'll talk to tsee) >> >> Adam K >> >> 2009/4/6 Roland Lammel via RT <bug-ORLite-Migrate@rt.cpan.org>:
>>> Sun Apr 05 18:58:57 2009: Request 44808 was acted upon. >>> Transaction: Ticket created by LAMMEL >>>       Queue: ORLite-Migrate >>>     Subject: Schema migration fails when running under PAR >>>   Broken in: 0.02 >>>    Severity: Important >>>       Owner: Nobody >>>  Requestors: lammel@cpan.org >>>      Status: new >>>  Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=44808 > >>> >>> >>> When running under PAR and the original perl interpreter (as found on >>> the build machine) is not available on the target machine the relevant >>> detection fails. Probe::Perl->find_perl_interpreter will return undef in >>> this case. >>> >>> This also leads to a failing migration (stumbled upon when trying the >>> binary download of padre 0.33m which tried to migrate the schema with a >>> simple migrate-7.pl) >>> >>> A quick solution is attached, just requiring a sane installation where >>> perl is in the path. Of course Probe::Perl should be fixed to return the >>> correct interpreter when running under PAR (whatever that is then). >>> >>> Proposed patch (against 0.02) attached (although not perfect it's better >>> then the current situation). >>>
>> >>
> > > > -- > Roland Lammel > QuikIT - IT Lösungen - flexibel und schnell > Web: http://www.quikit.at > Email: info@quikit.at > > "Enjoy your job, make lots of money, work within the law. Choose any two." > >
I believe this is now resolved by ORLite::Migrate::Perl, which inlines the Probe::Perl alternative from PAdre.