GNU bug report logs -
#77037
[PATCH] services: `file-database-mcron-jobs' search updatedb in package field
Previous Next
Full log
View this message in rfc822 format
Hello,
Sergio Pastor Pérez <sergio.pastorperez <at> gmail.com> skribis:
> `file-database-service-type' appends 'bin/updatedb' path to the `package'
> field provided by `file-database-configuration'. This prevents users from
> using alternate packages which also provide 'updatedb' but in a different
> location.
>
> For example, the `plocate' package installs 'updatedb' it in 'sbin/updatedb'.
I didn’t know about ‘plocate’. :-)
Could yoiu add a line in the doc explicitly mentioning that ‘plocate’ is
supported, in addition to Findutils?
> + (let ((updatedb-bin #$(find (cut executable-file? <>)
> + (find-files (package-output (open-connection)
> + package)
> + "^updatedb$"))))
This wouldn’t work for instance if ‘package’ hasn’t been built yet, and
also, it opens an extra connection to the daemon, which should be
avoided.
Instead, I’d write something like:
(define updatedb
(let ((try (lambda (file)
(and (file-exists? file) file))))
(or (try #$(file-append package "/bin/updatedb"))
(try #$(file-append package "/sbin/updatedb")))))
Could you send an updated patch?
Thanks,
Ludo’.
This bug report was last modified 109 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.