43ff24c
From d8f6518b91f3c493471fa73b7ca98759e895a3d7 Mon Sep 17 00:00:00 2001
43ff24c
From: Tanu Kaskinen <tanu.kaskinen@linux.intel.com>
43ff24c
Date: Sat, 12 Jul 2014 18:59:19 +0300
43ff24c
Subject: [PATCH] path-lookup: don't make ~/.local/share/systemd/user a symlink
43ff24c
43ff24c
We already encourage upstreams to keep the default configuration
43ff24c
separate from user customizations for software that is installed in
43ff24c
the system location. Let's allow that separation also for software
43ff24c
that is installed in the home directory.
43ff24c
43ff24c
Some discussion:
43ff24c
http://thread.gmane.org/gmane.comp.sysutils.systemd.devel/19627
43ff24c
43ff24c
(cherry picked from commit 667a1cd645c9402921dedff08a86bb35cddbcbf9)
43ff24c
---
43ff24c
 src/shared/path-lookup.c | 18 ------------------
43ff24c
 1 file changed, 18 deletions(-)
43ff24c
43ff24c
diff --git a/src/shared/path-lookup.c b/src/shared/path-lookup.c
43ff24c
index e0aaf4431f..7d53d859b6 100644
43ff24c
--- a/src/shared/path-lookup.c
43ff24c
+++ b/src/shared/path-lookup.c
43ff24c
@@ -125,26 +125,8 @@ static char** user_dirs(
43ff24c
                         goto fail;
43ff24c
 
43ff24c
         } else if (home) {
43ff24c
-                _cleanup_free_ char *data_home_parent = NULL;
43ff24c
-
43ff24c
                 if (asprintf(&data_home, "%s/.local/share/systemd/user", home) < 0)
43ff24c
                         goto fail;
43ff24c
-
43ff24c
-                /* There is really no need for two unit dirs in $HOME,
43ff24c
-                 * except to be fully compliant with the XDG spec. We
43ff24c
-                 * now try to link the two dirs, so that we can
43ff24c
-                 * minimize disk seeks a little. Further down we'll
43ff24c
-                 * then filter out this link, if it is actually is
43ff24c
-                 * one. */
43ff24c
-
43ff24c
-                if (path_get_parent(data_home, &data_home_parent) >= 0) {
43ff24c
-                        _cleanup_free_ char *config_home_relative = NULL;
43ff24c
-
43ff24c
-                        if (path_make_relative(data_home_parent, config_home, &config_home_relative) >= 0) {
43ff24c
-                                mkdir_parents_label(data_home, 0777);
43ff24c
-                                (void) symlink(config_home_relative, data_home);
43ff24c
-                        }
43ff24c
-                }
43ff24c
         }
43ff24c
 
43ff24c
         e = getenv("XDG_DATA_DIRS");