This queue is for tickets about the CPAN CPAN distribution.

Report information
The Basics
Id:
102867
Status:
resolved
Priority:
Low/Low
Queue:

People
Owner:
Nobody in particular
Requestors:
zefram [...] fysh.org
Cc:
AdminCc:

BugTracker
Severity:
(no value)
Broken in:
(no value)
Fixed in:
2.14



Subject: sequential build dir names
Date: Wed, 18 Mar 2015 17:23:50 +0000
To: bug-CPAN@rt.cpan.org
From: Zefram <zefram@fysh.org>
More on making build-time output deterministic: CPAN's use of File::Temp to create non-clashing package build dirs makes their names non-deterministic, and they show up in the output if there's a recursive make or similar. The CPAN build dir is not the kind of hostile environment that File::Temp is built to cope with, so the randomisation is really unnecessary. All that's needed there is to try several different names until there is a successful mkdir. The attached patch implements this, changing the suffix from six random alphanumerics to a simple sequence number ranging from 0 to 999. As a bonus, since it no longer uses File::Temp, the backup code for the case where F:T is unusable is no longer required. -zefram

Message body is not shown because sender requested not to inline it.

On 2015-03-18 13:24:03, zefram@fysh.org wrote:
Show quoted text
> More on making build-time output deterministic: CPAN's use of > File::Temp to create non-clashing package build dirs makes their > names non-deterministic, and they show up in the output if there's a > recursive make or similar. The CPAN build dir is not the kind of hostile > environment that File::Temp is built to cope with, so the randomisation is > really unnecessary. All that's needed there is to try several different > names until there is a successful mkdir. The attached patch implements > this, changing the suffix from six random alphanumerics to a simple > sequence number ranging from 0 to 999. As a bonus, since it no longer > uses File::Temp, the backup code for the case where F:T is unusable is > no longer required.
Is Errno::EEXIST available on all platforms? Otherwise, shouldn't the old File::Temp code be used as a fallback?
Subject: Re: [rt.cpan.org #102867] sequential build dir names
Date: Thu, 19 Mar 2015 15:57:35 +0000
To: Slaven_Rezic via RT <bug-CPAN@rt.cpan.org>
From: Zefram <zefram@fysh.org>
Slaven_Rezic via RT wrote:
Show quoted text
>Is Errno::EEXIST available on all platforms?
Should be.
Show quoted text
>Otherwise, shouldn't the old File::Temp code be used as a fallback?
File::Temp itself requires Errno and EEXIST, so that wouldn't be a sensible fallback. I think the fallback that I implemented, of moving on to the next name rather than aborting immediately for non-EEXIST errors, is the best way to handle inability to recognise EEXIST. -zefram
Subject: Re: [rt.cpan.org #102867] sequential build dir names
Date: Sun, 29 Mar 2015 11:56:30 +0200
To: bug-CPAN@rt.cpan.org
From: Andreas Koenig <andreas.koenig.7os6VVqR@franz.ak.mind.de>
Thanks, applied as 2.10-23-g4c758d4 -- andreas


This service runs on Request Tracker, is sponsored by The Perl Foundation, and maintained by Best Practical Solutions.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.