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>
This commit is contained in:
aszlig 2016-02-05 14:56:06 +01:00
parent 3a17abfdae
commit b060d70d7f
No known key found for this signature in database
GPG key ID: D0EBD0EC8C2DC961

View file

@ -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="$(