summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMichal Schmidt <mschmidt@redhat.com>2014-11-26 16:33:46 +0100
committerMichal Schmidt <mschmidt@redhat.com>2014-11-26 16:33:46 +0100
commite0312f4db08c7100bd00299614e87bedc759b366 (patch)
treec963d55fba0dbeab64a4c358bc23a5d45f214380 /src
parent61da906a744594002c2c967ecf6ec7899c7a9397 (diff)
core: fix check for transaction destructiveness
When checking if the transaction is destructive, we need to check if the previously installed job is a superset of the new job (and hence the new job will fold into the installed one without changing it), not the other way around.
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 bbaa6daa76..b992eddf99 100644
--- a/src/core/transaction.c
+++ b/src/core/transaction.c
@@ -511,7 +511,7 @@ static int transaction_is_destructive(Transaction *tr, JobMode mode, sd_bus_erro
assert(!j->transaction_next);
if (j->unit->job && (mode == JOB_FAIL || j->unit->job->irreversible) &&
- !job_type_is_superset(j->type, j->unit->job->type))
+ !job_type_is_superset(j->unit->job->type, j->type))
return sd_bus_error_setf(e, BUS_ERROR_TRANSACTION_IS_DESTRUCTIVE,
"Transaction is destructive.");
}