Bug#525711: libipc-sharedcache-perl: FTBFS: Test failure

Niko Tyni ntyni at debian.org
Sun Apr 26 20:17:39 UTC 2009


tag 525711 patch
thanks

On Sun, Apr 26, 2009 at 08:39:30PM +0200, gregor herrmann wrote:
> On Sun, 26 Apr 2009 10:43:37 -0700, Daniel Schepler wrote:
> 
> > /usr/bin/make test
> > make[1]: Entering directory `/tmp/buildd/libipc-sharedcache-perl-1.3'
> > PERL_DL_NONLAZY=1 /usr/bin/perl "-Iblib/lib" "-Iblib/arch" test.pl
> > 1..9
> > ok 1
> > Failed to create share at blib/lib/IPC/SharedCache.pm line 941
> > make[1]: *** [test_dynamic] Error 2
> > make[1]: Leaving directory `/tmp/buildd/libipc-sharedcache-perl-1.3'
> > make: *** [build-stamp] Error 2
> > dpkg-buildpackage: failure: debian/rules build gave error exit status 2
> 
> Confirmed.
> The test failures can also be seen at
> http://www.cpantesters.org/show/IPC-SharedCache.html#IPC-SharedCache-1.3
> 
> I've I test against an older libipc-sharelite-perl (from stable) the
> tests pass.

This is caused by this change between IPC::ShareLite 0.13 and 0.17:

-The constructor returns the undefined value on error.
+The constructor croaks on error.

[...]

     $self->{share}
       = new_share( $self->{key}, $self->{size}, $self->{flags} )
-      or return undef;
+   or croak "Failed to create share";

The attached simple-minded patch wraps the IPC::ShareLite->new() calls
inside eval {} blocks. This makes the tests pass for me with both 
libipc-sharelite-perl 0.13-1+b1 and 0.17-1. The code probably should
probably report the $@ value on failure or something like that, but
that's probably best left to the upstream author to decide.

I'll update the upstream ticket too.

Cheers,
-- 
Niko Tyni   ntyni at debian.org


More information about the pkg-perl-maintainers mailing list