Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 602852

Summary: dev-util/idea-ultimate-2016.3.1.163.9166.29[system-jdk] with lighter download
Product: Gentoo Linux Reporter: Dennis Schridde <dschridde+gentoobugs>
Component: Current packagesAssignee: Gert Pellin <gert>
Status: RESOLVED FIXED    
Severity: normal CC: alicef, proxy-maint
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description Dennis Schridde 2016-12-16 17:50:05 UTC
Right now dev-util/idea-ultimate-2016.3.1.163.9166.29[-custom-jdk] downloads the (large) full tarball including the JDK and later deletes it.

I suggest two things:
1. Change the naming of useflags so that -custom-jdk becomes +system-jdk.
2. If +system-jdk is set, download the lighter tarball from [1] instead of the large tarball from [2]. Notice the "linuxWithoutJDK" platform instead of "linux".

[1]: http://www.jetbrains.com/idea/download/download-thanks.html?platform=linuxWithoutJDK&code=IIC
[2]: http://www.jetbrains.com/idea/download/download-thanks.html?platform=linux&code=IIC
Comment 1 Arisu Tachibana Gentoo Infrastructure gentoo-dev 2017-01-24 18:38:25 UTC
custom-jdk is now downloading installing and using the jetbrains jdk instead of the system one.

no need to change flag name

the option is disabled by default
Comment 2 Dennis Schridde 2017-01-26 22:35:59 UTC
(In reply to Alice Ferrazzi from comment #1)
> custom-jdk is now downloading installing and using the jetbrains jdk instead
> of the system one.
> 
> no need to change flag name
> 
> the option is disabled by default

Looking at the state of the Gentoo repository at 96cd190085e1d74e036b42b77df5fb02a23ab71b, it still appears that the ebuild first downloads the complete (with JDK) tarball and then `rm -r jre`, `if ! use custom-jdk`. This is true for both dev-util/idea-ultimate and .../idea-community. Please clarify what exactly was changed.

My suggestion was to set SRC_URI to the following, instead of first downloading the JDK and then deleting it:
```
SRC_URI="
!custom-jdk? ( https://download-cf.jetbrains.com/idea/${MY_PN}IC-${MY_PV}-no-jdk.tar.gz )
custom-jdk? ( https://download-cf.jetbrains.com/idea/${MY_PN}IC-${MY_PV}.tar.gz )
"
```

The other suggestion was to name the corresponding USE-flag "system-jdk" (you can prefix it with + to enable it by default: IUSE="+system-jdk"), because that appears to follow the general naming convention for a USE-flag that toggles unbundling. Lots of ebuilds have a system-somelib USE-flag, that switches the software from using the bundled somelib to using the system somelib, if enabled.