mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-07-24 11:45:18 +03:00
40 lines
1.4 KiB
Diff
40 lines
1.4 KiB
Diff
Author: Patrycja Rosa <alpine@ptrcnull.me>
|
|
|
|
Replace systemctl-hwdb with udevadm
|
|
|
|
diff --git a/test/test_udev_rules.py b/test/test_udev_rules.py
|
|
index 0418905..aba5964 100644
|
|
--- a/test/test_udev_rules.py
|
|
+++ b/test/test_udev_rules.py
|
|
@@ -20,16 +20,10 @@ import sys
|
|
|
|
|
|
@pytest.fixture(scope='session', autouse=True)
|
|
-def systemd_reload():
|
|
+def udevadm_reload():
|
|
'''Make sure our hwdb and udev rules are up-to-date'''
|
|
import subprocess
|
|
- try:
|
|
- subprocess.run(['systemd-hwdb', 'update'])
|
|
- subprocess.run(['systemctl', 'daemon-reload'])
|
|
- except FileNotFoundError:
|
|
- # If any of the commands above are not found (most likely the system
|
|
- # simply does not use systemd), just skip.
|
|
- raise pytest.skip()
|
|
+ subprocess.run(['udevadm', 'hwdb', '-u'])
|
|
|
|
|
|
def pytest_generate_tests(metafunc):
|
|
diff --git a/tools/libwacom-update-db.py b/tools/libwacom-update-db.py
|
|
index 54298cf..167aad6 100755
|
|
--- a/tools/libwacom-update-db.py
|
|
+++ b/tools/libwacom-update-db.py
|
|
@@ -241,7 +241,7 @@ if __name__ == "__main__":
|
|
print(f"New hwdb file: {hwdbfile}")
|
|
|
|
if not ns.skip_systemd_hwdb_update:
|
|
- subprocess.run(["systemd-hwdb", "update"],
|
|
+ subprocess.run(["udevadm", "hwdb", "-u"],
|
|
capture_output=True, check=True, text=True)
|
|
print("Finished, please unplug and replug your device")
|
|
except PermissionError as e:
|