[systemd-devel] [PATCH v2] udev hwdb: Support shipping pre-compiled database in system images
Ivan Shapovalov
intelfx100 at gmail.com
Sat Oct 18 18:42:28 PDT 2014
On Friday 17 October 2014 at 15:44:51, Martin Pitt wrote:
> 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.
I'm just an innocent bystander, but isn't it possible with these two
lines?
ConditionPathExists=|!@udevlibexecdir@/hwdb.bin
ConditionDirectoryNotEmpty=|/etc/udev/hwdb.d/
This will succeed if EITHER @udevlibexecdir@/hwdb.bin does not exist
OR /etc/udev/hwdb.d/ is not empty.
Or have I misunderstood you?
--
Ivan Shapovalov / intelfx /
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 213 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.freedesktop.org/archives/systemd-devel/attachments/20141019/499614df/attachment.sig>
More information about the systemd-devel
mailing list