From 9ea024f6b5a9626ddabeb4c4d4385481b52d211e Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Wed, 20 Jan 2010 20:51:58 +0100 Subject: [PATCH] add test for garbage collector --- manager.c | 4 +++- test2/b.service | 1 + test2/f.service | 2 ++ 3 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 test2/f.service diff --git a/manager.c b/manager.c index c71bceb4..da2d4334 100644 --- a/manager.c +++ b/manager.c @@ -315,6 +315,8 @@ static void transaction_collect_garbage(Manager *m) { if (j->object_list) continue; + log_debug("Garbage collecting job %s", name_id(j->name)); + transaction_delete_job(m, j); again = true; break; @@ -504,7 +506,7 @@ void manager_transaction_unlink_job(Manager *m, Job *j) { job_dependency_free(j->object_list); if (other) { - log_debug("Deleting job %s dependency of job %s", name_id(other->name), name_id(j->name)); + log_debug("Deleting job %s as dependency of job %s", name_id(other->name), name_id(j->name)); transaction_delete_job(m, other); } } diff --git a/test2/b.service b/test2/b.service index b096e0d3..ca946073 100644 --- a/test2/b.service +++ b/test2/b.service @@ -1,2 +1,3 @@ [Meta] Description=B +Wants=f.service diff --git a/test2/f.service b/test2/f.service new file mode 100644 index 00000000..d0b30eff --- /dev/null +++ b/test2/f.service @@ -0,0 +1,2 @@ +[Meta] +Description=F -- 2.39.5