summaryrefslogtreecommitdiff
path: root/eclass
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2014-04-11 08:30:44 +0000
committerMichał Górny <mgorny@gentoo.org>2014-04-11 08:30:44 +0000
commit1432694898e5f9bf0cd0090294d1f263a8b5f2aa (patch)
tree76475b9d0a31ec5ddac57e64b5434c62446ec695 /eclass
parentAdd a mutual blocker on pypy-bin. (diff)
downloadhistorical-1432694898e5f9bf0cd0090294d1f263a8b5f2aa.tar.gz
historical-1432694898e5f9bf0cd0090294d1f263a8b5f2aa.tar.bz2
historical-1432694898e5f9bf0cd0090294d1f263a8b5f2aa.zip
Enable reflinking in multibuild_copy_sources.
Diffstat (limited to 'eclass')
-rw-r--r--eclass/ChangeLog5
-rw-r--r--eclass/multibuild.eclass11
2 files changed, 13 insertions, 3 deletions
diff --git a/eclass/ChangeLog b/eclass/ChangeLog
index 20d71bb83ac3..a94de3f1921c 100644
--- a/eclass/ChangeLog
+++ b/eclass/ChangeLog
@@ -1,6 +1,9 @@
# ChangeLog for eclass directory
# Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.1203 2014/04/10 16:43:25 mgorny Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.1204 2014/04/11 08:30:44 mgorny Exp $
+
+ 11 Apr 2014; Michał Górny <mgorny@gentoo.org> multibuild.eclass:
+ Enable reflinking in multibuild_copy_sources.
10 Apr 2014; Michał Górny <mgorny@gentoo.org> multibuild.eclass:
Use a more portable and clobbering "cp" call for multibuild_merge_root().
diff --git a/eclass/multibuild.eclass b/eclass/multibuild.eclass
index 03e6ad0f6df7..4dc9b19444fe 100644
--- a/eclass/multibuild.eclass
+++ b/eclass/multibuild.eclass
@@ -1,6 +1,6 @@
# Copyright 1999-2014 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/multibuild.eclass,v 1.15 2014/04/10 16:43:25 mgorny Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/multibuild.eclass,v 1.16 2014/04/11 08:30:44 mgorny Exp $
# @ECLASS: multibuild
# @MAINTAINER:
@@ -213,9 +213,16 @@ multibuild_copy_sources() {
einfo "Will copy sources from ${_MULTIBUILD_INITIAL_BUILD_DIR}"
+ local cp_args=()
+ if cp --reflink=auto --version &>/dev/null; then
+ # enable reflinking if possible to make this faster
+ cp_args+=( --reflink=auto )
+ fi
+
_multibuild_create_source_copy() {
einfo "${MULTIBUILD_VARIANT}: copying to ${BUILD_DIR}"
- cp -pr "${_MULTIBUILD_INITIAL_BUILD_DIR}" "${BUILD_DIR}" || die
+ cp -pr "${cp_args[@]}" \
+ "${_MULTIBUILD_INITIAL_BUILD_DIR}" "${BUILD_DIR}" || die
}
multibuild_foreach_variant _multibuild_create_source_copy