eclass/multibuild: Sync with Gentoo

It's from Gentoo commit 8f952fad8ad5152d7877944c537f469f25d0a7af.
This commit is contained in:
Flatcar Buildbot 2023-08-07 07:12:20 +00:00 committed by Krzesimir Nowak
parent 41942b21eb
commit 42d4c79083

View File

@ -170,8 +170,7 @@ multibuild_copy_sources() {
_multibuild_create_source_copy() { _multibuild_create_source_copy() {
einfo "${MULTIBUILD_VARIANT}: copying to ${BUILD_DIR}" einfo "${MULTIBUILD_VARIANT}: copying to ${BUILD_DIR}"
# enable reflinking if possible to make this faster cp -p -R \
cp -p -R --reflink=auto \
"${_MULTIBUILD_INITIAL_BUILD_DIR}" "${BUILD_DIR}" || die "${_MULTIBUILD_INITIAL_BUILD_DIR}" "${BUILD_DIR}" || die
} }
@ -190,8 +189,7 @@ multibuild_merge_root() {
local src=${1} local src=${1}
local dest=${2} local dest=${2}
# enable reflinking if possible to make this faster cp -a "${src}"/. "${dest}"/ || die "${MULTIBUILD_VARIANT:-(unknown)}: merging image failed"
cp -a --reflink=auto "${src}"/. "${dest}"/ || die "${MULTIBUILD_VARIANT:-(unknown)}: merging image failed"
rm -rf "${src}" || die rm -rf "${src}" || die
} }