This queue is for tickets about the CPAN CPAN distribution.

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

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

BugTracker
Severity:
Normal
Broken in:
1.88_62
Fixed in:
(no value)



Subject: trimming cache directory on Win32
With the current (1.88_63) CPAN.pm, I find on Win32 that the cache directory doesn't get trimmed when it gets too full because the comparison: File::Basename::dirname($dir) eq $CPAN::Config->{build_dir} fails on Win32, due to a difference only in the directory separator (eg, this concludes C:\Perl\cpan and C:\Perl/cpan aren't equal). I've attached a diff against the latest CPAN.pm from svn which resolves this.
Subject: cpan_cache.diff
Index: CPAN.pm =================================================================== --- CPAN.pm (revision 1335) +++ CPAN.pm (working copy) @@ -1360,7 +1360,8 @@ sub force_clean_cache { my($self,$dir) = @_; return unless -e $dir; - unless (File::Basename::dirname($dir) eq $CPAN::Config->{build_dir}) { + unless (File::Spec->canonpath(File::Basename::dirname($dir)) + eq File::Spec->canonpath($CPAN::Config->{build_dir})) { $CPAN::Frontend->mywarn("Directory '$dir' not below $CPAN::Config->{build_dir}, ". "will not remove\n"); $CPAN::Frontend->mysleep(5); @@ -5535,7 +5536,8 @@ sub store_persistent_state { my($self) = @_; my $dir = $self->{build_dir}; - unless (File::Basename::dirname($dir) eq $CPAN::Config->{build_dir}) { + unless (File::Spec->canonpath(File::Basename::dirname($dir)) + eq File::Spec->canonpath($CPAN::Config->{build_dir})) { $CPAN::Frontend->mywarn("Directory '$dir' not below $CPAN::Config->{build_dir}, ". "will not store persistent state\n"); return;
Subject: Re: [rt.cpan.org #23710] trimming cache directory on Win32
Date: Thu, 30 Nov 2006 21:55:21 +0100
To: bug-CPAN@rt.cpan.org
From: andreas.koenig.gmwojprw@franz.ak.mind.de (Andreas J. Koenig)
Show quoted text
>>>>> On Wed, 29 Nov 2006 22:24:49 -0500, " via RT" <bug-CPAN@rt.cpan.org> said:
Show quoted text
> Wed Nov 29 22:24:47 2006: Request 23710 was acted upon. > Transaction: Ticket created by RKOBES > Queue: CPAN > Subject: trimming cache directory on Win32 > Broken in: 1.88_62 > Severity: Normal > Owner: Nobody > Requestors: RKOBES@cpan.org > Status: new > Ticket <URL: http://rt.cpan.org/Ticket/Display.html?id=23710 >
Show quoted text
> With the current (1.88_63) CPAN.pm, I find on Win32 that the cache > directory doesn't get trimmed when it gets too full because the comparison: > File::Basename::dirname($dir) eq $CPAN::Config->{build_dir} > fails on Win32, due to a difference only in the directory separator (eg, > this concludes C:\Perl\cpan and C:\Perl/cpan aren't equal). I've > attached a diff against the latest CPAN.pm from svn which resolves this.
Thanks, aplied :) -- andreas
Fixed in 1.88_64 Thanks!


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.