summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2010-01-20 19:20:15 +0100
committerLennart Poettering <lennart@poettering.net>2010-01-20 19:20:15 +0100
commit1e198baf11cd0c34ef0c6f326c8a75b046552a33 (patch)
tree264dde72557b2b199a41f576ead14142ff51340a
parent16354eff99fe673f912862138c4dce30bbd0afb5 (diff)
recursively kill jobs from transaction list
-rw-r--r--manager.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/manager.c b/manager.c
index 456eb8db1c..41124fff89 100644
--- a/manager.c
+++ b/manager.c
@@ -487,8 +487,17 @@ void manager_transaction_delete_job(Manager *m, Job *j) {
while (j->subject_list)
job_dependency_free(j->subject_list);
- while (j->object_list)
+
+ while (j->object_list) {
+ Job *other = j->object_list->matters ? j->object_list->subject : NULL;
+
job_dependency_free(j->object_list);
+
+ if (other) {
+ log_debug("Deleting job %s, as dependency of job %s", name_id(j->name), name_id(other->name));
+ manager_transaction_delete_job(m, other);
+ }
+ }
}
static int transaction_add_job_and_dependencies(Manager *m, JobType type, Name *name, Job *by, bool matters, bool force, Job **_ret) {