From: Changqing Li Date: Fri, 30 Jun 2023 09:14:51 +0000 (+0800) Subject: rootfs-postcommands.bbclass: add post func remove_unused_dnf_log_lock X-Git-Tag: lucaceresoli/bug-15201-perf-libtraceevent-missing~359 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=406a72a9a47c2735b7e18cefc682b1df00d5a9aa;p=thirdparty%2Fopenembedded%2Fopenembedded-core-contrib.git rootfs-postcommands.bbclass: add post func remove_unused_dnf_log_lock Remove log_lock.pid which maybe created during do_rootfs. In commit [dnf: only write the log lock to root for native dnf], native dnf changed to write log lock to root, and target dnf still use /var/log, so log_lock.pid need to be removed post do_rootfs. Signed-off-by: Changqing Li Signed-off-by: Alexandre Belloni Signed-off-by: Richard Purdie --- diff --git a/meta/classes-recipe/rootfs-postcommands.bbclass b/meta/classes-recipe/rootfs-postcommands.bbclass index 4492c9c0aa7..53b241413e4 100644 --- a/meta/classes-recipe/rootfs-postcommands.bbclass +++ b/meta/classes-recipe/rootfs-postcommands.bbclass @@ -49,6 +49,8 @@ ROOTFS_POSTPROCESS_COMMAND += 'empty_var_volatile;' ROOTFS_POSTPROCESS_COMMAND += '${@bb.utils.contains("DISTRO_FEATURES", "overlayfs", "overlayfs_qa_check; overlayfs_postprocess;", "", d)}' +ROOTFS_POSTPROCESS_COMMAND += 'remove_unused_dnf_log_lock;' + inherit image-artifact-names # Sort the user and group entries in /etc by ID in order to make the content @@ -361,6 +363,11 @@ empty_var_volatile () { fi } +remove_unused_dnf_log_lock() { + if [ -e ${IMAGE_ROOTFS}/log_lock.pid ]; then + rm -rf ${IMAGE_ROOTFS}/log_lock.pid + fi +} # Turn any symbolic /sbin/init link into a file remove_init_link () { if [ -h ${IMAGE_ROOTFS}/sbin/init ]; then