On Tue, 25 Aug 2026 18:20:56 GMT, Alexey Semenyuk <[email protected]> wrote:
> Add optional validation of the value of the `--linux-menu-group` option using > the desktop-file-validate command. > > If the command is not available, jpackage doesn't validate the value of the > `--linux-menu-group` option. > > Additionally, this command enhances validation of desktop files created by > jpackage in the test code. It turned out that jpackage was producing desktop > files that failed validation with some versions of the desktop-file-validate > command. It was a minor incompatibility due to missing the trailing semicolon > (;) in the value of the `MimeType` and `Categories` entries. Fixed > accordingly. > > --------- > - [x] I confirm that I make this contribution in accordance with the [OpenJDK > Interim AI Policy](https://openjdk.org/legal/ai). Looks good overall with some small comments. src/jdk.jpackage/linux/classes/jdk/jpackage/internal/LinuxPackageBuilder.java line 211: > 209: try { > 210: Files.createDirectories(probeFile.getParent()); > 211: Files.write(probeFile, List.of( Do we need to delete this file? Also, should we add real values for name, exec, etc...? Do we want to validate entire file with all values we creating? src/jdk.jpackage/linux/classes/jdk/jpackage/internal/LinuxPackageBuilder.java line 224: > 222: try { > 223: Executor.of("desktop-file-validate", > probeFile.toString()).executeExpectSuccess(); > 224: return; We do not need `return` here and at line 233. ------------- PR Review: https://git.openjdk.org/jdk/pull/32523#pullrequestreview-5025619851 PR Review Comment: https://git.openjdk.org/jdk/pull/32523#discussion_r3858692157 PR Review Comment: https://git.openjdk.org/jdk/pull/32523#discussion_r3858676493
