diff options
author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2022-04-12 22:01:10 +0200 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2022-05-05 19:02:26 +0200 |
commit | 9aa3d6b41eadff6634bb3cf800064724171a7aad (patch) | |
tree | 7a9da0cb85ce265adb7c2ff5a5d8b6c97a909258 /src/shared/install.c | |
parent | 14736ab6ff1744b3750b5b56ce7ecf40f6422e82 (diff) | |
download | systemd-9aa3d6b41eadff6634bb3cf800064724171a7aad.tar.gz |
Revert "shared/install: create relative symlinks for enablement and aliasing"
This reverts commit d6c9411072901556176ac130f2ce71a33107aa93.
I still think this is something that needs to be done, but we're hitting some
unexplained failures, e.g. https://github.com/systemd/systemd/issues/22920.
So let's revert this for now, so -rc2 can be released, with a plan to return
to this after a release.
Closes #22920.
Diffstat (limited to 'src/shared/install.c')
-rw-r--r-- | src/shared/install.c | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/src/shared/install.c b/src/shared/install.c index 5df2137d4c..c9834ae6c7 100644 --- a/src/shared/install.c +++ b/src/shared/install.c @@ -1899,7 +1899,7 @@ static int install_info_symlink_alias( if (!alias_path) return -ENOMEM; - q = create_symlink(lp, info->name, alias_path, force, changes, n_changes); + q = create_symlink(lp, info->path, alias_path, force, changes, n_changes); r = r < 0 ? r : q; } @@ -1968,7 +1968,7 @@ static int install_info_symlink_wants( } STRV_FOREACH(s, list) { - _cleanup_free_ char *dst = NULL; + _cleanup_free_ char *path = NULL, *dst = NULL; q = install_name_printf(scope, info, *s, &dst); if (q < 0) { @@ -1998,15 +1998,11 @@ static int install_info_symlink_wants( continue; } - _cleanup_free_ char *path = strjoin(config_path, "/", dst, suffix, n); + path = strjoin(config_path, "/", dst, suffix, n); if (!path) return -ENOMEM; - _cleanup_free_ char *target = strjoin("../", info->name); - if (!target) - return -ENOMEM; - - q = create_symlink(lp, target, path, true, changes, n_changes); + q = create_symlink(lp, info->path, path, true, changes, n_changes); if (r == 0) r = q; @@ -2914,7 +2910,7 @@ int unit_file_set_default( return r; new_path = strjoina(lp.persistent_config, "/" SPECIAL_DEFAULT_TARGET); - return create_symlink(&lp, info->name, new_path, flags & UNIT_FILE_FORCE, changes, n_changes); + return create_symlink(&lp, info->path, new_path, flags & UNIT_FILE_FORCE, changes, n_changes); } int unit_file_get_default( |