From e8384ba2fa3dc2b32f8f8e17464950475549bd86 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Thu, 7 Mar 2024 11:10:36 -0800 Subject: systemd: Check for directory before chmod'ing it da9db878a15 systemd: fix dead link /var/log/README add -Dcreate-log-dirs=false which means journal dir will not be generated regardless of VOLATILE_LOG_DIR value if a distro decided to set VOLATILE_LOG_DIR=no this code path will be executes and the directory being operated upon wont exist ending in do_install errors chown: cannot access '/mnt/b/yoe/master/build/tmp/work/riscv64-yoe-linux/systemd/255.4/image/var/log/journal': No such file or directory (From OE-Core rev: e017f405bf6ae6c269a8c9c981878fd1ad8666b6) Signed-off-by: Khem Raj Cc: Changqing Li Signed-off-by: Richard Purdie --- meta/recipes-core/systemd/systemd_255.4.bb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'meta/recipes-core/systemd') diff --git a/meta/recipes-core/systemd/systemd_255.4.bb b/meta/recipes-core/systemd/systemd_255.4.bb index d59ca30c12..bcef3e6b7a 100644 --- a/meta/recipes-core/systemd/systemd_255.4.bb +++ b/meta/recipes-core/systemd/systemd_255.4.bb @@ -306,7 +306,7 @@ do_install() { # /var/log is typically a symbolic link to inside /var/volatile, # which is expected to be empty. rm -rf ${D}${localstatedir}/log - else + elif [ -e ${D}${localstatedir}/log/journal ]; then chown root:systemd-journal ${D}${localstatedir}/log/journal # journal-remote creates this at start -- cgit v1.2.3-54-g00ecf