mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-09-24 04:59:14 -07:00
java-utils-2.eclass: automatic dependency on java-dep-check
When emerging a java package with JAVA_PKG_STRICT enabled, there are messages telling the user to install java-dep-check and javatoolkit for running further checks: "Install dev-java/java-dep-check for dependency checking" "Unable to perform class version checks as" "class-version-verify.py is unavailable" "Please install dev-java/javatoolkit." This commit adds both java-dep-check and javatoolkit to BDEPEND. To avoid circular dependencies with java-dep-check, it also adds a new eclass variable JAVA_DISABLE_DEPEND_ON_JAVA_DEP_CHECK to be put pre-inherit to dependencies of java-dep-check. Closes: https://bugs.gentoo.org/831341 Signed-off-by: Volkmar W. Pogatzki <gentoo@pogatzki.net> Part-of: https://github.com/gentoo/gentoo/pull/42182 Signed-off-by: Miroslav Šulc <fordfrog@gentoo.org>
This commit is contained in:
committed by
Miroslav Šulc
parent
cd31b95b26
commit
e7bcf9b350
@@ -1,4 +1,4 @@
|
||||
# Copyright 2004-2024 Gentoo Authors
|
||||
# Copyright 2004-2025 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
# @ECLASS: java-utils-2.eclass
|
||||
@@ -295,6 +295,13 @@ JAVA_PKG_COMPILERS_CONF=${JAVA_PKG_COMPILERS_CONF:="/etc/java-config-2/build/com
|
||||
# )
|
||||
# @CODE
|
||||
|
||||
# @ECLASS_VARIABLE: JAVA_DISABLE_DEPEND_ON_JAVA_DEP_CHECK
|
||||
# @PRE_INHERIT
|
||||
# @DEFAULT_UNSET
|
||||
# @DESCRIPTION:
|
||||
# Helper variable to be used in packages which would otherwise have circular
|
||||
# dependencies with dev-java/java-dep-check once this is forced to BDEPEND.
|
||||
|
||||
# @FUNCTION: java-pkg_doexamples
|
||||
# @USAGE: [--subdir <subdir>] <file1/dir1> [<file2> ...]
|
||||
# @DESCRIPTION:
|
||||
@@ -2996,6 +3003,16 @@ is-java-strict() {
|
||||
return $?
|
||||
}
|
||||
|
||||
# Avoid having to emerge them separately every time
|
||||
if is-java-strict; then
|
||||
# Needed for java-pkg_verify-classes
|
||||
BDEPEND="${BDEPEND} dev-java/javatoolkit"
|
||||
if [[ -z "${JAVA_DISABLE_DEPEND_ON_JAVA_DEP_CHECK}" ]]; then
|
||||
# Needed for java-utils-2_pkg_preinst
|
||||
BDEPEND="${BDEPEND} dev-java/java-dep-check:0" || die
|
||||
fi
|
||||
fi
|
||||
|
||||
# @FUNCTION: java-pkg_clean
|
||||
# @DESCRIPTION:
|
||||
# Java package cleaner function. This will remove all *.class and *.jar
|
||||
|
||||
Reference in New Issue
Block a user