udev: don't use IMPORT+=
authorPeter Hutterer <peter.hutterer@who-t.net>
Fri, 27 Mar 2020 09:37:10 +0000 (19:37 +1000)
committerPeter Hutterer <peter.hutterer@who-t.net>
Mon, 30 Mar 2020 00:35:43 +0000 (00:35 +0000)
IMPORT really only supports == and != and for a short while udevd warned about
this before that warning was reverted again.

Where anything else is used, it falls back to ==. systemd upstream rules all
use a single = though, so let's stick with that to be consistent, even if it
is technically wrong (udevd will warn about this in debug mode).

See the long discussion in systemd upstream for details:
https://github.com/systemd/systemd/issues/14062

Fixes #461

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
test/litest.c
udev/80-libinput-device-groups.rules.in
udev/90-libinput-fuzz-override.rules.in

index 783c13800920653f6a4e38eb9255281fafa8e7b5..391c8e9eb6103b17ef68245478bb3fc7391016cb 100644 (file)
@@ -725,7 +725,7 @@ litest_init_device_udev_rules(struct litest_test_device *dev, FILE *f)
        if (need_keyboard_builtin) {
                fprintf(f, ""
                        "ATTRS{name}==\"litest %s*\","
-                       " IMPORT{builtin}+=\"keyboard\"\n",
+                       " IMPORT{builtin}=\"keyboard\"\n",
                        dev->name);
        }
 
index f833153038f6cd6aeb22ff6a9ecca6ae017b49e3..1c40143d194fd7514dbc2c31291325bdcfb5cca6 100644 (file)
@@ -1,6 +1,6 @@
 ACTION!="add|change", GOTO="libinput_device_group_end"
 KERNEL!="event[0-9]*", GOTO="libinput_device_group_end"
 
-ATTRS{phys}=="?*", IMPORT{program}+="@UDEV_TEST_PATH@libinput-device-group %S%p"
+ATTRS{phys}=="?*", IMPORT{program}="@UDEV_TEST_PATH@libinput-device-group %S%p"
 
 LABEL="libinput_device_group_end"
index fa1e3e75f6083e6078cc1309660290280f3d835b..81f76cd1ebbb3670cdd8559449ee493e6b4049ed 100644 (file)
@@ -15,12 +15,12 @@ KERNEL!="event*", GOTO="libinput_fuzz_override_end"
 # about that.
 ATTRS{capabilities/abs}!="0", \
        ENV{ID_INPUT_TOUCHPAD}=="1", \
-       IMPORT{program}+="@UDEV_TEST_PATH@libinput-fuzz-extract %S%p", \
+       IMPORT{program}="@UDEV_TEST_PATH@libinput-fuzz-extract %S%p", \
        RUN{program}+="@UDEV_TEST_PATH@libinput-fuzz-to-zero %S%p", \
        GOTO="libinput_fuzz_override_end"
 ATTRS{capabilities/abs}!="0", \
        ENV{ID_INPUT_TOUCHSCREEN}=="1", \
-       IMPORT{program}+="@UDEV_TEST_PATH@libinput-fuzz-extract %S%p", \
+       IMPORT{program}="@UDEV_TEST_PATH@libinput-fuzz-extract %S%p", \
        RUN{program}+="@UDEV_TEST_PATH@libinput-fuzz-to-zero %S%p", \
        GOTO="libinput_fuzz_override_end"