From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 5108A158086 for ; Sat, 8 Jan 2022 17:38:55 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id ED82E2BC036; Sat, 8 Jan 2022 17:38:23 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 1BC702BC01A for ; Sat, 8 Jan 2022 17:38:18 +0000 (UTC) From: David Seifert To: gentoo-dev@lists.gentoo.org Cc: David Seifert Subject: [gentoo-dev] [PATCH 1/2] multibuild.eclass: remove dead userland_BSD Date: Sat, 8 Jan 2022 18:37:50 +0100 Message-Id: <20220108173751.69375-1-soap@gentoo.org> X-Mailer: git-send-email 2.34.1 Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-dev@lists.gentoo.org Reply-to: gentoo-dev@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Archives-Salt: a084cd07-9e45-40c9-9ec4-e38d9f47440e X-Archives-Hash: f925d0f1a3602e5bc555edc37cb52584 Signed-off-by: David Seifert --- 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