]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
Merge pull request #14156 from fbuihuu/deal-with-aliases-when-disabling
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Thu, 6 Feb 2020 09:46:21 +0000 (10:46 +0100)
committerGitHub <noreply@github.com>
Thu, 6 Feb 2020 09:46:21 +0000 (10:46 +0100)
Consider aliases in /usr when disabling units

src/core/unit.c
src/shared/install.c

index 279619f039a6b08c263a4b35b47ac0f26ecdb07c..35627b3511ba37e5fc7a0ebb1211be38d2803cbf 100644 (file)
@@ -5388,7 +5388,7 @@ static void unit_update_dependency_mask(Unit *u, UnitDependency d, Unit *other,
         if (di.origin_mask == 0 && di.destination_mask == 0) {
                 /* No bit set anymore, let's drop the whole entry */
                 assert_se(hashmap_remove(u->dependencies[d], other));
-                log_unit_debug(u, "%s lost dependency %s=%s", u->id, unit_dependency_to_string(d), other->id);
+                log_unit_debug(u, "lost dependency %s=%s", unit_dependency_to_string(d), other->id);
         } else
                 /* Mask was reduced, let's update the entry */
                 assert_se(hashmap_update(u->dependencies[d], other, di.data) == 0);
index 91264e6306c85ca64b78aab3a62626720883fa49..48cb6aca7e8f0d027a4825b8120c510119e52862 100644 (file)
@@ -580,7 +580,7 @@ static int remove_marked_symlinks_fd(
                                 return -ENOMEM;
                         path_simplify(p, false);
 
-                        q = readlink_malloc(p, &dest);
+                        q = chase_symlinks(p, NULL, CHASE_NONEXISTENT, &dest, NULL);
                         if (q == -ENOENT)
                                 continue;
                         if (q < 0) {
@@ -1117,7 +1117,7 @@ static int config_parse_also(
                 void *data,
                 void *userdata) {
 
-        UnitFileInstallInfo *info = userdata, *alsoinfo = NULL;
+        UnitFileInstallInfo *info = userdata;
         InstallContext *c = data;
         int r;
 
@@ -1139,7 +1139,7 @@ static int config_parse_also(
                 if (r < 0)
                         return r;
 
-                r = install_info_add(c, printed, NULL, true, &alsoinfo);
+                r = install_info_add(c, printed, NULL, true, NULL);
                 if (r < 0)
                         return r;