From: Emmanuel Bourg Date: Fri, 20 Dec 2024 10:09:22 +0000 (+0100) Subject: Makes the generated module-info.java files reproducible (removes a captured build... X-Git-Tag: archive/raspbian/17.0.14_6ea-1+rpi1^2~16 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=4f7952ba338d740e7eef17625096b06ee645bd46;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;