mirror of
https://github.com/gentoo-mirror/guru.git
synced 2026-07-22 13:33:32 -04:00
R-packages.eclass: simplify pkg_postinst
optfeature already checks whether a package has been installed. Signed-off-by: Anna (cybertailor) Vyalkova <cyber+gentoo@sysrq.in>
This commit is contained in:
@@ -22,6 +22,13 @@ esac
|
|||||||
|
|
||||||
EXPORT_FUNCTIONS src_unpack src_prepare src_configure src_compile src_install pkg_postinst
|
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_PV=${CRAN_PV:-$PV}
|
||||||
CRAN_PN=${CRAN_PN:-${PN//_/.}}
|
CRAN_PN=${CRAN_PN:-${PN//_/.}}
|
||||||
|
|
||||||
@@ -40,7 +47,6 @@ SLOT="0"
|
|||||||
|
|
||||||
DEPEND="dev-lang/R"
|
DEPEND="dev-lang/R"
|
||||||
RDEPEND="${DEPEND}"
|
RDEPEND="${DEPEND}"
|
||||||
BDEPEND="sys-apps/pkgcore"
|
|
||||||
|
|
||||||
# @FUNCTION: _movelink
|
# @FUNCTION: _movelink
|
||||||
# @INTERNAL
|
# @INTERNAL
|
||||||
@@ -146,17 +152,12 @@ R-packages_src_install() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
# @FUNCTION: R-packages_pkg_postinst
|
# @FUNCTION: R-packages_pkg_postinst
|
||||||
|
# @DEPRECATED: optfeature
|
||||||
# @DESCRIPTION:
|
# @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() {
|
R-packages_pkg_postinst() {
|
||||||
if [[ ${MERGE_TYPE} != binary ]]; then
|
for p in ${SUGGESTED_PACKAGES}; do
|
||||||
if [[ -v SUGGESTED_PACKAGES ]]; then
|
optfeature "having the upstream suggested package" "${p}"
|
||||||
for p in ${SUGGESTED_PACKAGES} ; do
|
done
|
||||||
pexist="$(pquery -n1 ${p} 2>/dev/null || die)"
|
|
||||||
if [[ -n "${pexist}" ]]; then
|
|
||||||
optfeature "having the upstream suggested package" "${p}"
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user