all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
blob c9b9e8d798d2dbbd4ccf0af07199c645ccd27fb7 624 bytes (raw)
name: packages/patches/ninja-zero-mtime.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
 
Work around a design defect in Ninja whereby a zero mtime is used to
denote missing files (we happen to produce files that have a zero mtime
and yet really do exist.)

--- ninja-1.5.3/src/disk_interface.cc	2014-11-24 18:37:47.000000000 +0100
+++ ninja-1.5.3/src/disk_interface.cc	2015-07-18 23:20:38.572290139 +0200
@@ -194,6 +194,12 @@ TimeStamp RealDiskInterface::Stat(const
     }
     return -1;
   }
+
+  if (st.st_mtime == 0)
+    // All the code assumes that mtime == 0 means "file missing".  Here we
+    // know the file is not missing, so tweak the mtime.
+    st.st_mtime = 1;
+
   return st.st_mtime;
 #endif
 }

debug log:

solving c9b9e8d798d2dbbd4ccf0af07199c645ccd27fb7 ...
found c9b9e8d798d2dbbd4ccf0af07199c645ccd27fb7 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.