Skip to content

Only remove the preinstalled JDKs that are installed (ruby-4.1) - #10132

Closed
zev wants to merge 1 commit into
jruby:ruby-4.1from
zev:ruby-4.1-only-remove-installed-jdks
Closed

zev wants to merge 1 commit into
jruby:ruby-4.1from
zev:ruby-4.1-only-remove-installed-jdks

Conversation

@zev

@zev zev commented Nov 21, 2026

Copy link
Copy Markdown
Contributor

Port of #9952 (672889b by Mattias Reichel) to ruby-4.1.

Every PR against ruby-4.1 currently fails almost all of its Linux jobs at the first step:

Error: Unable to locate package temurin-8-jdk
##[error]Process completed with exit code 100.

The ubuntu-26.04 runner image no longer has Temurin 8, and an apt remove that names a missing package fails without removing anything. master (#9952) and jruby-10.0 (cadb2db) already remove only the JDKs that dpkg knows about. ruby-4.1 was last synced on Nov 11, so it still has the old command. Open PRs on this branch (#10116, #10117, #10118, #10125, #10127, #10128) show roughly 100 failed checks each because of it.

Change

sudo apt remove temurin-8-jdk temurin-11-jdk temurin-17-jdk becomes the same line master uses:

sudo apt remove $(dpkg-query -W -f '${Package} ' temurin-8-jdk temurin-11-jdk temurin-17-jdk 2>/dev/null)

That's in .github/actions/bootstrap/action.yml and in the two ci.yml jobs that still have their own copy of the step. The original commit doesn't cherry-pick cleanly, because it edited 12 copies in ci.yml before the bootstrap action existed. These three lines are now identical to master's.

Merging master into ruby-4.1 would also fix this, along with #10047's retry changes. This PR is the minimal fix in case that merge isn't planned soon.

🤖 Generated with Claude Code

The ubuntu-26.04 runner image has Temurin 11, 17, 21 and 25, but not
8. On it, "apt remove temurin-8-jdk temurin-11-jdk temurin-17-jdk"
fails with "Unable to locate package temurin-8-jdk" and removes none
of them, so every job with that step fails at the start.

The step now removes only the listed JDKs that dpkg knows about.

Port of 672889b by Mattias Reichel (jruby#9952) to ruby-4.1. This branch
already has the shared bootstrap action, so the change goes there and
in the two ci.yml steps that still have their own copy.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@headius

headius commented Nov 21, 2026

Copy link
Copy Markdown
Member

I think what I just merged into 10.0 and master addresses this. I'll merge it forward.

@headius headius added this to the Invalid or Duplicate milestone Nov 21, 2026
@headius headius closed this Nov 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants