From: Emmanuel Bourg Date: Tue, 30 Jul 2024 06:37:36 +0000 (+0200) Subject: Makes the generated module-info.java files reproducible (removes a captured build... X-Git-Tag: archive/raspbian/21.0.4+7-2+rpi1~23 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=90639dd8ed70cb632b5f10030124b367a90c1344;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;