nixpkgs/pkgs/by-name/cl/clean/chroot-build-support-do-not-rebuild-equal-timestamps.patch
aleksana 571c71e6f7 treewide: migrate packages to pkgs/by-name, take 1
We are migrating packages that meet below requirements:

1. using `callPackage`
2. called path is a directory
3. overriding set is empty (`{ }`)
4. not containing path expressions other than relative path (to
makenixpkgs-vet happy)
5. not referenced by nix files outside of the directory, other
than`pkgs/top-level/all-packages.nix`
6. not referencing nix files outside of the directory
7. not referencing `default.nix` (since it's changed to `package.nix`)
8. `outPath` doesn't change after migration

The tool is here: https://github.com/Aleksanaa/by-name-migrate.
2024-11-09 20:04:51 +08:00

18 lines
833 B
Diff

The clean command line compiler clm checks modules for freshness by comparing timestamps.
However, in chroot builds all files installed have the same timestamp. This leads to clm
trying to rebuild the library modules distributed with the Clean install every time a user
compiles any file. This patch changes the freshness check to use less than instead of less
than or equal to in order to avoid this.
--- clean-upstream/src/tools/clm/clm.c 2010-12-10 06:12:17.000000000 -0430
+++ clean/src/tools/clm/clm.c 2010-12-25 10:29:09.840675925 -0430
@@ -250,7 +250,7 @@
|| (t1.dwHighDateTime==t2.dwHighDateTime && (unsigned)(t1.dwLowDateTime)<=(unsigned)(t2.dwLowDateTime)))
#else
typedef unsigned long FileTime;
-# define FILE_TIME_LE(t1,t2) (t1<=t2)
+# define FILE_TIME_LE(t1,t2) (t1<t2)
#endif
typedef struct project_node {