rpmtrans Class Reference
A python rpmtrans object represents an RPM transaction set.
More...
Detailed Description
A python rpmtrans object represents an RPM transaction set.
The transaction set is the workhorse of RPM. It performs the installation and upgrade of packages. The rpmtrans object is instantiated by the TransactionSet function in the rpm module.
The TransactionSet function takes two optional arguments. The first argument is the root path, the second is an open database to perform the transaction set upon.
A rpmtrans object has the following methods:
- add(header,data,mode) Add a binary package to a transaction set.
- Parameters:
-
| header | the header to be added |
| data | user data that will be passed to the transaction callback during transaction execution |
| mode | optional argument that specifies if this package should be installed ('i'), upgraded ('u'), or if it is just available to the transaction when computing dependencies but no action should be performed with it ('a'). |
- remove
- depcheck() Perform a dependency and conflict check on the transaction set. After headers have been added to a transaction set, a dependency check can be performed to make sure that all package dependencies are satisfied.
- Returns:
- None If there are no unresolved dependencies Otherwise a list of complex tuples is returned, one tuple per unresolved dependency, with The format of the dependency tuple is: ((packageName, packageVersion, packageRelease), (reqName, reqVersion), needsFlags, suggestedPackage, sense) packageName, packageVersion, packageRelease are the name, version, and release of the package that has the unresolved dependency or conflict. The reqName and reqVersion are the name and version of the requirement or conflict. The needsFlags is a bitfield that describes the versioned nature of a requirement or conflict. The constants rpm.RPMDEP_SENSE_LESS, rpm.RPMDEP_SENSE_GREATER, and rpm.RPMDEP_SENSE_EQUAL can be logical ANDed with the needsFlags to get versioned dependency information. suggestedPackage is a tuple if the dependency check was aware of a package that solves this dependency problem when the dependency check was run. Packages that are added to the transaction set as "available" are examined during the dependency check as possible dependency solvers. The tuple contains two values, (header, suggestedName). These are set to the header of the suggested package and its name, respectively. If there is no known package to solve the dependency problem, suggestedPackage is None. The constants rpm.RPMDEP_SENSE_CONFLICTS and rpm.RPMDEP_SENSE_REQUIRES are set to show a dependency as a requirement or a conflict.
- run(flags,problemSetFilter,callback,data) Attempt to execute a transaction set. After the transaction set has been populated with install and upgrade actions, it can be executed by invoking the run() method.
- Parameters:
-
| flags | - modifies the behavior of the transaction set as it is processed. The following values can be locical ORed together:
|
| problemSetFilter | - control bit(s) to ignore classes of problems, any of
|
The documentation for this class was generated from the following file:
Generated on Wed Mar 8 18:19:49 2006 for rpm by
1.4.6