Skip Menu |

This queue is for tickets about the DBIx-Class-Fixtures CPAN distribution.

Report information
The Basics
Id: 89574
Status: resolved
Priority: 0/
Queue: DBIx-Class-Fixtures

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

Bug Information
Severity: Normal
Broken in: 1.001020
Fixed in: 1.001020



Subject: File::Copy move failing during tests
Tests fail because File::Copy move fails to move sub directories created in /tmp into t/. This seems to be causing a lot of fails on CPAN testers. I suspect it may be due to trying to move across file systems. My patch uses File::Copy::Recursive rmove instead. Once changed all tests pass. I did check the value of $! for the failing move calls and it's "Is a directory". I wasn't able to track down exactly where that's coming from but it's rather cryptic.
Subject: build.log
Download build.log
application/octet-stream 11.3k

Message body not shown because it is not plain text.

Subject: rmove.patch
--- DBIx-Class-Fixtures-1.001020/lib/DBIx/Class/Fixtures.pm 2013-07-20 12:40:41.000000000 -0700 +++ DBIx-Class-Fixtures-1.001020.fixed/lib/DBIx/Class/Fixtures.pm 2013-10-16 12:54:35.006532618 -0700 @@ -12,8 +12,7 @@ use Data::Dump::Streamer; use Data::Visitor::Callback; use File::Path; -use File::Copy::Recursive qw/dircopy/; -use File::Copy qw/move/; +use File::Copy::Recursive qw/dircopy rmove/; use Hash::Merge qw( merge ); use Data::Dumper; use Class::C3::Componentised; @@ -718,7 +717,7 @@ } $self->msg("- moving temp dir to $output_dir"); - move($_, dir($output_dir, $_->relative($_->parent)->stringify)) + rmove($_, dir($output_dir, $_->relative($_->parent)->stringify)) for $tmp_output_dir->children; if (-e $output_dir) {
From: frankschwach [...] yahoo.de
On Wed Oct 16 16:05:50 2013, AGORMAN wrote: Show quoted text
> Tests fail because File::Copy move fails to move sub directories > created in /tmp into t/. > > This seems to be causing a lot of fails on CPAN testers. I suspect it > may be due to trying to move across file systems. My patch uses > File::Copy::Recursive rmove instead. Once changed all tests pass. > > I did check the value of $! for the failing move calls and it's "Is a > directory". I wasn't able to track down exactly where that's coming > from but it's rather cryptic.
Thanks AGORMAN, I had the same problem and fixed it with your patch.
Dammit, just spent 4 hours trying to figure this out. Figured it out. Also created a patch :) This indeed happens when File::Copy tries to copy entire directories across mounts. This is a know issue, reported as far back as 2008 (http://www.perlmonks.org/?node_id=728153). The fix is extremely simple. Shall use dircopy that comes from File::Copy::Recursive and is already used in this distribution. Please merge this, as it is preventing many people from using this module. Many people have tmp mounted on a different fs.
Subject: 0001-Recursively-copy-from-temp-dir-to-target-dir.patch
From 1695e23193d9bba4c230ab6a77a26ac37d352f66 Mon Sep 17 00:00:00 2001 From: moltar <moltar@moltar.net> Date: Fri, 27 Dec 2013 22:01:15 +0200 Subject: [PATCH] Recursively copy from temp dir to target dir. --- lib/DBIx/Class/Fixtures.pm | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/DBIx/Class/Fixtures.pm b/lib/DBIx/Class/Fixtures.pm index 87ff12c..704f8f4 100644 --- a/lib/DBIx/Class/Fixtures.pm +++ b/lib/DBIx/Class/Fixtures.pm @@ -718,8 +718,7 @@ sub dump { } $self->msg("- moving temp dir to $output_dir"); - move($_, dir($output_dir, $_->relative($_->parent)->stringify)) - for $tmp_output_dir->children; + dircopy($tmp_output_dir, $output_dir); if (-e $output_dir) { $self->msg("- clearing tmp dir $tmp_output_dir"); -- 1.8.3.4 (Apple Git-47)
Hi, I just got the maintainer bit on this distribution. Is this still an issue? On Fri Dec 27 15:13:04 2013, ROMANF wrote: Show quoted text
> Dammit, just spent 4 hours trying to figure this out. Figured it out. > Also created a patch :) > > This indeed happens when File::Copy tries to copy entire directories > across mounts. This is a know issue, reported as far back as 2008 > (http://www.perlmonks.org/?node_id=728153). > > The fix is extremely simple. Shall use dircopy that comes from > File::Copy::Recursive and is already used in this distribution. > > Please merge this, as it is preventing many people from using this > module. Many people have tmp mounted on a different fs.
Disregard previous email, i see it's set as fixed, it was left open. Marking resolved. On Fri Dec 27 15:13:04 2013, ROMANF wrote: Show quoted text
> Dammit, just spent 4 hours trying to figure this out. Figured it out. > Also created a patch :) > > This indeed happens when File::Copy tries to copy entire directories > across mounts. This is a know issue, reported as far back as 2008 > (http://www.perlmonks.org/?node_id=728153). > > The fix is extremely simple. Shall use dircopy that comes from > File::Copy::Recursive and is already used in this distribution. > > Please merge this, as it is preventing many people from using this > module. Many people have tmp mounted on a different fs.