Gentoo Archives: gentoo-commits

From: "Michał Górny" <mgorny@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: eclass/
Date: Sun, 16 Jan 2022 17:40:58
Message-Id: 1642354846.4599272b769a1cfedf906a12743af149bf31e2f7.mgorny@gentoo
1 commit: 4599272b769a1cfedf906a12743af149bf31e2f7
2 Author: David Seifert <soap <AT> gentoo <DOT> org>
3 AuthorDate: Wed Jan 12 10:06:10 2022 +0000
4 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
5 CommitDate: Sun Jan 16 17:40:46 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4599272b
7
8 multibuild.eclass: remove dead userland_BSD
9
10 Signed-off-by: David Seifert <soap <AT> gentoo.org>
11 Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>
12
13 eclass/multibuild.eclass | 35 ++++++++++++-----------------------
14 1 file changed, 12 insertions(+), 23 deletions(-)
15
16 diff --git a/eclass/multibuild.eclass b/eclass/multibuild.eclass
17 index 37568ebf87cc..cbd48b1eeb6d 100644
18 --- a/eclass/multibuild.eclass
19 +++ b/eclass/multibuild.eclass
20 @@ -1,4 +1,4 @@
21 -# Copyright 1999-2021 Gentoo Authors
22 +# Copyright 1999-2022 Gentoo Authors
23 # Distributed under the terms of the GNU General Public License v2
24
25 # @ECLASS: multibuild.eclass
26 @@ -238,33 +238,22 @@ multibuild_merge_root() {
27 local dest=${2}
28
29 local ret
30 + local cp_args=()
31
32 - if use userland_BSD; then
33 - # Most of BSD variants fail to copy broken symlinks, #447370
34 - # also, they do not support --version
35 -
36 - tar -C "${src}" -f - -c . \
37 - | tar -x -f - -C "${dest}"
38 - [[ ${PIPESTATUS[*]} == '0 0' ]]
39 - ret=${?}
40 + if cp -a --version &>/dev/null; then
41 + cp_args+=( -a )
42 else
43 - local cp_args=()
44 -
45 - if cp -a --version &>/dev/null; then
46 - cp_args+=( -a )
47 - else
48 - cp_args+=( -P -R -p )
49 - fi
50 -
51 - if cp --reflink=auto --version &>/dev/null; then
52 - # enable reflinking if possible to make this faster
53 - cp_args+=( --reflink=auto )
54 - fi
55 + cp_args+=( -P -R -p )
56 + fi
57
58 - cp "${cp_args[@]}" "${src}"/. "${dest}"/
59 - ret=${?}
60 + if cp --reflink=auto --version &>/dev/null; then
61 + # enable reflinking if possible to make this faster
62 + cp_args+=( --reflink=auto )
63 fi
64
65 + cp "${cp_args[@]}" "${src}"/. "${dest}"/
66 + ret=${?}
67 +
68 if [[ ${ret} -ne 0 ]]; then
69 die "${MULTIBUILD_VARIANT:-(unknown)}: merging image failed."
70 fi