Skip to content

UnixPB: Update Regex For JDK symlinking#4295

Merged
steelhead31 merged 2 commits intoadoptium:masterfrom
steelhead31:fix_jdk_install
Mar 13, 2026
Merged

UnixPB: Update Regex For JDK symlinking#4295
steelhead31 merged 2 commits intoadoptium:masterfrom
steelhead31:fix_jdk_install

Conversation

@steelhead31
Copy link
Copy Markdown
Contributor

@steelhead31 steelhead31 commented Mar 13, 2026

Fixes #4294

Update the jdk install role to use more specific matching in the regex.

Checklist

@steelhead31 steelhead31 marked this pull request as ready for review March 13, 2026 14:11
Copy link
Copy Markdown
Member

@sxa sxa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any particular reason not to use .*? Or perhaps u.* for the jdk8 case. I'm not quite sure that the current version will pick it it properly but I could be mistaken.

Sample format: jdk8u482-b08

@steelhead31
Copy link
Copy Markdown
Contributor Author

steelhead31 commented Mar 13, 2026

The issue with

^jdk8* - 8* means - no 8s, or one 8, or many 8s , so in actuality actually matching jdk* and ignoring the 8 element completely..

The new regex works as follows :

  • "^jdk{{ jdk_version }}($|[^0-9].*)"

After jdk8, it allows either:
end of string, or
a non-digit followed by anything

In jdk8u432, the character after 8 is u, which is a non-digit, so it matches.

For version 8 it will match anything like this..

jdk8
jdk8u432
jdk8-temurin
jdk8_anything

And for other versions... it uses the 2nd regex clause

  • "^jdk-{{ jdk_version }}.*"

jdk11.0.27+6
jdk17.x.x.x+x
jdk21.x.x.x+x
jdk25.x.x.x+x

As the first clause is only meant to be used for JDK8, I've simplified the regex.. Suspect I was trying to have 1 regex to handle everything.

@steelhead31 steelhead31 requested a review from sxa March 13, 2026 15:26
Copy link
Copy Markdown
Member

@sxa sxa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM now - thanks

@steelhead31 steelhead31 merged commit 929a92a into adoptium:master Mar 13, 2026
12 of 13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

jdk8u aarch32 builds not finding jdk8 arm boot jdk

3 participants