RFR: 8370100: Redundant .png files in Linux app-image cause unnecessary bloat [v2]

Alexander Matveev almatvee at openjdk.org
Sat Oct 25 04:40:03 UTC 2025


On Fri, 24 Oct 2025 21:42:25 GMT, Alexey Semenyuk <asemenyuk at openjdk.org> wrote:

>> Don't put the default icon (.png) files in the app image on Linux.
>
> Alexey Semenyuk has refreshed the contents of this pull request, and previous commits have been removed. The incremental views will show differences compared to the previous content of the PR. The pull request contains eight new commits since the last revision:
> 
>  - DefaultLauncherIcon: blessed-modifier-order.sh  fix
>  - FileAssociations: revert redundant change
>  - Fix fa icon verification on Linux
>  - LinuxPackagingPipeline, WinPackagingPipeline: remove unused normalizeShortcuts() methods
>  - IconTest: revamp
>  - LinuxHelper: revamp
>  - Don't add the default launcher icon to app image on Linux
>  - Make Launcher interface provide complete information about the source of the launcher icon; Before this change, the function getting a resource for an additional launcher icon took both the additional launcher and the main launcher as input. Now its result doesn't depend on the main launcher.

Can you update JBS description or this PR to describe additional changes? Based on JBS description: `If --icon or --linux-shortcut options are not specified, jpackage should not add .png files to the app image.`. Should it be like 2-3 lines fix?

src/jdk.jpackage/linux/classes/jdk/jpackage/internal/LinuxPackagingPipeline.java line 62:

> 60:         pkg.ifPresent(_ -> {
> 61:             builder.task(LinuxAppImageTaskID.LAUNCHER_ICONS).noaction().add();
> 62:         });

Can you explain what this code do? We already have `LAUNCHER_ICONS` task at line 55. Why we need a second one and without action?

src/jdk.jpackage/share/classes/jdk/jpackage/internal/ApplicationBuilder.java line 175:

> 173:     }
> 174: 
> 175:     static <T extends Launcher> ApplicationLaunchers normalizeIcons(

Can you explain why we need this code?

-------------

PR Review: https://git.openjdk.org/jdk/pull/27928#pullrequestreview-3379594814
PR Review Comment: https://git.openjdk.org/jdk/pull/27928#discussion_r2462503934
PR Review Comment: https://git.openjdk.org/jdk/pull/27928#discussion_r2462528898


More information about the core-libs-dev mailing list