public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
Search results ordered by [date|relevance]  view[summary|nested|Atom feed]
thread overview below | download: 
* [gentoo-dev] [PATCH 1/2] multibuild.eclass: remove dead userland_BSD
@ 2022-01-08 17:37 99% David Seifert
  0 siblings, 0 replies; 1+ results
From: David Seifert @ 2022-01-08 17:37 UTC (permalink / raw
  To: gentoo-dev; +Cc: David Seifert

Signed-off-by: David Seifert <soap@gentoo.org>
---
 eclass/multibuild.eclass | 35 ++++++++++++-----------------------
 1 file changed, 12 insertions(+), 23 deletions(-)

diff --git a/eclass/multibuild.eclass b/eclass/multibuild.eclass
index 37568ebf87c..cbd48b1eeb6 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
-- 
2.34.1



^ permalink raw reply related	[relevance 99%]

Results 1-1 of 1 | reverse | options above
-- pct% links below jump to the message on this page, permalinks otherwise --
2022-01-08 17:37 99% [gentoo-dev] [PATCH 1/2] multibuild.eclass: remove dead userland_BSD David Seifert

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox