diff mbox series

[1/2] run-postinsts: use 'flock --fcntl' instead of separate fcntl-lock binary

Message ID 20250915085135.3063552-1-ravi@prevas.dk
State New
Headers show
Series [1/2] run-postinsts: use 'flock --fcntl' instead of separate fcntl-lock binary | expand

Commit Message

Rasmus Villemoes Sept. 15, 2025, 8:51 a.m. UTC
From: Rasmus Villemoes <ravi@prevas.dk>

Since v2.41, util-linux flock has understood the --fcntl option,
making it use fcntl(F_OFD_SETLK[W]) instead of flock().

Signed-off-by: Rasmus Villemoes <ravi@prevas.dk>
---
 meta/recipes-devtools/run-postinsts/run-postinsts/run-postinsts | 2 +-
 meta/recipes-devtools/run-postinsts/run-postinsts_1.0.bb        | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/meta/recipes-devtools/run-postinsts/run-postinsts/run-postinsts b/meta/recipes-devtools/run-postinsts/run-postinsts/run-postinsts
index 1f3e692029..a94a769b59 100755
--- a/meta/recipes-devtools/run-postinsts/run-postinsts/run-postinsts
+++ b/meta/recipes-devtools/run-postinsts/run-postinsts/run-postinsts
@@ -81,7 +81,7 @@  remove_rcsd_link=1
 if $pm_installed; then
 	case $pm in
 		"ipk")
-			if ! `fcntl-lock --wait 30 /run/opkg.lock true`; then
+			if ! `flock --fcntl --wait 30 /run/opkg.lock true`; then
 				eval echo "Unable to obtain the opkg lock, deadlock?" $append_log
 			fi
 			if ! eval "opkg configure $append_log"; then
diff --git a/meta/recipes-devtools/run-postinsts/run-postinsts_1.0.bb b/meta/recipes-devtools/run-postinsts/run-postinsts_1.0.bb
index 5486f89ae7..f581ff3636 100644
--- a/meta/recipes-devtools/run-postinsts/run-postinsts_1.0.bb
+++ b/meta/recipes-devtools/run-postinsts/run-postinsts_1.0.bb
@@ -12,7 +12,7 @@  S = "${UNPACKDIR}"
 
 inherit allarch systemd update-rc.d
 
-RDEPENDS:${PN} = "util-linux-fcntl-lock"
+RDEPENDS:${PN} = "util-linux-flock"
 
 INITSCRIPT_NAME = "run-postinsts"
 INITSCRIPT_PARAMS = "start 99 S ."