Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 728790 - dev-java/openjfx-11.0.7_p1: potentially logic-changing "ture" typo
Summary: dev-java/openjfx-11.0.7_p1: potentially logic-changing "ture" typo
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Georgy Yakovlev
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-06-19 17:26 UTC by Hank Leininger
Modified: 2020-08-30 23:00 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Hank Leininger 2020-06-19 17:26:14 UTC
openjfx-11.0.7_p1.ebuild has a typo in the java VM detection code, appears twice:

        if has_version --host-root dev-java/openjdk:${SLOT}; then
                export JAVA_HOME=${EPREFIX}/usr/$(get_libdir)/openjdk-${SLOT}
                export JDK_HOME="${JAVA_HOME}"
                export ANT_RESPECT_JAVA_HOME=ture
                                             ^^^^

        else
                if [[ ${MERGE_TYPE} != "binary" ]]; then
                        JDK_HOME=$(best_version --host-root dev-java/openjdk-bin:${SLOT})
                        [[ -n ${JDK_HOME} ]] || die "Build VM not found!"
                        JDK_HOME=${JDK_HOME#*/}
                        JDK_HOME=${EPREFIX}/opt/${JDK_HOME%-r*}
                        export JDK_HOME
                        export JAVA_HOME="${JDK_HOME}"
                        export ANT_RESPECT_JAVA_HOME=ture
                                                     ^^^^
                fi
        fi

It looks like this was first introduced in openjfx-11.0.3_p1.ebuild, and then carried forward in subsequent openjfx-11.0.6_p2.ebuild, openjfx-11.0.7_p0.ebuild, and openjfx-11.0.7_p1.ebuild

I can't find the code that actually reads the ANT_RESPECT_JAVA_HOME variable; maybe it is simply testing if the variable is set and so interprets any value as truth.

This has then been copy-pasted into other Java ebuilds in bugzilla (but none that have hit the tree yet as far as I can tell), such as work on an updated icedtea-web package (#715316).
Comment 1 Larry the Git Cow gentoo-dev 2020-08-30 22:59:00 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b5f10f9e818ff21a58476933fd4c60906a7a1d78

commit b5f10f9e818ff21a58476933fd4c60906a7a1d78
Author:     Georgy Yakovlev <gyakovlev@gentoo.org>
AuthorDate: 2020-08-30 22:58:32 +0000
Commit:     Georgy Yakovlev <gyakovlev@gentoo.org>
CommitDate: 2020-08-30 22:58:52 +0000

    dev-java/openjfx: fix typo
    
    Closes: https://bugs.gentoo.org/728790
    Package-Manager: Portage-3.0.4, Repoman-3.0.1
    Signed-off-by: Georgy Yakovlev <gyakovlev@gentoo.org>

 dev-java/openjfx/openjfx-11.0.9_p0.ebuild | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
Comment 2 Georgy Yakovlev archtester gentoo-dev 2020-08-30 23:00:14 UTC
yeah according to my testing it checks the presence.

for some reason I've fixed it already, just noticed it was not the case. Maybe I git stashed it during updates and missed.

thanks for catching.