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 E1563158094 for ; Wed, 13 Jul 2022 02:31:25 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id A18D6E0D6F; Wed, 13 Jul 2022 02:31:24 +0000 (UTC) Received: from smtp.gentoo.org (mail.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 88C66E0D6F for ; Wed, 13 Jul 2022 02:31:24 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (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 smtp.gentoo.org (Postfix) with ESMTPS id 9DCF83410F3 for ; Wed, 13 Jul 2022 02:31:22 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id C6D9B52B for ; Wed, 13 Jul 2022 02:31:20 +0000 (UTC) From: "Anna Vyalkova" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Anna Vyalkova" Message-ID: <1657673916.241e405c26ffa4f415358a23448ca7e57aab2ea9.cybertailor@gentoo> Subject: [gentoo-commits] repo/proj/guru:dev commit in: eclass/ X-VCS-Repository: repo/proj/guru X-VCS-Files: eclass/R-packages.eclass X-VCS-Directories: eclass/ X-VCS-Committer: cybertailor X-VCS-Committer-Name: Anna Vyalkova X-VCS-Revision: 241e405c26ffa4f415358a23448ca7e57aab2ea9 X-VCS-Branch: dev Date: Wed, 13 Jul 2022 02:31:20 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 4f1ba2f3-acda-4e07-bf01-445e3b19df7b X-Archives-Hash: 1863b930cac5534d70a7f36a07b1ccb9 commit: 241e405c26ffa4f415358a23448ca7e57aab2ea9 Author: Anna (cybertailor) Vyalkova sysrq in> AuthorDate: Wed Jul 13 00:46:10 2022 +0000 Commit: Anna Vyalkova sysrq in> CommitDate: Wed Jul 13 00:58:36 2022 +0000 URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=241e405c R-packages.eclass: simplify pkg_postinst optfeature already checks whether a package has been installed. Signed-off-by: Anna (cybertailor) Vyalkova sysrq.in> eclass/R-packages.eclass | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/eclass/R-packages.eclass b/eclass/R-packages.eclass index 55febf2ba..32bbce52d 100644 --- a/eclass/R-packages.eclass +++ b/eclass/R-packages.eclass @@ -22,6 +22,13 @@ esac EXPORT_FUNCTIONS src_unpack src_prepare src_configure src_compile src_install pkg_postinst +# @ECLASS_VARIABLE: SUGGESTED_PACKAGES +# @DEPRECATED: none +# @DEFAULT_UNSET +# @DESCRIPTION: +# String variable containing the list of upstream suggested packages. Consider +# using optfeature directly instead for more concise descriptions. + CRAN_PV=${CRAN_PV:-$PV} CRAN_PN=${CRAN_PN:-${PN//_/.}} @@ -40,7 +47,6 @@ SLOT="0" DEPEND="dev-lang/R" RDEPEND="${DEPEND}" -BDEPEND="sys-apps/pkgcore" # @FUNCTION: _movelink # @INTERNAL @@ -146,17 +152,12 @@ R-packages_src_install() { } # @FUNCTION: R-packages_pkg_postinst +# @DEPRECATED: optfeature # @DESCRIPTION: -# function that will prompt to install the suggested packages if they exist +# Prompt to install the upstream suggested packages (if they exist). Consider +# calling "optfeature" directly instead for concise descriptions. R-packages_pkg_postinst() { - if [[ ${MERGE_TYPE} != binary ]]; then - if [[ -v SUGGESTED_PACKAGES ]]; then - for p in ${SUGGESTED_PACKAGES} ; do - pexist="$(pquery -n1 ${p} 2>/dev/null || die)" - if [[ -n "${pexist}" ]]; then - optfeature "having the upstream suggested package" "${p}" - fi - done - fi - fi + for p in ${SUGGESTED_PACKAGES}; do + optfeature "having the upstream suggested package" "${p}" + done }