Browse Source

package/openjdk: properly handle legacy for renamed options

Commit "a610bf9967 package/openjdk{-bin}: bump version to 17.0.1+12"
tried to add legacy handling but the new symbols are part of a choice,
and Kconfig does not enforce the select of a option from a choice.

Update the legacy entry for 2021.11, following the example described in
the beginning of the file.

Cc: Tudor Holton <buildroot@tudorholton.com>
Signed-off-by: Ricardo Martincoski <ricardo.martincoski@gmail.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
(cherry picked from commit a97a4a74aa993b09b958639e2276e7f5cf7a75d2)
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
Ricardo Martincoski 2 years ago
parent
commit
0734a1da83
2 changed files with 6 additions and 2 deletions
  1. 4 2
      Config.in.legacy
  2. 2 0
      package/openjdk/Config.in

+ 4 - 2
Config.in.legacy

@@ -716,18 +716,20 @@ comment "Legacy options removed in 2021.11"
 config BR2_OPENJDK_VERSION_LTS
 config BR2_OPENJDK_VERSION_LTS
 	bool "OpenJDK LTS version was renamed to OpenJDK 11"
 	bool "OpenJDK LTS version was renamed to OpenJDK 11"
 	select BR2_LEGACY
 	select BR2_LEGACY
-	select BR2_PACKAGE_OPENJDK_VERSION_11
 	help
 	help
 	  The LTS version option was renamed to OpenJDK 11 to make it
 	  The LTS version option was renamed to OpenJDK 11 to make it
 	  clear what LTS version is.
 	  clear what LTS version is.
+# Note: BR2_OPENJDK_VERSION_LTS is still referenced from
+# package/openjdk/Config.in
 
 
 config BR2_OPENJDK_VERSION_LATEST
 config BR2_OPENJDK_VERSION_LATEST
 	bool "OpenJDK latest version (16.x) was removed"
 	bool "OpenJDK latest version (16.x) was removed"
 	select BR2_LEGACY
 	select BR2_LEGACY
-	select BR2_PACKAGE_OPENJDK_VERSION_17
 	help
 	help
 	  OpenJDK 16.x is no longer mainted, so the option has been
 	  OpenJDK 16.x is no longer mainted, so the option has been
 	  removed. Use OpenJDK 17.x instead.
 	  removed. Use OpenJDK 17.x instead.
+# Note: BR2_OPENJDK_VERSION_LATEST is still referenced from
+# package/openjdk/Config.in
 
 
 config BR2_PACKAGE_MPD_TIDAL
 config BR2_PACKAGE_MPD_TIDAL
 	bool "mpd tidal option removed"
 	bool "mpd tidal option removed"

+ 2 - 0
package/openjdk/Config.in

@@ -57,6 +57,8 @@ if BR2_PACKAGE_OPENJDK
 
 
 choice
 choice
 	prompt "openjdk version"
 	prompt "openjdk version"
+	default BR2_PACKAGE_OPENJDK_VERSION_11 if BR2_OPENJDK_VERSION_LTS # legacy
+	default BR2_PACKAGE_OPENJDK_VERSION_17 if BR2_OPENJDK_VERSION_LATEST # legacy
 	default BR2_PACKAGE_OPENJDK_VERSION_17
 	default BR2_PACKAGE_OPENJDK_VERSION_17
 	help
 	help
 	  Select the version of OpenJDK you wish to use.
 	  Select the version of OpenJDK you wish to use.