nixos/udev: Fix printing impure FHS paths

The test only checked for existence of the rule file in the output path
of the rulefile generator.

However, we also need to check whether the basename of the file is also
the one we're currently searching for.

Signed-off-by: aszlig <aszlig@redmoonstudios.org>
wip/yesman
aszlig 8 years ago
parent 3a17abfdae
commit b060d70d7f
No known key found for this signature in database
GPG Key ID: D0EBD0EC8C2DC961
  1. 8
      nixos/modules/services/hardware/udev.nix

@ -104,10 +104,10 @@ let
remoteFile="origin unknown"
for i in ${toString cfg.packages}; do
for j in "$i"/*/udev/rules.d/*; do
if [ -e "$out/$(basename "$j")" ]; then
remoteFile="originally from $j"
break 2
fi
[ -e "$out/$(basename "$j")" ] || continue
[ "$(basename "$j")" = "$(basename "$localFile")" ] || continue
remoteFile="originally from $j"
break 2
done
done
refs="$(

Loading…
Cancel
Save