From f03393db6bb8509e88ee0ad7a8300186d8231c58 Mon Sep 17 00:00:00 2001 From: Rasmus Villemoes Date: Mon, 15 Sep 2025 10:51:34 +0200 Subject: [PATCH] run-postinsts: use 'flock --fcntl' instead of separate fcntl-lock binary 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 Signed-off-by: Mathieu Dubois-Briand Signed-off-by: Richard Purdie --- 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 --git a/meta/recipes-devtools/run-postinsts/run-postinsts/run-postinsts b/meta/recipes-devtools/run-postinsts/run-postinsts/run-postinsts index 1f3e692029c..a94a769b590 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 5486f89ae75..f581ff36368 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 ." -- 2.47.3