Blame SOURCES/0106-service-don-t-add-After-dependencies-on-.busname-uni.patch
|
|
1ff636 |
From 7c1b21bad54714f04d0d2a8c77008408affe7067 Mon Sep 17 00:00:00 2001
|
|
|
1ff636 |
From: Michael Biebl <biebl@debian.org>
|
|
|
1ff636 |
Date: Sat, 14 Mar 2015 16:48:54 +0100
|
|
|
1ff636 |
Subject: [PATCH] service: don't add After= dependencies on .busname units if
|
|
|
1ff636 |
kdbus support is disabled
|
|
|
1ff636 |
|
|
|
1ff636 |
(cherry picked from commit 6962fd3bd28cb5d3aaff69c1e3b6cc006e7c8426)
|
|
|
1ff636 |
---
|
|
|
1ff636 |
src/core/service.c | 8 +++++---
|
|
|
1ff636 |
1 file changed, 5 insertions(+), 3 deletions(-)
|
|
|
1ff636 |
|
|
|
1ff636 |
diff --git a/src/core/service.c b/src/core/service.c
|
|
|
c62b8e |
index 7781b4e626..ae5e610008 100644
|
|
|
1ff636 |
--- a/src/core/service.c
|
|
|
1ff636 |
+++ b/src/core/service.c
|
|
|
1ff636 |
@@ -556,14 +556,16 @@ static int service_add_extras(Service *s) {
|
|
|
1ff636 |
s->notify_access = NOTIFY_MAIN;
|
|
|
1ff636 |
|
|
|
1ff636 |
if (s->bus_name) {
|
|
|
1ff636 |
+#ifdef ENABLE_KDBUS
|
|
|
1ff636 |
const char *n;
|
|
|
1ff636 |
|
|
|
1ff636 |
- r = unit_watch_bus_name(UNIT(s), s->bus_name);
|
|
|
1ff636 |
+ n = strjoina(s->bus_name, ".busname");
|
|
|
1ff636 |
+ r = unit_add_dependency_by_name(UNIT(s), UNIT_AFTER, n, NULL, true);
|
|
|
1ff636 |
if (r < 0)
|
|
|
1ff636 |
return r;
|
|
|
1ff636 |
+#endif
|
|
|
1ff636 |
|
|
|
1ff636 |
- n = strjoina(s->bus_name, ".busname");
|
|
|
1ff636 |
- r = unit_add_dependency_by_name(UNIT(s), UNIT_AFTER, n, NULL, true);
|
|
|
1ff636 |
+ r = unit_watch_bus_name(UNIT(s), s->bus_name);
|
|
|
1ff636 |
if (r < 0)
|
|
|
1ff636 |
return r;
|
|
|
1ff636 |
}
|