[systemd-devel] [PATCH] udev hwdb: Store binary database in libdir, not in /etc
mbiebl at gmail.com
Fri Jul 5 13:04:29 PDT 2013
2013/6/18 Colin Walters <walters at verbum.org>:
>> b/ let udevadm hwdb --update check, if /var or /var/cache is on a
>> separate partition.
> If it was just udevadm, that wouldn't be so hard, but replicating
> the (what I expect to be fairly fragile) code to detect /var's
> paritioning scheme across any other components (e.g. fontconfig)
> would be ugly.
> Though I do keep coming back to the hwdb being a special case, since
> almost none of the other caches need to unify data from /usr and /etc.
> That does point out another potential solution - have two caches, one
> in /usr and one in /etc, and the /etc one is only created if there's
> anything to cache.
My very first idea was , to use /lib/udev for the cache file as
long as /etc/udev/hwdb.d was empty.
And as soon as files are added to /etc/udev/hwdb.d, the cache file is
generated in /etc/udev and udev will first try to read the cache file
from /etc and fall back to /lib
This would be rather simple to add. The cache file in /lib/udev would
still be perfectly shareable across hosts. And I don't share the
concern that this would be confusing for users (and appear random).
So I plan to use that approach in the Debian package.
Fwiw, that is basically what you also initially suggested in , with
the slight modification that you would use /etc/cache.
The idea to have support for a split hwdb, where you can read
fragments from different locations, is an interesting one. Dunno
though, how much this would complicate the implementation. IIRC the
hwdb cache/db file is mmapped.
Why is it that all of the instruments seeking intelligent life in the
universe are pointed away from Earth?
More information about the systemd-devel