]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core.git/commitdiff
systemd: Check for directory before chmod'ing it
authorKhem Raj <raj.khem@gmail.com>
Thu, 7 Mar 2024 19:10:36 +0000 (11:10 -0800)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Fri, 8 Mar 2024 08:06:14 +0000 (08:06 +0000)
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

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Cc: Changqing Li <changqing.li@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/recipes-core/systemd/systemd_255.4.bb

index d59ca30c12f87e6bf8d1d9ac65f399f2806116f3..bcef3e6b7acd2a476788778f921df1e76c1e0cca 100644 (file)
@@ -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