summaryrefslogtreecommitdiff
path: root/src/shared/install.c
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2016-10-16 21:27:57 -0400
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2016-10-18 21:30:51 -0400
commitdb093eed04cf88aa75c58cb7a69d55d669af0e34 (patch)
treed1aef67379eecd32e842e1950dfd352e3cfba850 /src/shared/install.c
parent19539807b597274275271c82113e8eb2850bb19f (diff)
shared/install: provide more info if install_info_traverse_fails
Test case: [Install] WantedBy= default.target Also=foobar-unknown.service Before: $ systemctl --root=/ enable testing2@instance.service Failed to enable: No such file or directory. After $ ./systemctl --root=/ enable testing2@instance.service Failed to enable unit, file foobar-unknown.service: No such file or directory.
Diffstat (limited to 'src/shared/install.c')
-rw-r--r--src/shared/install.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/shared/install.c b/src/shared/install.c
index 9e26284ade..32f7edc8cc 100644
--- a/src/shared/install.c
+++ b/src/shared/install.c
@@ -1713,8 +1713,10 @@ static int install_context_apply(
return q;
r = install_info_traverse(scope, c, paths, i, flags, NULL);
- if (r < 0)
+ if (r < 0) {
+ unit_file_changes_add(changes, n_changes, r, i->name, NULL);
return r;
+ }
/* We can attempt to process a masked unit when a different unit
* that we were processing specifies it in Also=. */