]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
sysupdate: mkdir_parents CurrentSymlink= path
authorAleksa Sarai <aleksa@amutable.com>
Thu, 14 May 2026 10:15:06 +0000 (17:15 +0700)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Thu, 14 May 2026 19:19:41 +0000 (04:19 +0900)
This was missing in the CurrentSymlink= creation path, and leads to
partially-broken update installs.

Signed-off-by: Aleksa Sarai <aleksa@amutable.com>
src/sysupdate/sysupdate-transfer.c

index 8db1c81962f704fc5b72f307e98f6f056379f238..27756298fa28467275f8e1b4e3f705b7f100bf40 100644 (file)
@@ -1750,6 +1750,10 @@ int transfer_install_instance(
                         if (r < 0)
                                 return log_error_errno(r, "Failed to make symlink path '%s' relative to '%s': %m", link_target, parent);
 
+                        r = mkdir_parents(link_path, 0755);
+                        if (r < 0)
+                                return log_error_errno(r, "Failed to create directory for current symlink '%s': %m", link_path);
+
                         r = symlink_atomic(relative, link_path);
                         if (r < 0)
                                 return log_error_errno(r, "Failed to update current symlink '%s' %s '%s': %m",