diff options
| author | Changqing Li <changqing.li@windriver.com> | 2023-06-30 17:14:51 +0800 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2023-07-17 15:30:04 +0100 |
| commit | cf0efc86b3c2281859b9ab6f0aeae6575fda64ea (patch) | |
| tree | c162cc2c3b56ab834fc286f1e117aaaf4f19abbb /meta | |
| parent | 47b5c90267a88220cc2eabc89aeee5077bd02063 (diff) | |
| download | poky-cf0efc86b3c2281859b9ab6f0aeae6575fda64ea.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: 406a72a9a47c2735b7e18cefc682b1df00d5a9aa)
Signed-off-by: Changqing Li <changqing.li@windriver.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
| -rw-r--r-- | meta/classes-recipe/rootfs-postcommands.bbclass | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/meta/classes-recipe/rootfs-postcommands.bbclass b/meta/classes-recipe/rootfs-postcommands.bbclass index 4492c9c0aa..53b241413e 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 | ||
| 50 | ROOTFS_POSTPROCESS_COMMAND += '${@bb.utils.contains("DISTRO_FEATURES", "overlayfs", "overlayfs_qa_check; overlayfs_postprocess;", "", d)}' | 50 | ROOTFS_POSTPROCESS_COMMAND += '${@bb.utils.contains("DISTRO_FEATURES", "overlayfs", "overlayfs_qa_check; overlayfs_postprocess;", "", d)}' |
| 51 | 51 | ||
| 52 | ROOTFS_POSTPROCESS_COMMAND += 'remove_unused_dnf_log_lock;' | ||
| 53 | |||
| 52 | inherit image-artifact-names | 54 | inherit 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 |
| @@ -361,6 +363,11 @@ empty_var_volatile () { | |||
| 361 | fi | 363 | fi |
| 362 | } | 364 | } |
| 363 | 365 | ||
| 366 | remove_unused_dnf_log_lock() { | ||
| 367 | if [ -e ${IMAGE_ROOTFS}/log_lock.pid ]; then | ||
| 368 | rm -rf ${IMAGE_ROOTFS}/log_lock.pid | ||
| 369 | fi | ||
| 370 | } | ||
| 364 | # Turn any symbolic /sbin/init link into a file | 371 | # Turn any symbolic /sbin/init link into a file |
| 365 | remove_init_link () { | 372 | remove_init_link () { |
| 366 | if [ -h ${IMAGE_ROOTFS}/sbin/init ]; then | 373 | if [ -h ${IMAGE_ROOTFS}/sbin/init ]; then |
