public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
From: David Seifert <soap@gentoo.org>
To: gentoo-dev@lists.gentoo.org
Cc: David Seifert <soap@gentoo.org>
Subject: [gentoo-dev] [PATCH 1/2] multibuild.eclass: remove dead userland_BSD
Date: Sat,  8 Jan 2022 18:37:50 +0100	[thread overview]
Message-ID: <20220108173751.69375-1-soap@gentoo.org> (raw)

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



             reply	other threads:[~2022-01-08 17:38 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-08 17:37 David Seifert [this message]
2022-01-08 17:37 ` [gentoo-dev] [PATCH 2/2] apache-2.eclass: remove dead userland_BSD David Seifert
2022-01-08 18:19 ` [gentoo-dev] [PATCH 1/2] multibuild.eclass: " Ulrich Mueller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220108173751.69375-1-soap@gentoo.org \
    --to=soap@gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox