-
-
Notifications
You must be signed in to change notification settings - Fork 14.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Replace references to udevadm with an absolute paths, so programs using umockdev will just work without having to provide it in their test environment $PATH. This allows us removing systemdMinimal from nativeCheckInputs ourselves. It's still needed in buildInputs, as the build queries for it via pkg-config.
- Loading branch information
Showing
2 changed files
with
50 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
41 changes: 41 additions & 0 deletions
41
pkgs/development/libraries/umockdev/substitute-udevadm.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
From 09efbe8090f501c60975d5467fb587ed633d6a01 Mon Sep 17 00:00:00 2001 | ||
From: Florian Klink <[email protected]> | ||
Date: Wed, 24 Jan 2024 14:29:28 +0200 | ||
Subject: [PATCH] substitute udevadm | ||
|
||
--- | ||
src/umockdev-record.vala | 2 +- | ||
tests/test-umockdev-run.vala | 4 ++-- | ||
2 files changed, 3 insertions(+), 3 deletions(-) | ||
|
||
diff --git a/src/umockdev-record.vala b/src/umockdev-record.vala | ||
index 2d49bc8..272f25e 100644 | ||
--- a/src/umockdev-record.vala | ||
+++ b/src/umockdev-record.vala | ||
@@ -223,7 +223,7 @@ record_device(string dev) | ||
int exitcode; | ||
try { | ||
Process.spawn_sync(null, | ||
- {"udevadm", "info", "--query=all", "--path", dev}, | ||
+ {"@udevadm@", "info", "--query=all", "--path", dev}, | ||
null, | ||
SpawnFlags.SEARCH_PATH, | ||
null, | ||
diff --git a/tests/test-umockdev-run.vala b/tests/test-umockdev-run.vala | ||
index cd00a08..94616cb 100644 | ||
--- a/tests/test-umockdev-run.vala | ||
+++ b/tests/test-umockdev-run.vala | ||
@@ -199,8 +199,8 @@ A: size=1048576\n | ||
|
||
// unfortunately the udevadm output between distros is not entirely constant | ||
assert (get_program_out ( | ||
- "udevadm", | ||
- umockdev_run_command + "-d " + umockdev_file + " -- udevadm info --query=all --name=/dev/loop23", | ||
+ "@udevadm@", | ||
+ umockdev_run_command + "-d " + umockdev_file + " -- @udevadm@ info --query=all --name=/dev/loop23", | ||
out sout, out serr, out exit)); | ||
|
||
assert_cmpstr (serr, CompareOperator.EQ, ""); | ||
-- | ||
2.43.0 | ||
|