Rpmts Class Reference
A python rpm.ts object represents an RPM transaction set.
More...
Detailed Description
A python rpm.ts object represents an RPM transaction set.
The transaction set is the workhorse of RPM. It performs the installation and upgrade of packages. The rpm.ts 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 the verify signature disable flags, a set of the following bits:
For convenience, there are the following masks:
A rpm.ts object has the following methods:
- addInstall(hdr,data,mode) Add an install element to a transaction set.
- Parameters:
-
| hdr | 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'). |
- addErase(name) Add an erase element to a transaction set.
- Parameters:
-
- check() Perform a dependency 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.RPMSENSE_LESS, rpm.RPMSENSE_GREATER, and rpm.RPMSENSE_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.
- ts.order() Do a topological sort of added element relations.
- Returns:
- None
- ts.setFlags(transFlags) Set transaction set flags.
- Parameters:
-
| transFlags | - bit(s) to controll transaction operations. The following values can be logically OR'ed together:
|
- Returns:
- previous transFlags
- ts.setProbFilter(ignoreSet) Set transaction set problem filter.
- Parameters:
-
| problemSetFilter | - control bit(s) to ignore classes of problems, a logical or of one or more of the following bit(s):
|
- Returns:
- previous ignoreSet
- ts.run(callback,data) Attempt to execute a transaction set. After the transaction set has been populated with install/upgrade or erase actions, the transaction set can be executed by invoking the ts.run() method.
The documentation for this class was generated from the following file:
Generated on Fri Oct 12 08:44:57 2007 for rpm by
1.5.2