summaryrefslogtreecommitdiff
path: root/src/core/transaction.c
AgeCommit message (Collapse)Author
2012-04-22transaction: add missing emacs and license headersLennart Poettering
2012-04-20transaction: add starting requirements for JOB_RESTARTMichal Schmidt
While having a Requires= dependency between units, the dependency is started automatically on "systemctl start", but it's not started on "systemctl restart". JOB_RESTART jobs did not pull the dependencies for starting into the transaction. https://bugzilla.redhat.com/show_bug.cgi?id=802770 Note that the other bug noted in comment #2 has been fixed already by avoiding the deletion of anchor jobs.
2012-04-20transaction: remove checks for installedMichal Schmidt
Transactions cannot contain installed jobs anymore. Remove the now pointless checks.
2012-04-20transaction: rework merging with installed jobsMichal Schmidt
Previously transactions could reference installed jobs. It made some issues difficult to fix. This sets new rules for jobs: A job cannot be both a member of a transaction and installed. When jobs are created, they are linked to a transaction. The whole transaction is constructed (with merging of jobs within, etc.). When it's complete, all the jobs are unlinked from it one by one and let to install themselves. It is during the installation when merging with previously installed jobs (from older transactions) is contemplated. Merging with installed jobs has different rules than merging within a transaction: - An installed conflicting job gets cancelled. It cannot be simply deleted, because someone might be waiting for its completion on DBus. - An installed, but still waiting, job can be safely merged into. - An installed and running job can be tricky. For some job types it is safe to just merge. For the other types we merge anyway, but put the job back into JOB_WAITING to allow it to run again. This may be suboptimal, but it is not currently possible to have more than one installed job for a unit. Note this also fixes a bug where the anchor job could be deleted during merging within the transaction.
2012-04-20job: separate job_install()Michal Schmidt
Let the jobs install themselves.
2012-04-20transaction: remove a couple of assertsMichal Schmidt
We already asserted these facts in the previous loop.
2012-04-20transaction: remove the anchor linkMichal Schmidt
tr->anchor_job is sufficient.
2012-04-20transaction: avoid garbage collecting the anchor jobMichal Schmidt
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).
2012-04-20transaction: simplify transaction_find_jobs_that_matter_to_anchor()Michal Schmidt
2012-04-20transaction: change the linking of isolate jobs to the anchorMichal Schmidt
When isolating, the JOB_STOP jobs have no parent job, so they are all peers of the real anchor job. This is a bit odd. Link them from the anchor job.
2012-04-20transaction: maintain anchor_jobMichal Schmidt
Track which job is the anchor in the transaction.
2012-04-20transaction: do not add installed jobs to the transactionMichal Schmidt
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.)
2012-04-20job: jobs shouldn't need to know about transaction anchorsMichal Schmidt
Let the transactions maintain their own anchor links.
2012-04-20job: job_new() can find the manager from the unitMichal Schmidt
2012-04-20manager: split transaction.[ch]Michal Schmidt
manager.c takes care of the main loop, unit management, signal handling, ... transaction.c computes transactions. After split: manager.c: 65 KB transaction.c: 40 KB