[Xapian-tickets] [Xapian] #692: Infinite loop when building Search::Xapian with CPANPLUS

Xapian nobody at xapian.org
Wed Nov 4 04:34:44 GMT 2015


#692: Infinite loop when building Search::Xapian with CPANPLUS
----------------------------+---------------------------
 Reporter:  voegelas        |             Owner:  olly
     Type:  defect          |            Status:  closed
 Priority:  normal          |         Milestone:  1.2.22
Component:  Search::Xapian  |           Version:  1.2.21
 Severity:  normal          |        Resolution:  fixed
 Keywords:  perl            |        Blocked By:
 Blocking:                  |  Operating System:  All
----------------------------+---------------------------
Changes (by olly):

 * status:  new => closed
 * resolution:   => fixed
 * milestone:  1.2.x => 1.2.22


Old description:

> When building Search::Xapian with CPANPLUS the script Makefile.PL
> overwrites the Makefile created by ExtUtils::!MakeMaker with a stub
> Makefile as the variables $srcdir and $buildir are defined and identical.
> As a consequence the make command calls itself in an infinite loop. The
> attached patch replaces "if (defined $builddir)" with "if (defined
> $builddir && $builddir ne $srcdir)".
>
> CPANPLUS executes Makefile.PL in the following way:
>
> cd $srcdir
>
> perl -e 'use strict; BEGIN { my $old = select STDERR; $|++; select $old;
> $|++; $0 = shift(@ARGV); my $rv = do($0); die $@ if $@; }'
> $srcdir/Makefile.PL

New description:

 When building Search::Xapian with CPANPLUS the script Makefile.PL
 overwrites the Makefile created by ExtUtils::!MakeMaker with a stub
 Makefile as the variables $srcdir and $buildir are defined and identical.
 As a consequence the make command calls itself in an infinite loop. The
 attached patch replaces "if (defined $builddir)" with "if (defined
 $builddir && $builddir ne $srcdir)".

 CPANPLUS executes Makefile.PL in the following way:

 {{{
 cd $srcdir
 perl -e 'use strict; BEGIN { my $old = select STDERR; $|++; select $old;
 $|++; $0 = shift(@ARGV); my $rv = do($0); die $@ if $@; }'
 $srcdir/Makefile.PL
 }}}

--

Comment:

 Fixed in [3769160f374cfffa3f4d860d14511dc8e6fe7dc5/git].

 Your patch was appreciated, but I actually went for a slightly fancier fix
 which handles any explicit path to the current directory (not just one
 which is exactly the same as what `pwd` outputs), so cases such as this
 also work now:

 {{{
 perl ./Makefile.PL
 }}}

 I tested with the command you gave and it now works, but if my variant
 doesn't work with CPANPLUS for some reason, please let me know.

--
Ticket URL: <http://trac.xapian.org/ticket/692#comment:1>
Xapian <http://xapian.org/>
Xapian



More information about the Xapian-tickets mailing list