Page MenuHomeFreeBSD

java/openjdk: Fix pkgsuffix for jre builds
ClosedPublic

Authored by haraldei on Sat, Mar 28, 10:12 AM.
Tags
None
Referenced Files
F151674252: D56123.diff
Thu, Apr 9, 10:44 PM
Unknown Object (File)
Wed, Apr 8, 9:00 PM
Unknown Object (File)
Wed, Apr 8, 10:00 AM
Unknown Object (File)
Thu, Apr 2, 12:05 PM
Unknown Object (File)
Wed, Apr 1, 12:33 AM
Unknown Object (File)
Tue, Mar 31, 8:45 AM
Unknown Object (File)
Tue, Mar 31, 5:06 AM
Unknown Object (File)
Mon, Mar 30, 3:04 AM
Subscribers
None

Details

Summary

java/openjdk25 and openjdk26 would use the same pkgsuffix when building
the jre FLAVOR, making the package names clash.

Reported by: Antoine Brodin <antoine@freebsd.org>
Sponsored by: The FreeBSD Foundation

Diff Detail

Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 71764
Build 68647: arc lint + arc unit

Event Timeline

haraldei created this revision.
This revision is now accepted and ready to land.Sat, Mar 28, 10:23 AM

I responded to the commit mail, but it might be helpful to include this in the review for posterity.

I believe users with openjdk-jre-[25|26] installed won't get the new
packages via a pkg upgrade. Maybe we want something like this in
UPDATING:

20260328:
  AFFECTS: users of java/openjdk25 and java/openjdk26 with the jre flavor
  AUTHOR: haraldei@FreeBSD.org

  The openjdk-jre packages for versions 25 and 26 have been renamed.  Users with
  the old package names installed must run the following /bin/sh script with
  superuser privileges before upgrading.

  jre=$(pkg query -g %n-%v "*openjdk-jre-25*" "*openjdk-jre-26*")
  if echo "$jre" | grep -q "\-25"; then
      on=$(pkg query -g %n "*openjdk-jre-25*")
      nn="openjdk25-jre"
  elif echo "$jre" | grep -q "\-26"; then
      on=$(pkg query -g %n "*openjdk-jre-26*")
      nn="openjdk26-jre"
  fi
  if [ -n "$nn" ]; then
      pkg set -yn "$on":"$nn"
  fi

@jrm Ah, cool! Was worried I had forgotten about something. But I don't want to take credit for your work, so if you want to commit it yourself, that's probably better?

I thought of this as an addendum to your work, and, ideally, we reviewers should have caught it in https://reviews.freebsd.org/D55938. Since you're busy tackling the arm32 and powerpc64 stuff, I'll take care of this.