RFR: 8356047: [macos] jpackage produces confusing post- and pre- installation PKG scripts [v4]
Alexey Semenyuk
asemenyuk at openjdk.org
Mon Sep 29 14:54:32 UTC 2025
On Fri, 26 Sep 2025 20:04:58 GMT, Alexander Matveev <almatvee at openjdk.org> wrote:
>> 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.
Even though it is undocumented, somebody might have used it for years when jpackage was a part of JavaFX.
> $1 can be used instead of in the scripts
Is `$1` a synonym for `INSTALL_LOCATION` or `APP_LOCATION`?
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/25510#discussion_r2388276879
More information about the core-libs-dev
mailing list