RFR: 8356047: [macos] jpackage produces confusing post- and pre- installation PKG scripts [v3]
Alexander Matveev
almatvee at openjdk.org
Fri Sep 26 20:07:19 UTC 2025
On Wed, 28 May 2025 19:53:23 GMT, Alexey Semenyuk <asemenyuk at openjdk.org> wrote:
>> Alexander Matveev has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains four additional commits since the last revision:
>>
>> - Merge remote-tracking branch 'upstream/master' into JDK-8356047
>> - 8356047: [macos] jpackage produces confusing post- and pre- installation PKG scripts [v2]
>> - Merge remote-tracking branch 'upstream/master' into JDK-8356047
>> - 8356047: [macos] jpackage produces confusing post- and pre- installation PKG scripts
>
> src/jdk.jpackage/macosx/classes/jdk/jpackage/internal/MacPkgPackager.java line 358:
>
>> 356: data.put("INSTALL_LOCATION", Path.of("/").resolve(pkg.relativeInstallDir()).toString());
>> 357: data.put("APP_LOCATION", appLocation.toString());
>> 358:
>
> I'd keep the context for custom scripts unchanged. If somebody relies on these variables in their custom scripts, they will stop working after this change.
It is undocumented. To keep it we need to document it first. I do not like idea to keep undocumented variables. Also, `$1` can be used instead of in the scripts. It will only break if application is generated with jpackage which contains this fix and in this case user can update scripts if needed.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/25510#discussion_r2383381127
More information about the core-libs-dev
mailing list