From: Rasmus Villemoes Date: Mon, 15 Sep 2025 08:51:34 +0000 (+0200) Subject: run-postinsts: use 'flock --fcntl' instead of separate fcntl-lock binary X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=f03393db6bb8509e88ee0ad7a8300186d8231c58;p=thirdparty%2Fopenembedded%2Fopenembedded-core.git 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 --- 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 ."