summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Seifert <soap@gentoo.org>2022-01-12 11:06:10 +0100
committerMichał Górny <mgorny@gentoo.org>2022-01-16 18:40:46 +0100
commit4599272b769a1cfedf906a12743af149bf31e2f7 (patch)
tree56f5ba3f232ad7915a34b43e1efa99e33b7e50c0 /eclass/multibuild.eclass
parentmultilib-build.eclass: remove EAPI 5 (diff)
downloadgentoo-4599272b769a1cfedf906a12743af149bf31e2f7.tar.gz
gentoo-4599272b769a1cfedf906a12743af149bf31e2f7.tar.bz2
gentoo-4599272b769a1cfedf906a12743af149bf31e2f7.zip
multibuild.eclass: remove dead userland_BSD
Signed-off-by: David Seifert <soap@gentoo.org> Signed-off-by: Michał Górny <mgorny@gentoo.org>
Diffstat (limited to 'eclass/multibuild.eclass')
-rw-r--r--eclass/multibuild.eclass35
1 files changed, 12 insertions, 23 deletions
diff --git a/eclass/multibuild.eclass b/eclass/multibuild.eclass
index 37568ebf87cc..cbd48b1eeb6d 100644
--- a/eclass/multibuild.eclass
+++ b/eclass/multibuild.eclass
@@ -1,4 +1,4 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
# @ECLASS: multibuild.eclass
@@ -238,33 +238,22 @@ multibuild_merge_root() {
local dest=${2}
local ret
+ local cp_args=()
- if use userland_BSD; then
- # Most of BSD variants fail to copy broken symlinks, #447370
- # also, they do not support --version
-
- tar -C "${src}" -f - -c . \
- | tar -x -f - -C "${dest}"
- [[ ${PIPESTATUS[*]} == '0 0' ]]
- ret=${?}
+ if cp -a --version &>/dev/null; then
+ cp_args+=( -a )
else
- local cp_args=()
-
- if cp -a --version &>/dev/null; then
- cp_args+=( -a )
- else
- cp_args+=( -P -R -p )
- fi
-
- if cp --reflink=auto --version &>/dev/null; then
- # enable reflinking if possible to make this faster
- cp_args+=( --reflink=auto )
- fi
+ cp_args+=( -P -R -p )
+ fi
- cp "${cp_args[@]}" "${src}"/. "${dest}"/
- ret=${?}
+ if cp --reflink=auto --version &>/dev/null; then
+ # enable reflinking if possible to make this faster
+ cp_args+=( --reflink=auto )
fi
+ cp "${cp_args[@]}" "${src}"/. "${dest}"/
+ ret=${?}
+
if [[ ${ret} -ne 0 ]]; then
die "${MULTIBUILD_VARIANT:-(unknown)}: merging image failed."
fi