all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
blob 2052983ade4c4ed6ff328c31ef597783f99fd888 1825 bytes (raw)
name: gnu/packages/patches/openjdk-15-jtask-reproducibility.patch 	 # note: path name is non-authoritative(*)

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
 
--- 22kjr9lzrml0h5m55viq7zlfkqr9p7ny-openjdk-15.0.3-checkout/src/jdk.jlink/share/classes/jdk/tools/jmod/JmodTask.java.orig	2022-04-04 10:57:40.346312924 +0200
+++ 22kjr9lzrml0h5m55viq7zlfkqr9p7ny-openjdk-15.0.3-checkout/src/jdk.jlink/share/classes/jdk/tools/jmod/JmodTask.java	2022-04-04 11:01:38.480751902 +0200
@@ -82,6 +82,7 @@
 import jdk.internal.module.ModuleTarget;
 import jdk.internal.module.Resources;
 import jdk.tools.jlink.internal.Utils;
+import java.util.TreeSet;
 
 import static java.util.stream.Collectors.joining;
 
@@ -750,6 +751,7 @@
         void processSection(JmodOutputStream out, Section section, Path path)
             throws IOException
         {
+            TreeSet<Path> paths = new TreeSet<>();
             Files.walkFileTree(path, Set.of(FileVisitOption.FOLLOW_LINKS),
                 Integer.MAX_VALUE, new SimpleFileVisitor<Path>() {
                     @Override
@@ -765,14 +767,18 @@
                             if (out.contains(section, name)) {
                                 warning("warn.ignore.duplicate.entry", name, section);
                             } else {
-                                try (InputStream in = Files.newInputStream(file)) {
-                                    out.writeEntry(in, section, name);
-                                }
+                                paths.add(file);
                             }
                         }
                         return FileVisitResult.CONTINUE;
                     }
                 });
+
+            for (Path file : paths) {
+                try (InputStream in = Files.newInputStream(file)) {
+                    out.writeEntry(in, section, path.relativize(file).toString());
+                }
+            }
         }
 
         boolean matches(Path path, List<PathMatcher> matchers) {

debug log:

solving 2052983ade ...
found 2052983ade in https://git.savannah.gnu.org/cgit/guix.git

(*) Git path names are given by the tree(s) the blob belongs to.
    Blobs themselves have no identifier aside from the hash of its contents.^

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.