chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0d9989a
)
transaction: avoid garbage collecting the anchor job
author
Michal Schmidt
<mschmidt@redhat.com>
Fri, 20 Apr 2012 00:48:24 +0000
(
02:48
+0200)
committer
Michal Schmidt
<mschmidt@redhat.com>
Fri, 20 Apr 2012 15:12:28 +0000
(17:12 +0200)
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).
src/core/transaction.c
patch
|
blob
|
history
diff --git
a/src/core/transaction.c
b/src/core/transaction.c
index cac58e6834769c99df03e09a7d7ca09bfcbeffb2..ddb02c068a8b5075158d438ce45f0fbc7673904f 100644
(file)
--- 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", */