From 2e6ef25805e608c9eaeb44e7ba7bdd13dfcee65b Mon Sep 17 00:00:00 2001 From: "Volkmar W. Pogatzki" Date: Fri, 17 Feb 2023 09:52:52 +0100 Subject: [PATCH 1/2] java-utils-2.eclass: default to default_src_prepare for future EAPI MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Presently patches from a PATCHES array are not getting applied unless "default" or "eapply_user" is set in the ebuild. In cases where nothing else needs to be prepared it still needs src_prepare in the ebuild src_prepare() { default } With this change, starting from EAPI 9 this will no longer be needed. In cases where any other changes are done in the prepare phase it would only need java-pkg-2_src_prepare be added: src_prepare() { java-pkg-2_src_prepare cp, rm, mv, sed or other changes } Bug: https://bugs.gentoo.org/780585 Signed-off-by: Volkmar W. Pogatzki Signed-off-by: Miroslav Šulc --- eclass/java-utils-2.eclass | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/eclass/java-utils-2.eclass b/eclass/java-utils-2.eclass index ef72635cd965f..2ccf337b191d5 100644 --- a/eclass/java-utils-2.eclass +++ b/eclass/java-utils-2.eclass @@ -1933,7 +1933,10 @@ etestng() { # src_prepare Searches for bundled jars # Don't call directly, but via java-pkg-2_src_prepare! java-utils-2_src_prepare() { - eapply_user + case ${EAPI:-0} in + [678]) eapply_user ;; + *) default_src_prepare ;; + esac # Check for files in JAVA_RM_FILES array. if [[ ${JAVA_RM_FILES[@]} ]]; then From 0a249fb08e3a498b459e827dd9359509510cf139 Mon Sep 17 00:00:00 2001 From: "Volkmar W. Pogatzki" Date: Fri, 17 Feb 2023 10:36:34 +0100 Subject: [PATCH 2/2] java-utils-2.eclass: use find with -path instead of -wholename MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit according to man page, -wholename is less portable than -path. Signed-off-by: Volkmar W. Pogatzki Closes: https://github.com/gentoo/gentoo/pull/29626 Signed-off-by: Miroslav Šulc --- eclass/java-utils-2.eclass | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eclass/java-utils-2.eclass b/eclass/java-utils-2.eclass index 2ccf337b191d5..c1f42408e4621 100644 --- a/eclass/java-utils-2.eclass +++ b/eclass/java-utils-2.eclass @@ -2947,7 +2947,7 @@ is-java-strict() { java-pkg_clean() { NO_DELETE=() for keep in ${JAVA_PKG_NO_CLEAN[@]}; do - NO_DELETE+=( '!' '-wholename' ${keep} ) + NO_DELETE+=( '!' '-path' ${keep} ) done find "${@}" '(' -name '*.class' -o -name '*.jar' ${NO_DELETE[@]} ')' -type f -delete -print || die }