buildEnv: Check the content of colliding paths.

Originally wanted to include ignoreCollisions in cups-progs, but I think
it's better if we use ignoreCollisions only if there are _real_
collisions between files with different contents.

Of course, we also check whether the file permissions match, so you get
a collision if contents are the same but the permissions are different.

Signed-off-by: aszlig <aszlig@redmoonstudios.org>
This commit is contained in:
aszlig
2016-01-18 03:54:22 +01:00
parent 85dd89f6eb
commit 4529ed1259
2 changed files with 39 additions and 10 deletions
+7 -1
View File
@@ -16,6 +16,10 @@
, # Whether to ignore collisions or abort.
ignoreCollisions ? false
, # If there is a collision, check whether the contents and permissions match
# and only if not, throw a collision error.
checkCollisionContents ? true
, # The paths (relative to each element of `paths') that we want to
# symlink (e.g., ["/bin"]). Any file not inside any of the
# directories in the list is not symlinked.
@@ -39,7 +43,9 @@
}:
runCommand name
rec { inherit manifest ignoreCollisions passthru meta pathsToLink extraPrefix postBuild buildInputs;
rec {
inherit manifest ignoreCollisions checkCollisionContents passthru
meta pathsToLink extraPrefix postBuild buildInputs;
pkgs = builtins.toJSON (map (drv: {
paths =
[ drv ]