Sophie

Sophie

distrib > CentOS > 5 > x86_64 > by-pkgid > 67e32647b06c0323bf90c6b54a6438d1 > files > 38

rpm-apidocs-4.4.2.3-34.el5.x86_64.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
<title>rpm: Rpmts Class Reference</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
<link href="tabs.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.4.7 -->
<div class="tabs">
  <ul>
    <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
    <li><a href="modules.html"><span>Modules</span></a></li>
    <li id="current"><a href="annotated.html"><span>Data&nbsp;Structures</span></a></li>
    <li><a href="files.html"><span>Files</span></a></li>
    <li><a href="pages.html"><span>Related&nbsp;Pages</span></a></li>
  </ul></div>
<div class="tabs">
  <ul>
    <li><a href="annotated.html"><span>Data&nbsp;Structures</span></a></li>
    <li><a href="functions.html"><span>Data&nbsp;Fields</span></a></li>
  </ul></div>
<h1>Rpmts Class Reference</h1><!-- doxytag: class="Rpmts" -->A python rpm.ts object represents an RPM transaction set.  
<a href="#_details">More...</a>
<p>
<table border="0" cellpadding="0" cellspacing="0">
<tr><td></td></tr>
</table>
<hr><a name="_details"></a><h2>Detailed Description</h2>
A python rpm.ts object represents an RPM transaction set. 
<p>
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.<p>
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:<p>
<ul>
<li><a class="el" href="rpmts_8h.html#081c96e55d490b5e99505eda7e93602daa6d0b979fd5881394e98f2912cff11f">rpm.RPMVSF_NOHDRCHK</a> if set, don't check rpmdb headers</li><li><a class="el" href="rpmts_8h.html#081c96e55d490b5e99505eda7e93602d22ad1bd80773be36567db398437f5c0b">rpm.RPMVSF_NEEDPAYLOAD</a> if not set, check header+payload (if possible)</li><li><a class="el" href="rpmts_8h.html#081c96e55d490b5e99505eda7e93602df7252b6316f6bef89c95f2c5e9f92917">rpm.RPMVSF_NOSHA1HEADER</a> if set, don't check header SHA1 digest</li><li><a class="el" href="rpmts_8h.html#081c96e55d490b5e99505eda7e93602d4ef2f7fca9a94f73d001933a029ae3f3">rpm.RPMVSF_NODSAHEADER</a> if set, don't check header DSA signature</li><li><a class="el" href="rpmts_8h.html#081c96e55d490b5e99505eda7e93602d66c69b05f49ce384ffb126235ba3ad9e">rpm.RPMVSF_NOMD5</a> if set, don't check header+payload MD5 digest</li><li><a class="el" href="rpmts_8h.html#081c96e55d490b5e99505eda7e93602dadb72320d5dbd46383a235c877fd6c92">rpm.RPMVSF_NODSA</a> if set, don't check header+payload DSA signature</li><li><a class="el" href="rpmts_8h.html#081c96e55d490b5e99505eda7e93602d67f42f762ffdc38638984ff9b6ae9a3e">rpm.RPMVSF_NORSA</a> if set, don't check header+payload RSA signature</li></ul>
<p>
For convenience, there are the following masks:<ul>
<li><a class="el" href="rpmts_8h.html#eece22238af582ac0a41afdafa77df77">rpm._RPMVSF_NODIGESTS</a> if set, don't check digest(s).</li><li><a class="el" href="rpmts_8h.html#7515813532c9d4ead6bfd4b51860078f">rpm._RPMVSF_NOSIGNATURES</a> if set, don't check signature(s).</li></ul>
<p>
A rpm.ts object has the following methods:<p>
<ul>
<li>addInstall(hdr,data,mode) Add an install element to a transaction set. <dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>hdr</em>&nbsp;</td><td>the header to be added </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>data</em>&nbsp;</td><td>user data that will be passed to the transaction callback during transaction execution </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>mode</em>&nbsp;</td><td>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').</td></tr>
  </table>
</dl>
</li><li>addErase(name) Add an erase element to a transaction set. <dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>name</em>&nbsp;</td><td>the package name to be erased</td></tr>
  </table>
</dl>
</li><li><a class="el" href="ldebug_8c.html#437fe6dda055faa9899b4268918b8032">check()</a> 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. <dl compact><dt><b>Returns:</b></dt><dd>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 <a class="el" href="rpmlib_8h.html#e48bd9834f11ab42752bb6f0f54ae8a34c2a1220db41f29e290ad886445dde34">rpm.RPMSENSE_LESS</a>, <a class="el" href="rpmlib_8h.html#e48bd9834f11ab42752bb6f0f54ae8a31ad14f14d5f219dfe3b78b4418ba7dc1">rpm.RPMSENSE_GREATER</a>, and <a class="el" href="rpmlib_8h.html#e48bd9834f11ab42752bb6f0f54ae8a356de61e4a13c4ee1e60ef828dc1720aa">rpm.RPMSENSE_EQUAL</a> 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 <a class="el" href="rpmts-py_8h.html#ae05225933a42f81e7c4a9fb286596f99eac478d37d0030bf059642b736cdf28">rpm.RPMDEP_SENSE_CONFLICTS</a> and <a class="el" href="rpmts-py_8h.html#ae05225933a42f81e7c4a9fb286596f91151eacdc46a152367ba710692d7ba8c">rpm.RPMDEP_SENSE_REQUIRES</a> are set to show a dependency as a requirement or a conflict.</dd></dl>
</li><li>ts.order() Do a topological sort of added element relations. <dl compact><dt><b>Returns:</b></dt><dd>None</dd></dl>
</li><li>ts.setFlags(transFlags) Set transaction set flags. <dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>transFlags</em>&nbsp;</td><td>- bit(s) to controll transaction operations. The following values can be logically OR'ed together:<ul>
<li><a class="el" href="rpmlib_8h.html#ca72ece8019aa198fc445bd206caa3f4ae4f59c5196be0e44be7e0f6cd4e8c6e">rpm.RPMTRANS_FLAG_TEST</a> - test mode, do not modify the RPM database, change any files, or run any package scripts</li><li><a class="el" href="rpmlib_8h.html#ca72ece8019aa198fc445bd206caa3f4d9f6cd87e4775171357d3cfa19da734d">rpm.RPMTRANS_FLAG_BUILD_PROBS</a> - only build a list of problems encountered when attempting to run this transaction set</li><li><a class="el" href="rpmlib_8h.html#ca72ece8019aa198fc445bd206caa3f46988ca89fe9d797c4ed54838dd39239f">rpm.RPMTRANS_FLAG_NOSCRIPTS</a> - do not execute package scripts</li><li><a class="el" href="rpmlib_8h.html#ca72ece8019aa198fc445bd206caa3f47ef9385f5ecbc714a81aa2fe228f5bca">rpm.RPMTRANS_FLAG_JUSTDB</a> - only make changes to the rpm database, do not modify files.</li><li><a class="el" href="rpmlib_8h.html#ca72ece8019aa198fc445bd206caa3f4a099d815220def1f9f839ca7b416e726">rpm.RPMTRANS_FLAG_NOTRIGGERS</a> - do not run trigger scripts</li><li><a class="el" href="rpmlib_8h.html#ca72ece8019aa198fc445bd206caa3f48a55235b4c4fcbf0f39517a97b4107e1">rpm.RPMTRANS_FLAG_NODOCS</a> - do not install files marked as doc</li><li><a class="el" href="rpmlib_8h.html#ca72ece8019aa198fc445bd206caa3f4a64d5e599c417d2d344bb171b41808c6">rpm.RPMTRANS_FLAG_ALLFILES</a> - create all files, even if a file is marked config(missingok) and an upgrade is being performed.</li><li><a class="el" href="rpmlib_8h.html#ca72ece8019aa198fc445bd206caa3f42bdbff9b5eeede8717c82d4452591feb">rpm.RPMTRANS_FLAG_KEEPOBSOLETE</a> - do not remove obsoleted packages. </li></ul>
</td></tr>
  </table>
</dl>
<dl compact><dt><b>Returns:</b></dt><dd>previous transFlags</dd></dl>
</li><li>ts.setProbFilter(ignoreSet) Set transaction set problem filter. <dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>problemSetFilter</em>&nbsp;</td><td>- control bit(s) to ignore classes of problems, a logical or of one or more of the following bit(s):<ul>
<li><a class="el" href="rpmlib_8h.html#b4ea02ce77eec78f106088cbccd9b65ee1fa81b650298dc09197bd322590d976">rpm.RPMPROB_FILTER_IGNOREOS</a> -</li><li><a class="el" href="rpmlib_8h.html#b4ea02ce77eec78f106088cbccd9b65e473feeaed4eee05ed944809afb222fd0">rpm.RPMPROB_FILTER_IGNOREARCH</a> -</li><li><a class="el" href="rpmlib_8h.html#b4ea02ce77eec78f106088cbccd9b65ec284ea14b5b06e684714d6e57243f6b7">rpm.RPMPROB_FILTER_REPLACEPKG</a> -</li><li><a class="el" href="rpmlib_8h.html#b4ea02ce77eec78f106088cbccd9b65e4a27dc1f6d61df96497dc5e47d9d7280">rpm.RPMPROB_FILTER_FORCERELOCATE</a> -</li><li><a class="el" href="rpmlib_8h.html#b4ea02ce77eec78f106088cbccd9b65ea99c7672ad3d8eb6b6431b31a7f94009">rpm.RPMPROB_FILTER_REPLACENEWFILES</a> -</li><li><a class="el" href="rpmlib_8h.html#b4ea02ce77eec78f106088cbccd9b65ef75072a3237c354355435e42793a347b">rpm.RPMPROB_FILTER_REPLACEOLDFILES</a> -</li><li><a class="el" href="rpmlib_8h.html#b4ea02ce77eec78f106088cbccd9b65eb25146a99597dde163b18b809b1bc7c2">rpm.RPMPROB_FILTER_OLDPACKAGE</a> -</li><li><a class="el" href="rpmlib_8h.html#b4ea02ce77eec78f106088cbccd9b65e6fdea588481ca5b252cede0174c973f0">rpm.RPMPROB_FILTER_DISKSPACE</a> - </li></ul>
</td></tr>
  </table>
</dl>
<dl compact><dt><b>Returns:</b></dt><dd>previous ignoreSet</dd></dl>
</li><li>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. </li></ul>

<p>
<hr>The documentation for this class was generated from the following file:<ul>
<li>python/<a class="el" href="rpmts-py_8c-source.html">rpmts-py.c</a></ul>
<hr size="1"><address style="align: right;"><small>Generated on 1 Oct 2013 for rpm by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.7 </small></address>
</body>
</html>