summaryrefslogtreecommitdiff
path: root/src/lib/efreet
diff options
context:
space:
mode:
authorMike Blumenkrantz <zmike@samsung.com>2018-07-05 17:26:42 -0400
committerMarcel Hollerbach <mail@marcel-hollerbach.de>2018-07-06 15:51:59 +0200
commit36fc0ce77ee61c3ebb2529a0f05fcdf0b6986725 (patch)
treedbfb6603249738549c6eee10bb739b8fb61fd443 /src/lib/efreet
parent017cc0d4a3624fd54fe85bf07efa3db222fc3fa2 (diff)
efreet: simplify and fix efreetd launch
this previously used an entire eina prefix to determine where to find efreetd, when a simpler approach would have been to just pass the directory where it's being installed this also inhibited running the correct efreetd during in-tree builds and tests, as it was using the install prefix instead of the in-tree wrapper script @fix fix T6713 Differential Revision: https://phab.enlightenment.org/D6516
Diffstat (limited to 'src/lib/efreet')
-rw-r--r--src/lib/efreet/efreet_cache.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/src/lib/efreet/efreet_cache.c b/src/lib/efreet/efreet_cache.c
index 8ede4614d6..2a9bdef74d 100644
--- a/src/lib/efreet/efreet_cache.c
+++ b/src/lib/efreet/efreet_cache.c
@@ -37,7 +37,6 @@ struct _Efreet_Old_Cache
37}; 37};
38 38
39static Ecore_Ipc_Server *ipc = NULL; 39static Ecore_Ipc_Server *ipc = NULL;
40static Eina_Prefix *pfx = NULL;
41static Ecore_Event_Handler *hnd_add = NULL; 40static Ecore_Event_Handler *hnd_add = NULL;
42static Ecore_Event_Handler *hnd_del = NULL; 41static Ecore_Event_Handler *hnd_del = NULL;
43static Ecore_Event_Handler *hnd_data = NULL; 42static Ecore_Event_Handler *hnd_data = NULL;
@@ -101,6 +100,7 @@ static void icon_cache_update_free(void *data, void *ev);
101static void *hash_array_string_add(void *hash, const char *key, void *data); 100static void *hash_array_string_add(void *hash, const char *key, void *data);
102 101
103static Eina_Bool disable_cache; 102static Eina_Bool disable_cache;
103static Eina_Bool run_in_tree;
104 104
105EAPI int EFREET_EVENT_ICON_CACHE_UPDATE = 0; 105EAPI int EFREET_EVENT_ICON_CACHE_UPDATE = 0;
106EAPI int EFREET_EVENT_DESKTOP_CACHE_UPDATE = 0; 106EAPI int EFREET_EVENT_DESKTOP_CACHE_UPDATE = 0;
@@ -117,8 +117,10 @@ _ipc_launch(void)
117 char buf[PATH_MAX]; 117 char buf[PATH_MAX];
118 int num = 0; 118 int num = 0;
119 119
120 if (!pfx) snprintf(buf, sizeof(buf), "efreetd"); 120 if (run_in_tree)
121 else snprintf(buf, sizeof(buf), "%s/efreetd", eina_prefix_bin_get(pfx)); 121 bs_binary_get(buf, sizeof(buf), "efreet", "efreetd");
122 else
123 snprintf(buf, sizeof(buf), PACKAGE_BIN_DIR "/efreetd");
122 ecore_exe_run(buf, NULL); 124 ecore_exe_run(buf, NULL);
123 while ((!ipc) && (num < 500)) 125 while ((!ipc) && (num < 500))
124 { 126 {
@@ -307,6 +309,8 @@ efreet_cache_init(void)
307 ERR("Failed to create directory '%s'", buf); 309 ERR("Failed to create directory '%s'", buf);
308 } 310 }
309 311
312 run_in_tree = !!getenv("EFL_RUN_IN_TREE");
313
310 EFREET_EVENT_ICON_CACHE_UPDATE = ecore_event_type_new(); 314 EFREET_EVENT_ICON_CACHE_UPDATE = ecore_event_type_new();
311 EFREET_EVENT_DESKTOP_CACHE_UPDATE = ecore_event_type_new(); 315 EFREET_EVENT_DESKTOP_CACHE_UPDATE = ecore_event_type_new();
312 EFREET_EVENT_DESKTOP_CACHE_BUILD = ecore_event_type_new(); 316 EFREET_EVENT_DESKTOP_CACHE_BUILD = ecore_event_type_new();
@@ -321,9 +325,6 @@ efreet_cache_init(void)
321 325
322 if (efreet_cache_update) 326 if (efreet_cache_update)
323 { 327 {
324 pfx = eina_prefix_new
325 (NULL, efreet_icon_cache_file, "EFREET", "efreet", "checkme",
326 PACKAGE_BIN_DIR, PACKAGE_LIB_DIR, PACKAGE_DATA_DIR, PACKAGE_DATA_DIR);
327 if (disable_cache) 328 if (disable_cache)
328 ipc = NULL; 329 ipc = NULL;
329 else 330 else
@@ -428,7 +429,6 @@ efreet_cache_shutdown(void)
428 IF_RELEASE(util_cache_file); 429 IF_RELEASE(util_cache_file);
429 430
430 if (ipc) ecore_ipc_server_del(ipc); 431 if (ipc) ecore_ipc_server_del(ipc);
431 if (pfx) eina_prefix_free(pfx);
432 if (hnd_add) ecore_event_handler_del(hnd_add); 432 if (hnd_add) ecore_event_handler_del(hnd_add);
433 if (hnd_del) ecore_event_handler_del(hnd_del); 433 if (hnd_del) ecore_event_handler_del(hnd_del);
434 if (hnd_data) ecore_event_handler_del(hnd_data); 434 if (hnd_data) ecore_event_handler_del(hnd_data);
@@ -436,7 +436,6 @@ efreet_cache_shutdown(void)
436 ecore_ipc_shutdown(); 436 ecore_ipc_shutdown();
437 437
438 ipc = NULL; 438 ipc = NULL;
439 pfx = NULL;
440 hnd_add = NULL; 439 hnd_add = NULL;
441 hnd_del = NULL; 440 hnd_del = NULL;
442 hnd_data = NULL; 441 hnd_data = NULL;