summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMichal Schmidt <mschmidt@redhat.com>2012-04-20 02:48:24 +0200
committerMichal Schmidt <mschmidt@redhat.com>2012-04-20 17:12:28 +0200
commit38809d9dfed4c75d9e97c4e5da2ff957723c4cad (patch)
tree62bd3c1e1b5c030b501ccb3cd9b1ba3514be6d08 /src
parent0d9989aa68963037a18fb7ed4f309f6155927d70 (diff)
transaction: avoid garbage collecting the anchor job
Make sure the anchor job is never considered garbage, even if it has no links leading to it (this will be allowed in the next patch).
Diffstat (limited to 'src')
-rw-r--r--src/core/transaction.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/core/transaction.c b/src/core/transaction.c
index cac58e6834..ddb02c068a 100644
--- a/src/core/transaction.c
+++ b/src/core/transaction.c
@@ -454,7 +454,7 @@ static void transaction_collect_garbage(Transaction *tr) {
again = false;
HASHMAP_FOREACH(j, tr->jobs, i) {
- if (j->object_list) {
+ if (tr->anchor_job == j || j->object_list) {
/* log_debug("Keeping job %s/%s because of %s/%s", */
/* j->unit->id, job_type_to_string(j->type), */
/* j->object_list->subject ? j->object_list->subject->unit->id : "root", */