summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChangqing Li <changqing.li@windriver.com>2023-06-30 16:32:21 +0800
committerSteve Sakoman <steve@sakoman.com>2023-07-07 04:30:26 -1000
commitd069c8743f24ca0ba8a7776e85a436e2d5b10bc0 (patch)
treef9aee39f4b94f171337ae5a44a72a33323973ef2
parente7242a885beb052f72b65eddc21a58075d19eb89 (diff)
downloadpoky-d069c8743f24ca0ba8a7776e85a436e2d5b10bc0.tar.gz
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. (From OE-Core rev: 595fbe4c9ad25e52e88d7bcf1d1864fe5ec324a5) Signed-off-by: Changqing Li <changqing.li@windriver.com> Signed-off-by: Steve Sakoman <steve@sakoman.com>
-rw-r--r--meta/classes-recipe/rootfs-postcommands.bbclass7
1 files changed, 7 insertions, 0 deletions
diff --git a/meta/classes-recipe/rootfs-postcommands.bbclass b/meta/classes-recipe/rootfs-postcommands.bbclass
index 690fa976aa..7538c8b0b5 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;'
49 49
50ROOTFS_POSTPROCESS_COMMAND += '${@bb.utils.contains("DISTRO_FEATURES", "overlayfs", "overlayfs_qa_check; overlayfs_postprocess;", "", d)}' 50ROOTFS_POSTPROCESS_COMMAND += '${@bb.utils.contains("DISTRO_FEATURES", "overlayfs", "overlayfs_qa_check; overlayfs_postprocess;", "", d)}'
51 51
52ROOTFS_POSTPROCESS_COMMAND += 'remove_unused_dnf_log_lock;'
53
52inherit image-artifact-names 54inherit image-artifact-names
53 55
54# Sort the user and group entries in /etc by ID in order to make the content 56# Sort the user and group entries in /etc by ID in order to make the content
@@ -276,6 +278,11 @@ empty_var_volatile () {
276 fi 278 fi
277} 279}
278 280
281remove_unused_dnf_log_lock() {
282 if [ -e ${IMAGE_ROOTFS}/log_lock.pid ]; then
283 rm -rf ${IMAGE_ROOTFS}/log_lock.pid
284 fi
285}
279# Turn any symbolic /sbin/init link into a file 286# Turn any symbolic /sbin/init link into a file
280remove_init_link () { 287remove_init_link () {
281 if [ -h ${IMAGE_ROOTFS}/sbin/init ]; then 288 if [ -h ${IMAGE_ROOTFS}/sbin/init ]; then