Rpm Class Reference

START HERE / RPM base module for the Python API. More...

Detailed Description

START HERE / RPM base module for the Python API.

The rpm base module provides the main starting point for accessing RPM from Python. For most usage, call the TransactionSet method to get a transaction set (rpmts).

For example:

        import rpm

        ts = rpm.TransactionSet()

The transaction set will open the RPM database as needed, so in most cases, you do not need to explicitly open the database. The transaction set is the workhorse of RPM.

You can open another RPM database, such as one that holds all packages for a given Linux distribution, to provide packages used to solve dependencies. To do this, use the following code:

 rpm.addMacro('_dbpath', '/path/to/alternate/database')
 solvets = rpm.TransactionSet()

 # Open default database
 ts = rpm.TransactionSet()

This code gives you access to two RPM databases through two transaction sets (rpmts): ts is a transaction set associated with the default RPM database and solvets is a transaction set tied to an alternate database, which is very useful for resolving dependencies.

The rpm methods used here are:

The documentation for this class was generated from the following file:
Generated on Fri Oct 12 08:44:57 2007 for rpm by  doxygen 1.5.2