commit: 948452cac4bbf02003eae5279684ead0495b0e8d Author: Viorel Munteanu <ceamac <AT> gentoo <DOT> org> AuthorDate: Thu Jun 1 06:47:41 2023 +0000 Commit: Viorel Munteanu <ceamac <AT> gentoo <DOT> org> CommitDate: Thu Jun 1 08:23:49 2023 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=948452ca
sys-apps/busybox: ignore cp -n error in postinstall Before coreutils-9.2, cp -n (noclobber) would return success even if skipping files. Now it returns an error. See also https://debbugs.gnu.org/cgi/bugreport.cgi?bug=62572 This is used in postinstall with the purpose of not replacing already existing utilities with links to busybox, so failing here is expected. Unfortunately we cannot distinguish this from other errors. Closes: https://bugs.gentoo.org/907432 Closes: https://github.com/gentoo/gentoo/pull/31257 Signed-off-by: Viorel Munteanu <ceamac <AT> gentoo.org> sys-apps/busybox/busybox-1.34.1-r1.ebuild | 6 ++++-- sys-apps/busybox/busybox-1.34.1-r2.ebuild | 4 +++- sys-apps/busybox/busybox-1.35.0-r1.ebuild | 6 ++++-- sys-apps/busybox/busybox-1.35.0-r2.ebuild | 4 +++- sys-apps/busybox/busybox-1.36.1.ebuild | 4 +++- sys-apps/busybox/busybox-9999.ebuild | 4 +++- 6 files changed, 20 insertions(+), 8 deletions(-) diff --git a/sys-apps/busybox/busybox-1.34.1-r1.ebuild b/sys-apps/busybox/busybox-1.34.1-r1.ebuild index 130d7bd7dce9..18721b1191da 100644 --- a/sys-apps/busybox/busybox-1.34.1-r1.ebuild +++ b/sys-apps/busybox/busybox-1.34.1-r1.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2022 Gentoo Authors +# Copyright 1999-2023 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 # See `man savedconfig.eclass` for info on how to use USE=savedconfig. @@ -348,7 +348,9 @@ pkg_postinst() { cd "${T}" || die mkdir _install tar xf busybox-links.tar -C _install || die - echo n | cp -ivpPR _install/* "${ROOT}"/ || die "copying links for ${x} failed" + # 907432: cp -n returns error if it skips any file, but that is expected here + # TODO: check if a new coreutils release has a replacement option + cp -nvpPR _install/* "${ROOT}"/ fi if use sep-usr ; then diff --git a/sys-apps/busybox/busybox-1.34.1-r2.ebuild b/sys-apps/busybox/busybox-1.34.1-r2.ebuild index cf4da6210564..e316fec96042 100644 --- a/sys-apps/busybox/busybox-1.34.1-r2.ebuild +++ b/sys-apps/busybox/busybox-1.34.1-r2.ebuild @@ -355,7 +355,9 @@ pkg_postinst() { cd "${T}" || die mkdir _install tar xf busybox-links.tar -C _install || die - echo n | cp -ivpPR _install/* "${ROOT}"/ || die "copying links for ${x} failed" + # 907432: cp -n returns error if it skips any file, but that is expected here + # TODO: check if a new coreutils release has a replacement option + cp -nvpPR _install/* "${ROOT}"/ fi if use sep-usr ; then diff --git a/sys-apps/busybox/busybox-1.35.0-r1.ebuild b/sys-apps/busybox/busybox-1.35.0-r1.ebuild index d08c6a826b69..830157ef61f4 100644 --- a/sys-apps/busybox/busybox-1.35.0-r1.ebuild +++ b/sys-apps/busybox/busybox-1.35.0-r1.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2022 Gentoo Authors +# Copyright 1999-2023 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 # See `man savedconfig.eclass` for info on how to use USE=savedconfig. @@ -349,7 +349,9 @@ pkg_postinst() { cd "${T}" || die mkdir _install tar xf busybox-links.tar -C _install || die - echo n | cp -ivpPR _install/* "${ROOT}"/ || die "copying links for ${x} failed" + # 907432: cp -n returns error if it skips any file, but that is expected here + # TODO: check if a new coreutils release has a replacement option + cp -nvpPR _install/* "${ROOT}"/ fi if use sep-usr ; then diff --git a/sys-apps/busybox/busybox-1.35.0-r2.ebuild b/sys-apps/busybox/busybox-1.35.0-r2.ebuild index 711785eae12b..b120932ad31f 100644 --- a/sys-apps/busybox/busybox-1.35.0-r2.ebuild +++ b/sys-apps/busybox/busybox-1.35.0-r2.ebuild @@ -356,7 +356,9 @@ pkg_postinst() { cd "${T}" || die mkdir _install tar xf busybox-links.tar -C _install || die - echo n | cp -ivpPR _install/* "${ROOT}"/ || die "copying links for ${x} failed" + # 907432: cp -n returns error if it skips any file, but that is expected here + # TODO: check if a new coreutils release has a replacement option + cp -nvpPR _install/* "${ROOT}"/ fi if use sep-usr ; then diff --git a/sys-apps/busybox/busybox-1.36.1.ebuild b/sys-apps/busybox/busybox-1.36.1.ebuild index a9f3d85703c7..8a030a712279 100644 --- a/sys-apps/busybox/busybox-1.36.1.ebuild +++ b/sys-apps/busybox/busybox-1.36.1.ebuild @@ -346,7 +346,9 @@ pkg_postinst() { cd "${T}" || die mkdir _install tar xf busybox-links.tar -C _install || die - echo n | cp -ivpPR _install/* "${ROOT}"/ || die "copying links for ${x} failed" + # 907432: cp -n returns error if it skips any file, but that is expected here + # TODO: check if a new coreutils release has a replacement option + cp -nvpPR _install/* "${ROOT}"/ fi if use sep-usr ; then diff --git a/sys-apps/busybox/busybox-9999.ebuild b/sys-apps/busybox/busybox-9999.ebuild index a9f3d85703c7..8a030a712279 100644 --- a/sys-apps/busybox/busybox-9999.ebuild +++ b/sys-apps/busybox/busybox-9999.ebuild @@ -346,7 +346,9 @@ pkg_postinst() { cd "${T}" || die mkdir _install tar xf busybox-links.tar -C _install || die - echo n | cp -ivpPR _install/* "${ROOT}"/ || die "copying links for ${x} failed" + # 907432: cp -n returns error if it skips any file, but that is expected here + # TODO: check if a new coreutils release has a replacement option + cp -nvpPR _install/* "${ROOT}"/ fi if use sep-usr ; then
