chiark / gitweb /
transaction: do not add installed jobs to the transaction
authorMichal Schmidt <mschmidt@redhat.com>
Wed, 18 Apr 2012 16:15:49 +0000 (18:15 +0200)
committerMichal Schmidt <mschmidt@redhat.com>
Fri, 20 Apr 2012 15:12:28 +0000 (17:12 +0200)
Do not attempt to optimize away the job creation by refering to installed jobs.
We do not want to disturb installed jobs until commiting the transaction.

(A later patch to job merging will make the separation of transaction jobs and
installed jobs complete.)

src/core/transaction.c

index 2a6f1de1384e7a246ec1be3cc3931b9818695da2..c00dd452eb1249f3c6d24dbb131faa9ca815147a 100644 (file)
@@ -760,13 +760,9 @@ static Job* transaction_add_one_job(Transaction *tr, JobType type, Unit *unit, b
                 }
         }
 
-        if (unit->job && unit->job->type == type)
-                j = unit->job;
-        else {
-                j = job_new(unit, type);
-                if (!j)
-                        return NULL;
-        }
+        j = job_new(unit, type);
+        if (!j)
+                return NULL;
 
         j->generation = 0;
         j->marker = NULL;