commit: 4599272b769a1cfedf906a12743af149bf31e2f7
Author: David Seifert <soap <AT> gentoo <DOT> org>
AuthorDate: Wed Jan 12 10:06:10 2022 +0000
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Sun Jan 16 17:40:46 2022 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4599272b
multibuild.eclass: remove dead userland_BSD
Signed-off-by: David Seifert <soap <AT> gentoo.org>
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>
eclass/multibuild.eclass | 35 ++++++++++++-----------------------
1 file 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