From: Emmanuel Bourg Date: Thu, 17 Oct 2024 20:50:46 +0000 (+0200) Subject: Makes the generated module-info.java files reproducible (removes a captured build... X-Git-Tag: archive/raspbian/17.0.13+11-2_deb12u1+rpi1^2~16 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=b9d6d20ce5a8c95e5052e2b616bd87593897aa2f;p=openjdk-17.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;