[systemd-devel] [PATCH v2] udev hwdb: Support shipping pre-compiled database in system images
Martin Pitt
martin.pitt at ubuntu.com
Fri Oct 17 06:44:51 PDT 2014
Hello again,
the previous patch had a typo in the manpage (it said "/lib/udev"
instead of "/usr/lib/udev" at one place), and also forgot to adjust
systemd-udev-hwdb-update.service.in. Both done now.
However, the latter currently has a gotcha:
+ConditionPathExists=!@udevlibexecdir@/hwdb.bin
This works correctly if you use this with the "factory reset"
semantics, i. e. start with an empty /etc. But it would not work if
you update /usr and have an already existing /etc/udev/hwdb.d/*. So
ideally the condition would be
ConditionPathExists=!@udevlibexecdir@/hwdb.bin OR
ConditionDirectoryNotEmpty=/etc/udev/hwdb.d/
but this isn't possible AFAIK. The alternative would be to change the
Exec= to call "hdwb --update --vendor" iff /etc/udev/hwdb.d/ is empty.
An alternative that was discussed at Plumbers was to make hwdb
--update automatically use @udevlibexecdir@ if there is no
/etc/udev/hwdb.d/, which would avoid this problem, avoid introducing a
new option, and still generally DTRT. I'd prefer this, so if you think
that's easier/better, I'm happy to update the patch accordingly.
Thanks,
Martin
--
Martin Pitt | http://www.piware.de
Ubuntu Developer (www.ubuntu.com) | Debian Developer (www.debian.org)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-udev-hwdb-Support-shipping-pre-compiled-database-in-.patch
Type: text/x-diff
Size: 8690 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/systemd-devel/attachments/20141017/336a64e6/attachment.patch>
More information about the systemd-devel
mailing list