Skip Menu |

This queue is for tickets about the Module-Build CPAN distribution.

Report information
The Basics
Id: 67893
Status: resolved
Priority: 0/
Queue: Module-Build

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

Bug Information
Severity: Normal
Broken in: 0.3603
Fixed in: (no value)



Subject: Fix failing tilde test when run under a UID without a passwd entry
As reported in this Debian bug: <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=624850> some of the tests in t/tilde.t fail when run under a UID without a passwd entry. This can cause the build to fail in some automated environments. The attached patch against 0.3800 fixes this by testing for definedness in the results from getpwuid. A similar patch against 0.3603 has been tested. Thanks, Dominic.
Subject: tilde-test-fix-0.3800.patch
--- Module-Build-0.3800/t/tilde.t.orig 2011-03-05 20:15:41.000000000 +0000 +++ Module-Build-0.3800/t/tilde.t 2011-05-02 11:52:12.000000000 +0100 @@ -46,7 +46,8 @@ unless (defined $home) { my @info = eval { getpwuid $> }; - skip "No home directory for tilde-expansion tests", 15 if $@; + skip "No home directory for tilde-expansion tests", 15 if $@ + or !defined $info[7]; $home = $info[7]; } @@ -95,7 +96,8 @@ # Again, with named users SKIP: { my @info = eval { getpwuid $> }; - skip "No home directory for tilde-expansion tests", 1 if $@; + skip "No home directory for tilde-expansion tests", 1 if $@ + or !defined $info[7] or !defined $info[0]; my ($me, $home) = @info[0,7]; my $expected = "$home/fooxzy";
Thank you. Patched in the repo.