git.iko.soy/typeable/nixpkgs
on master help sign in
Merge pull request #26191 from romildo/fix.mlocate

locate: fix creation of parent dir of database

commit9c0577447cdb9da5648620a1283a80569cff08c8 authorJörg Thalheim <Mic92@users.noreply.github.com> dateSat 10 Jun 2017, 11:56 (9 years ago) parente6f68856ef6484
1 file changed+2−2
nixos/modules/misc/locate.nix+2−2
nixos/modules/misc/locate.nix+2−2
@@ -131,9 +131,9 @@ in {
131131 path = mkIf (!isMLocate) [ pkgs.su ];
132132 script =
133133 ''
134− install -m ${if isMLocate then "0750" else "0755"} -o root -g ${if isMLocate then "mlocate" else "root"} -d $(dirname ${cfg.output})
134+ mkdir -m 0755 -p ${dirOf cfg.output}
135135 exec ${cfg.locate}/bin/updatedb \
136− ${optionalString (cfg.localuser != null) ''--localuser=${cfg.localuser}''} \
136+ ${optionalString (cfg.localuser != null && ! isMLocate) ''--localuser=${cfg.localuser}''} \
137137 --output=${toString cfg.output} ${concatStringsSep " " cfg.extraFlags}
138138 '';
139139 environment = {