DON Database

The DON database tracks various operations performed by DON using DPM and its repository counterparts.

Transactions

One of those items is transactions, or operations involving sets of DPM packages.

For example, a don update will query the dpmdb for all packages on the system, and then cross-reference that list of packages and their versions against what is available for newer versions of those packages in the enabled DON package repos configured on the system. When it finds a newer version of one of those packages it marks that package in the set of packages to update. It will then calculate dependency trees and begin the transaction. After it performs the update operation, it has completed the transaction.

A transaction is represented in the database as:

  1. The package names for that set of packages.
  2. Their initial versions.
  3. Their resulting versions.
  4. The completion status of each individual DPM operation.
  5. The type of operation performed.
  6. The timestamp for when the operation began.
  7. The timestamp for when the operation ended.
  8. A unique, incrementing identifier for the transaction.
  9. The completion status of the whole transaction as a unit.

If a transaction fails midway through, it will halt the remainder of the transaction and mark any packages not yet updated in the set as “not attempted”. The transaction will then be truncated to only packages which were attempted.

The transaction subcommand offers an undo action for transactions with a referenced transaction id.

Repo Associations

The DON database also stores package/repository associations to provide basic logistical tracking of packages installed from remote sources.