From: Emmanuel Bourg Date: Sat, 10 Aug 2024 08:08:49 +0000 (+0200) Subject: Makes the generated module-info.java files reproducible (removes a captured build... X-Git-Tag: archive/raspbian/21.0.5_6ea-1+rpi1^2^2~22 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=a6b6de28d42a55f994378f14ae0b185d8fb3f2b6;p=openjdk-21.git Makes the generated module-info.java files reproducible (removes a captured build path) Forwarded: no Gbp-Pq: Name reproducible-module-info.diff --- diff --git a/make/jdk/src/classes/build/tools/module/GenModuleInfoSource.java b/make/jdk/src/classes/build/tools/module/GenModuleInfoSource.java index ce9b94db7..fa34d9222 100644 --- a/make/jdk/src/classes/build/tools/module/GenModuleInfoSource.java +++ b/make/jdk/src/classes/build/tools/module/GenModuleInfoSource.java @@ -156,9 +156,10 @@ public class GenModuleInfoSource { if (l.trim().startsWith("module ")) { if (debug) { // print URI rather than file path to avoid escape - writer.format(" // source file: %s%n", sourceFile.toUri()); + String buildPath = System.getProperty("user.dir").replaceAll("make$", ""); + writer.format(" // source file: %s%n", sourceFile.toUri().toString().replace(buildPath, "")); for (Path file : extraFiles) { - writer.format(" // %s%n", file.toUri()); + writer.format(" // %s%n", file.toUri().toString().replace(buildPath, "")); } } break;