The fragment of JPackageCommand.outputBundle() function at https://github.com/openjdk/jdk/blame/236c71cad9fa269518456c11edcfb353bbfc084d/test/jdk/tools/jpackage/helpers/jdk/jpackage/test/JPackageCommand.java#L402 is as follows:
/**
* Returns path to output bundle of configured jpackage command.
*
* If this is build image command, returns path to application image directory.
*
* Special case for masOS. If this is sign app image command, returns value
* of "--app-image".
*/
public Path outputBundle() {
final String bundleName;
if (isImagePackageType()) {
if (TKit.isOSX() && hasArgument("--app-image")) {
return Path.of(getArgumentValue("--app-image", () -> null));
}
...
The javadoc states that if jpackage signs an app image on OSX, the function should return the value of the "--app-image" parameter.
However, the code does not check for the presence of the "--mac-sign" parameter. Instead, it tests for the "--app-image" parameter. Is this a typo?
The changes to JPackageCommand.outputBundle() function were introduced inJDK-8293462 patch.
Should it be like this:
---
if (TKit.isOSX() && hasArgument("--mac-sign")) {
return getArgumentValue("--app-image", () -> null, Path::of);
}
---
?
/**
* Returns path to output bundle of configured jpackage command.
*
* If this is build image command, returns path to application image directory.
*
* Special case for masOS. If this is sign app image command, returns value
* of "--app-image".
*/
public Path outputBundle() {
final String bundleName;
if (isImagePackageType()) {
if (TKit.isOSX() && hasArgument("--app-image")) {
return Path.of(getArgumentValue("--app-image", () -> null));
}
...
The javadoc states that if jpackage signs an app image on OSX, the function should return the value of the "--app-image" parameter.
However, the code does not check for the presence of the "--mac-sign" parameter. Instead, it tests for the "--app-image" parameter. Is this a typo?
The changes to JPackageCommand.outputBundle() function were introduced in
Should it be like this:
---
if (TKit.isOSX() && hasArgument("--mac-sign")) {
return getArgumentValue("--app-image", () -> null, Path::of);
}
---
?
- relates to
-
JDK-8293462 [macos] app image signature invalid when creating DMG or PKG from post processed signed image
- Resolved
- links to
-
Commit(master) openjdk/jdk/34655c67
-
Review(master) openjdk/jdk/21776