aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'docs/build/html/api.html')
-rw-r--r--docs/build/html/api.html183
1 files changed, 173 insertions, 10 deletions
diff --git a/docs/build/html/api.html b/docs/build/html/api.html
index c20b82b..a9fe272 100644
--- a/docs/build/html/api.html
+++ b/docs/build/html/api.html
@@ -7,7 +7,7 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
- <title>9. API &mdash; Autodep v0.1 documentation</title>
+ <title>API &mdash; Autodep documentation</title>
<link rel="stylesheet" href="_static/default.css" type="text/css" />
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<script type="text/javascript">
@@ -22,8 +22,8 @@
<script type="text/javascript" src="_static/jquery.js"></script>
<script type="text/javascript" src="_static/underscore.js"></script>
<script type="text/javascript" src="_static/doctools.js"></script>
- <link rel="top" title="Autodep v0.1 documentation" href="index.html" />
- <link rel="prev" title="8. architecture – Internals" href="architecture.html" />
+ <link rel="top" title="Autodep documentation" href="index.html" />
+ <link rel="prev" title="Internals" href="architecture.html" />
</head>
<body>
<div class="related">
@@ -36,9 +36,9 @@
<a href="py-modindex.html" title="Python Module Index"
>modules</a> |</li>
<li class="right" >
- <a href="architecture.html" title="8. architecture – Internals"
+ <a href="architecture.html" title="Internals"
accesskey="P">previous</a> |</li>
- <li><a href="index.html">Autodep v0.1 documentation</a> &raquo;</li>
+ <li><a href="index.html">Autodep</a> &raquo;</li>
</ul>
</div>
@@ -48,8 +48,161 @@
<div class="body">
<div class="section" id="api">
-<h1>9. <tt class="xref py py-mod docutils literal"><span class="pre">API</span></tt><a class="headerlink" href="#api" title="Permalink to this headline">¶</a></h1>
-<p>hello</p>
+<h1>API<a class="headerlink" href="#api" title="Permalink to this headline">¶</a></h1>
+<div class="section" id="module-logfs.fstracer">
+<span id="logfs-fstracer"></span><h2>logfs.fstracer<a class="headerlink" href="#module-logfs.fstracer" title="Permalink to this headline">¶</a></h2>
+<p>This module is a bridge between low-level logging services and high level
+handling dependency logic.</p>
+<p>It can be used to launch a program and get all file events</p>
+<dl class="function">
+<dt id="logfs.fstracer.getfsevents">
+<tt class="descclassname">logfs.fstracer.</tt><tt class="descname">getfsevents</tt><big>(</big><em>prog_name</em>, <em>arguments</em>, <em>approach='hooklib'</em>, <em>filterproc=&lt;function defaultfilter at 0x1ac2b90&gt;</em><big>)</big><a class="reference internal" href="_modules/logfs/fstracer.html#getfsevents"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#logfs.fstracer.getfsevents" title="Permalink to this definition">¶</a></dt>
+<dd><p>Launches a program and gets file access events</p>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
+<li><strong>prog_name</strong> &#8211; name of program</li>
+<li><strong>arguments</strong> &#8211; list of program&#8217;s arguments</li>
+<li><strong>approach</strong> &#8211; a logging approach(&#8216;hooklib&#8217; or &#8216;fusefs&#8217;)</li>
+<li><strong>filterproc</strong> &#8211; filter function, this function should take 3 strings:
+name of event, name of file and stage, and return a <em>True</em> if event is
+allowed and <em>False</em> instead. Name of event is one of <em>&#8216;open&#8217;</em>, <em>&#8216;read&#8217;</em> or
+<em>&#8216;write&#8217;</em>. Default function always returns <em>True</em>.</li>
+</ul>
+</td>
+</tr>
+<tr class="field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last"><strong>list</strong> with two elements - <em>success</em> events and <em>failed</em> events.
+Each element is dictionary <strong>stage-&gt;file information</strong>.
+File information is also a dictionary <strong>filename-&gt;type of events</strong>.
+Type of events for success events is a 2-element tuple: <em>(was file readed,
+was file writed)</em>. For failed events it is also 2-element tuple:
+<em>(was file not found, was file blocked by filterproc)</em>. Each element of
+tuple can be <em>True</em> or <em>False</em>. Both elements of tuple can be <em>False</em>.
+Stage can be <em>&#8216;unknown&#8217;</em></p>
+</td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+</div>
+<div class="section" id="package-utils">
+<h2>package_utils<a class="headerlink" href="#package-utils" title="Permalink to this headline">¶</a></h2>
+<p>This package contains modules which works with the Portage system</p>
+<span class="target" id="module-package_utils.portage_log_parser"></span><dl class="function">
+<dt id="package_utils.portage_log_parser.get_list_of_merged_packages">
+<tt class="descclassname">package_utils.portage_log_parser.</tt><tt class="descname">get_list_of_merged_packages</tt><big>(</big><em>starttime=0</em>, <em>endtime=-1</em><big>)</big><a class="reference internal" href="_modules/package_utils/portage_log_parser.html#get_list_of_merged_packages"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#package_utils.portage_log_parser.get_list_of_merged_packages" title="Permalink to this definition">¶</a></dt>
+<dd><p>Parses an emerge log and finds first successfully merged packages chain</p>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
+<li><strong>starttime</strong> &#8211; start time for searching(in seconds since 1970)</li>
+<li><strong>starttime</strong> &#8211; end time for searching(in seconds since 1970).</li>
+</ul>
+</td>
+</tr>
+<tr class="field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last"><strong>list</strong> of package names</p>
+</td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<span class="target" id="module-package_utils.portage_utils"></span><dl class="function">
+<dt id="package_utils.portage_utils.getfilesbypackage">
+<tt class="descclassname">package_utils.portage_utils.</tt><tt class="descname">getfilesbypackage</tt><big>(</big><em>packagename</em><big>)</big><a class="reference internal" href="_modules/package_utils/portage_utils.html#getfilesbypackage"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#package_utils.portage_utils.getfilesbypackage" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field"><th class="field-name">Parameters:</th><td class="field-body"><strong>packagename</strong> &#8211; name of package</td>
+</tr>
+<tr class="field"><th class="field-name">Returns:</th><td class="field-body"><strong>list</strong> of files in package with name <em>packagename</em></td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="function">
+<dt id="package_utils.portage_utils.getpackagesbyfiles">
+<tt class="descclassname">package_utils.portage_utils.</tt><tt class="descname">getpackagesbyfiles</tt><big>(</big><em>files</em><big>)</big><a class="reference internal" href="_modules/package_utils/portage_utils.html#getpackagesbyfiles"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#package_utils.portage_utils.getpackagesbyfiles" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field"><th class="field-name">Parameters:</th><td class="field-body"><strong>files</strong> &#8211; list of filenames</td>
+</tr>
+<tr class="field"><th class="field-name">Returns:</th><td class="field-body"><strong>dictionary</strong> file-&gt;package, if file doesn&#8217;t belong to any
+package it not returned as key of this dictionary</td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<span class="target" id="module-package_utils.portage_misc_functions"></span><dl class="class">
+<dt id="package_utils.portage_misc_functions.portage_api">
+<em class="property">class </em><tt class="descclassname">package_utils.portage_misc_functions.</tt><tt class="descname">portage_api</tt><a class="reference internal" href="_modules/package_utils/portage_misc_functions.html#portage_api"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#package_utils.portage_misc_functions.portage_api" title="Permalink to this definition">¶</a></dt>
+<dd><p>class for accessing the portage api</p>
+<dl class="method">
+<dt id="package_utils.portage_misc_functions.portage_api.get_deps">
+<tt class="descname">get_deps</tt><big>(</big><em>pkg, dep_type=['RDEPEND', 'DEPEND']</em><big>)</big><a class="reference internal" href="_modules/package_utils/portage_misc_functions.html#portage_api.get_deps"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#package_utils.portage_misc_functions.portage_api.get_deps" title="Permalink to this definition">¶</a></dt>
+<dd><p>Gets current dependencies of a package on any depth</p>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
+<li><strong>pkg</strong> &#8211; name of package</li>
+<li><strong>dep_type</strong> &#8211; type of dependencies to recurse. Can be [&#8220;DEPEND&#8221;] or
+[&#8220;RDEPEND&#8221;, &#8220;DEPEND&#8221;]</li>
+</ul>
+</td>
+</tr>
+<tr class="field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last"><strong>set</strong> of packages names</p>
+</td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="method">
+<dt id="package_utils.portage_misc_functions.portage_api.get_system_packages_list">
+<tt class="descname">get_system_packages_list</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/package_utils/portage_misc_functions.html#portage_api.get_system_packages_list"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#package_utils.portage_misc_functions.portage_api.get_system_packages_list" title="Permalink to this definition">¶</a></dt>
+<dd><p>returns all packages from system set. They are always implicit dependencies</p>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field"><th class="field-name">Returns:</th><td class="field-body"><strong>list</strong> of package names</td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="method">
+<dt id="package_utils.portage_misc_functions.portage_api.parse_emerge_args">
+<tt class="descname">parse_emerge_args</tt><big>(</big><em>args</em><big>)</big><a class="reference internal" href="_modules/package_utils/portage_misc_functions.html#portage_api.parse_emerge_args"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#package_utils.portage_misc_functions.portage_api.parse_emerge_args" title="Permalink to this definition">¶</a></dt>
+<dd><p>call emerge arguments parser</p>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field"><th class="field-name">Parameters:</th><td class="field-body"><strong>args</strong> &#8211; arguments passed to emerge</td>
+</tr>
+<tr class="field"><th class="field-name">Returns:</th><td class="field-body"><strong>tuple</strong> (action string, options dictionary, files or atoms
+list)</td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+</dd></dl>
+
+</div>
</div>
@@ -58,9 +211,18 @@
</div>
<div class="sphinxsidebar">
<div class="sphinxsidebarwrapper">
+ <h3><a href="index.html">Table Of Contents</a></h3>
+ <ul>
+<li><a class="reference internal" href="#">API</a><ul>
+<li><a class="reference internal" href="#module-logfs.fstracer">logfs.fstracer</a></li>
+<li><a class="reference internal" href="#package-utils">package_utils</a></li>
+</ul>
+</li>
+</ul>
+
<h4>Previous topic</h4>
<p class="topless"><a href="architecture.html"
- title="previous chapter">8. <tt class="docutils literal"><span class="pre">architecture</span></tt> &#8211; Internals</a></p>
+ title="previous chapter">Internals</a></p>
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="_sources/api.txt"
@@ -93,13 +255,14 @@
<a href="py-modindex.html" title="Python Module Index"
>modules</a> |</li>
<li class="right" >
- <a href="architecture.html" title="8. architecture – Internals"
+ <a href="architecture.html" title="Internals"
>previous</a> |</li>
- <li><a href="index.html">Autodep v0.1 documentation</a> &raquo;</li>
+ <li><a href="index.html">Autodep</a> &raquo;</li>
</ul>
</div>
<div class="footer">
&copy; Copyright 2011, Alexander Bersenev.
+ Last updated on Jul 25, 2011.
Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.7.
</div>
</body>