[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

[SCM] Debian package checker branch, master, updated. 2.5.12-9-g049acbf



The following commit has been merged in the master branch:
commit 049acbf7bfc57e5ca703885faac9cc82c5db965d
Author: Niels Thykier <niels@thykier.net>
Date:   Sat Apr 20 12:16:39 2013 +0200

    L::Util: Pass --reflink=auto to cp
    
    On file systems that support it (e.g. btrfs) this should make copy_dir
    faster by reducing the copying to just creating a new inode.
    
    Signed-off-by: Niels Thykier <niels@thykier.net>

diff --git a/debian/changelog b/debian/changelog
index e644283..9e4040d 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -19,6 +19,7 @@ lintian (2.5.13) UNRELEASED; urgency=low
       of returning 0).
     + [NT] Require that the input file is present for
       read_dpkg_control and get_deb_control.
+    + [NT] In copy_dir, pass --reflink=auto to cp.
 
  -- Niels Thykier <niels@thykier.net>  Tue, 16 Apr 2013 18:24:45 +0200
 
diff --git a/lib/Lintian/Util.pm b/lib/Lintian/Util.pm
index cb6a8ec..eb08378 100644
--- a/lib/Lintian/Util.pm
+++ b/lib/Lintian/Util.pm
@@ -898,7 +898,10 @@ Convient way of calling I<cp -a ARGS>.
 =cut
 
 sub copy_dir {
-    return spawn(undef, ['cp', '-a', '--', @_]);
+    # --reflink=auto (coreutils >= 7.5).  On FS that support it,
+    # make a CoW copy of the data; otherwise fallback to a regular
+    # deep copy.
+    return spawn(undef, ['cp', '-a', '--reflink=auto', '--', @_]);
 }
 
 =item gunzip_file (IN, OUT)

-- 
Debian package checker


Reply to: