[systemd-devel] [PATCH v2] udev hwdb: Support shipping pre-compiled database in system images

Lennart Poettering lennart at poettering.net
Mon Oct 20 09:38:26 PDT 2014


On Fri, 17.10.14 15:44, Martin Pitt (martin.pitt at ubuntu.com) 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.

Wouldn't the "triggering" syntax Condition...=| work for this?

Lennart

-- 
Lennart Poettering, Red Hat


More information about the systemd-devel mailing list