[dh-make-perl] 01/01: use system("mv ...") when cross device directory move is expected otherwise just use rename

Tamas Csillag cstamas-guest at alioth.debian.org
Tue Sep 3 20:20:37 UTC 2013


This is an automated email from the git hooks/post-receive script.

cstamas-guest pushed a commit to branch master
in repository dh-make-perl.

commit a1755cd8f70cf0c7426383463d14de1ecc3cfe00
Author: CSILLAG Tamas <cstamas at cstamas.hu>
Date:   Tue Sep 3 22:18:10 2013 +0200

    use system("mv ...") when cross device directory move is expected
    otherwise just use rename
---
 lib/DhMakePerl/Command/make.pm |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/DhMakePerl/Command/make.pm b/lib/DhMakePerl/Command/make.pm
index 2b9cda0..29bf00e 100644
--- a/lib/DhMakePerl/Command/make.pm
+++ b/lib/DhMakePerl/Command/make.pm
@@ -336,7 +336,7 @@ sub setup_dir {
 
         # rename existing directory
         if ( -d $new_maindir
-            && system( "mv", "$new_maindir", "$new_maindir.$$" ) == 0 )
+            && rename $new_maindir, "$new_maindir.$$" )
         {
             print '=' x 70, "\n";
             print
@@ -574,7 +574,7 @@ sub rename_to_debian_package_dir {
       return;
     }
 
-    system("mv $maindir $newmaindir") == 0 or die "rename failed: $self->main_dir to $newmaindir";
+    rename $maindir, $newmaindir or die "rename failed: $self->main_dir to $newmaindir";
     $self->main_dir( $newmaindir );
     return;
 }

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-perl/packages/dh-make-perl.git



More information about the Pkg-perl-cvs-commits mailing list