New lorax documentation - 29.6

This commit is contained in:
Brian C. Lane 2018-06-04 16:27:56 -07:00
parent d47d38e0c8
commit 84ee526d3f
75 changed files with 1706 additions and 429 deletions

View File

@ -44,6 +44,14 @@ composer.cli.projects module
:undoc-members: :undoc-members:
:show-inheritance: :show-inheritance:
composer.cli.sources module
---------------------------
.. automodule:: composer.cli.sources
:members:
:undoc-members:
:show-inheritance:
composer.cli.utilities module composer.cli.utilities module
----------------------------- -----------------------------

View File

@ -1,4 +1,4 @@
# Sphinx build info version 1 # Sphinx build info version 1
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done. # This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
config: 05d2025242aa5b20580579fa62643e7f config: 4c6f9af3e5a5bd9313fae6f1efffedc1
tags: 645f666f9bcd5a90fca523b33c5a78b7 tags: 645f666f9bcd5a90fca523b33c5a78b7

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -8,7 +8,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>composer.cli &mdash; Lorax 29.1 documentation</title> <title>composer.cli &mdash; Lorax 29.6 documentation</title>
@ -57,7 +57,7 @@
<div class="version"> <div class="version">
29.1 29.6
</div> </div>
@ -153,8 +153,7 @@
<div itemprop="articleBody"> <div itemprop="articleBody">
<h1>Source code for composer.cli</h1><div class="highlight"><pre> <h1>Source code for composer.cli</h1><div class="highlight"><pre>
<span></span><span class="ch">#!/usr/bin/python</span> <span></span><span class="c1">#</span>
<span class="c1">#</span>
<span class="c1"># composer-cli</span> <span class="c1"># composer-cli</span>
<span class="c1">#</span> <span class="c1">#</span>
<span class="c1"># Copyright (C) 2018 Red Hat, Inc.</span> <span class="c1"># Copyright (C) 2018 Red Hat, Inc.</span>
@ -179,12 +178,14 @@
<span class="kn">from</span> <span class="nn">composer.cli.modules</span> <span class="k">import</span> <span class="n">modules_cmd</span> <span class="kn">from</span> <span class="nn">composer.cli.modules</span> <span class="k">import</span> <span class="n">modules_cmd</span>
<span class="kn">from</span> <span class="nn">composer.cli.projects</span> <span class="k">import</span> <span class="n">projects_cmd</span> <span class="kn">from</span> <span class="nn">composer.cli.projects</span> <span class="k">import</span> <span class="n">projects_cmd</span>
<span class="kn">from</span> <span class="nn">composer.cli.compose</span> <span class="k">import</span> <span class="n">compose_cmd</span> <span class="kn">from</span> <span class="nn">composer.cli.compose</span> <span class="k">import</span> <span class="n">compose_cmd</span>
<span class="kn">from</span> <span class="nn">composer.cli.sources</span> <span class="k">import</span> <span class="n">sources_cmd</span>
<span class="n">command_map</span> <span class="o">=</span> <span class="p">{</span> <span class="n">command_map</span> <span class="o">=</span> <span class="p">{</span>
<span class="s2">&quot;blueprints&quot;</span><span class="p">:</span> <span class="n">blueprints_cmd</span><span class="p">,</span> <span class="s2">&quot;blueprints&quot;</span><span class="p">:</span> <span class="n">blueprints_cmd</span><span class="p">,</span>
<span class="s2">&quot;modules&quot;</span><span class="p">:</span> <span class="n">modules_cmd</span><span class="p">,</span> <span class="s2">&quot;modules&quot;</span><span class="p">:</span> <span class="n">modules_cmd</span><span class="p">,</span>
<span class="s2">&quot;projects&quot;</span><span class="p">:</span> <span class="n">projects_cmd</span><span class="p">,</span> <span class="s2">&quot;projects&quot;</span><span class="p">:</span> <span class="n">projects_cmd</span><span class="p">,</span>
<span class="s2">&quot;compose&quot;</span><span class="p">:</span> <span class="n">compose_cmd</span> <span class="s2">&quot;compose&quot;</span><span class="p">:</span> <span class="n">compose_cmd</span><span class="p">,</span>
<span class="s2">&quot;sources&quot;</span><span class="p">:</span> <span class="n">sources_cmd</span>
<span class="p">}</span> <span class="p">}</span>
@ -243,7 +244,7 @@
<script type="text/javascript"> <script type="text/javascript">
var DOCUMENTATION_OPTIONS = { var DOCUMENTATION_OPTIONS = {
URL_ROOT:'../../', URL_ROOT:'../../',
VERSION:'29.1', VERSION:'29.6',
LANGUAGE:'None', LANGUAGE:'None',
COLLAPSE_INDEX:false, COLLAPSE_INDEX:false,
FILE_SUFFIX:'.html', FILE_SUFFIX:'.html',
@ -264,9 +265,7 @@
<script type="text/javascript"> <script type="text/javascript">
jQuery(function () { jQuery(function () {
SphinxRtdTheme.Navigation.enable(true);
SphinxRtdTheme.Navigation.enableSticky();
}); });
</script> </script>

View File

@ -8,7 +8,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>composer.cli.blueprints &mdash; Lorax 29.1 documentation</title> <title>composer.cli.blueprints &mdash; Lorax 29.6 documentation</title>
@ -57,7 +57,7 @@
<div class="version"> <div class="version">
29.1 29.6
</div> </div>
@ -709,7 +709,7 @@
<script type="text/javascript"> <script type="text/javascript">
var DOCUMENTATION_OPTIONS = { var DOCUMENTATION_OPTIONS = {
URL_ROOT:'../../../', URL_ROOT:'../../../',
VERSION:'29.1', VERSION:'29.6',
LANGUAGE:'None', LANGUAGE:'None',
COLLAPSE_INDEX:false, COLLAPSE_INDEX:false,
FILE_SUFFIX:'.html', FILE_SUFFIX:'.html',
@ -730,9 +730,7 @@
<script type="text/javascript"> <script type="text/javascript">
jQuery(function () { jQuery(function () {
SphinxRtdTheme.Navigation.enable(true);
SphinxRtdTheme.Navigation.enableSticky();
}); });
</script> </script>

View File

@ -8,7 +8,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>composer.cli.cmdline &mdash; Lorax 29.1 documentation</title> <title>composer.cli.cmdline &mdash; Lorax 29.6 documentation</title>
@ -57,7 +57,7 @@
<div class="version"> <div class="version">
29.1 29.6
</div> </div>
@ -267,6 +267,20 @@
<span class="s2">projects info &lt;PROJECT,...&gt;</span> <span class="s2">projects info &lt;PROJECT,...&gt;</span>
<span class="s2"> Show details about the listed projects.</span> <span class="s2"> Show details about the listed projects.</span>
<span class="s2">sources list</span>
<span class="s2"> List the available sources</span>
<span class="s2">sources info &lt;SOURCE-NAME,...&gt;</span>
<span class="s2"> Details about the source.</span>
<span class="s2">sources add &lt;SOURCE.TOML&gt;</span>
<span class="s2"> Add a package source to the server.</span>
<span class="s2">sources change &lt;SOURCE.TOML&gt;</span>
<span class="s2"> Change an existing source</span>
<span class="s2">sources delete &lt;SOURCE-NAME&gt;</span>
<span class="s2"> Delete a package source.</span>
<span class="s2">&quot;&quot;&quot;</span> <span class="s2">&quot;&quot;&quot;</span>
<div class="viewcode-block" id="composer_cli_parser"><a class="viewcode-back" href="../../../composer.cli.html#composer.cli.cmdline.composer_cli_parser">[docs]</a><span class="k">def</span> <span class="nf">composer_cli_parser</span><span class="p">():</span> <div class="viewcode-block" id="composer_cli_parser"><a class="viewcode-back" href="../../../composer.cli.html#composer.cli.cmdline.composer_cli_parser">[docs]</a><span class="k">def</span> <span class="nf">composer_cli_parser</span><span class="p">():</span>
@ -328,7 +342,7 @@
<script type="text/javascript"> <script type="text/javascript">
var DOCUMENTATION_OPTIONS = { var DOCUMENTATION_OPTIONS = {
URL_ROOT:'../../../', URL_ROOT:'../../../',
VERSION:'29.1', VERSION:'29.6',
LANGUAGE:'None', LANGUAGE:'None',
COLLAPSE_INDEX:false, COLLAPSE_INDEX:false,
FILE_SUFFIX:'.html', FILE_SUFFIX:'.html',
@ -349,9 +363,7 @@
<script type="text/javascript"> <script type="text/javascript">
jQuery(function () { jQuery(function () {
SphinxRtdTheme.Navigation.enable(true);
SphinxRtdTheme.Navigation.enableSticky();
}); });
</script> </script>

View File

@ -8,7 +8,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>composer.cli.compose &mdash; Lorax 29.1 documentation</title> <title>composer.cli.compose &mdash; Lorax 29.6 documentation</title>
@ -57,7 +57,7 @@
<div class="version"> <div class="version">
29.1 29.6
</div> </div>
@ -646,7 +646,7 @@
<script type="text/javascript"> <script type="text/javascript">
var DOCUMENTATION_OPTIONS = { var DOCUMENTATION_OPTIONS = {
URL_ROOT:'../../../', URL_ROOT:'../../../',
VERSION:'29.1', VERSION:'29.6',
LANGUAGE:'None', LANGUAGE:'None',
COLLAPSE_INDEX:false, COLLAPSE_INDEX:false,
FILE_SUFFIX:'.html', FILE_SUFFIX:'.html',
@ -667,9 +667,7 @@
<script type="text/javascript"> <script type="text/javascript">
jQuery(function () { jQuery(function () {
SphinxRtdTheme.Navigation.enable(true);
SphinxRtdTheme.Navigation.enableSticky();
}); });
</script> </script>

View File

@ -8,7 +8,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>composer.cli.modules &mdash; Lorax 29.1 documentation</title> <title>composer.cli.modules &mdash; Lorax 29.6 documentation</title>
@ -57,7 +57,7 @@
<div class="version"> <div class="version">
29.1 29.6
</div> </div>
@ -233,7 +233,7 @@
<script type="text/javascript"> <script type="text/javascript">
var DOCUMENTATION_OPTIONS = { var DOCUMENTATION_OPTIONS = {
URL_ROOT:'../../../', URL_ROOT:'../../../',
VERSION:'29.1', VERSION:'29.6',
LANGUAGE:'None', LANGUAGE:'None',
COLLAPSE_INDEX:false, COLLAPSE_INDEX:false,
FILE_SUFFIX:'.html', FILE_SUFFIX:'.html',
@ -254,9 +254,7 @@
<script type="text/javascript"> <script type="text/javascript">
jQuery(function () { jQuery(function () {
SphinxRtdTheme.Navigation.enable(true);
SphinxRtdTheme.Navigation.enableSticky();
}); });
</script> </script>

View File

@ -8,7 +8,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>composer.cli.projects &mdash; Lorax 29.1 documentation</title> <title>composer.cli.projects &mdash; Lorax 29.6 documentation</title>
@ -57,7 +57,7 @@
<div class="version"> <div class="version">
29.1 29.6
</div> </div>
@ -295,7 +295,7 @@
<script type="text/javascript"> <script type="text/javascript">
var DOCUMENTATION_OPTIONS = { var DOCUMENTATION_OPTIONS = {
URL_ROOT:'../../../', URL_ROOT:'../../../',
VERSION:'29.1', VERSION:'29.6',
LANGUAGE:'None', LANGUAGE:'None',
COLLAPSE_INDEX:false, COLLAPSE_INDEX:false,
FILE_SUFFIX:'.html', FILE_SUFFIX:'.html',
@ -316,9 +316,7 @@
<script type="text/javascript"> <script type="text/javascript">
jQuery(function () { jQuery(function () {
SphinxRtdTheme.Navigation.enable(true);
SphinxRtdTheme.Navigation.enableSticky();
}); });
</script> </script>

View File

@ -0,0 +1,361 @@
<!DOCTYPE html>
<!--[if IE 8]><html class="no-js lt-ie9" lang="en" > <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js" lang="en" > <!--<![endif]-->
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>composer.cli.sources &mdash; Lorax 29.6 documentation</title>
<link rel="stylesheet" href="../../../_static/css/theme.css" type="text/css" />
<link rel="stylesheet" href="../../../_static/pygments.css" type="text/css" />
<link rel="index" title="Index" href="../../../genindex.html" />
<link rel="search" title="Search" href="../../../search.html" />
<script src="../../../_static/js/modernizr.min.js"></script>
</head>
<body class="wy-body-for-nav">
<div class="wy-grid-for-nav">
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
<div class="wy-side-scroll">
<div class="wy-side-nav-search">
<a href="../../../index.html" class="icon icon-home"> Lorax
</a>
<div class="version">
29.6
</div>
<div role="search">
<form id="rtd-search-form" class="wy-form" action="../../../search.html" method="get">
<input type="text" name="q" placeholder="Search docs" />
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
</div>
</div>
<div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
<ul>
<li class="toctree-l1"><a class="reference internal" href="../../../intro.html">Introduction to Lorax</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../intro.html#before-lorax">Before Lorax</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../lorax.html">Lorax</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../livemedia-creator.html">livemedia-creator</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../lorax-composer.html">lorax-composer</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../composer-cli.html">composer-cli</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../product-images.html">Product and Updates Images</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../modules.html">src</a></li>
</ul>
</div>
</div>
</nav>
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
<nav class="wy-nav-top" aria-label="top navigation">
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
<a href="../../../index.html">Lorax</a>
</nav>
<div class="wy-nav-content">
<div class="rst-content">
<div role="navigation" aria-label="breadcrumbs navigation">
<ul class="wy-breadcrumbs">
<li><a href="../../../index.html">Docs</a> &raquo;</li>
<li><a href="../../index.html">Module code</a> &raquo;</li>
<li><a href="../cli.html">composer.cli</a> &raquo;</li>
<li>composer.cli.sources</li>
<li class="wy-breadcrumbs-aside">
</li>
</ul>
<hr/>
</div>
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
<div itemprop="articleBody">
<h1>Source code for composer.cli.sources</h1><div class="highlight"><pre>
<span></span><span class="c1">#</span>
<span class="c1"># Copyright (C) 2018 Red Hat, Inc.</span>
<span class="c1">#</span>
<span class="c1"># This program is free software; you can redistribute it and/or modify</span>
<span class="c1"># it under the terms of the GNU General Public License as published by</span>
<span class="c1"># the Free Software Foundation; either version 2 of the License, or</span>
<span class="c1"># (at your option) any later version.</span>
<span class="c1">#</span>
<span class="c1"># This program is distributed in the hope that it will be useful,</span>
<span class="c1"># but WITHOUT ANY WARRANTY; without even the implied warranty of</span>
<span class="c1"># MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the</span>
<span class="c1"># GNU General Public License for more details.</span>
<span class="c1">#</span>
<span class="c1"># You should have received a copy of the GNU General Public License</span>
<span class="c1"># along with this program. If not, see &lt;http://www.gnu.org/licenses/&gt;.</span>
<span class="c1">#</span>
<span class="kn">import</span> <span class="nn">logging</span>
<span class="n">log</span> <span class="o">=</span> <span class="n">logging</span><span class="o">.</span><span class="n">getLogger</span><span class="p">(</span><span class="s2">&quot;composer-cli&quot;</span><span class="p">)</span>
<span class="kn">import</span> <span class="nn">os</span>
<span class="kn">import</span> <span class="nn">json</span>
<span class="kn">from</span> <span class="nn">composer</span> <span class="k">import</span> <span class="n">http_client</span> <span class="k">as</span> <span class="n">client</span>
<span class="kn">from</span> <span class="nn">composer.cli.utilities</span> <span class="k">import</span> <span class="n">argify</span><span class="p">,</span> <span class="n">handle_api_result</span>
<div class="viewcode-block" id="sources_cmd"><a class="viewcode-back" href="../../../composer.cli.html#composer.cli.sources.sources_cmd">[docs]</a><span class="k">def</span> <span class="nf">sources_cmd</span><span class="p">(</span><span class="n">opts</span><span class="p">):</span>
<span class="sd">&quot;&quot;&quot;Process sources commands</span>
<span class="sd"> :param opts: Cmdline arguments</span>
<span class="sd"> :type opts: argparse.Namespace</span>
<span class="sd"> :returns: Value to return from sys.exit()</span>
<span class="sd"> :rtype: int</span>
<span class="sd"> &quot;&quot;&quot;</span>
<span class="n">cmd_map</span> <span class="o">=</span> <span class="p">{</span>
<span class="s2">&quot;list&quot;</span><span class="p">:</span> <span class="n">sources_list</span><span class="p">,</span>
<span class="s2">&quot;info&quot;</span><span class="p">:</span> <span class="n">sources_info</span><span class="p">,</span>
<span class="s2">&quot;add&quot;</span><span class="p">:</span> <span class="n">sources_add</span><span class="p">,</span>
<span class="s2">&quot;change&quot;</span><span class="p">:</span> <span class="n">sources_add</span><span class="p">,</span>
<span class="s2">&quot;delete&quot;</span><span class="p">:</span> <span class="n">sources_delete</span><span class="p">,</span>
<span class="p">}</span>
<span class="k">if</span> <span class="n">opts</span><span class="o">.</span><span class="n">args</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span> <span class="ow">not</span> <span class="ow">in</span> <span class="n">cmd_map</span><span class="p">:</span>
<span class="n">log</span><span class="o">.</span><span class="n">error</span><span class="p">(</span><span class="s2">&quot;Unknown sources command: </span><span class="si">%s</span><span class="s2">&quot;</span><span class="p">,</span> <span class="n">opts</span><span class="o">.</span><span class="n">args</span><span class="p">[</span><span class="mi">1</span><span class="p">])</span>
<span class="k">return</span> <span class="mi">1</span>
<span class="k">return</span> <span class="n">cmd_map</span><span class="p">[</span><span class="n">opts</span><span class="o">.</span><span class="n">args</span><span class="p">[</span><span class="mi">1</span><span class="p">]](</span><span class="n">opts</span><span class="o">.</span><span class="n">socket</span><span class="p">,</span> <span class="n">opts</span><span class="o">.</span><span class="n">api_version</span><span class="p">,</span> <span class="n">opts</span><span class="o">.</span><span class="n">args</span><span class="p">[</span><span class="mi">2</span><span class="p">:],</span> <span class="n">opts</span><span class="o">.</span><span class="n">json</span><span class="p">)</span></div>
<div class="viewcode-block" id="sources_list"><a class="viewcode-back" href="../../../composer.cli.html#composer.cli.sources.sources_list">[docs]</a><span class="k">def</span> <span class="nf">sources_list</span><span class="p">(</span><span class="n">socket_path</span><span class="p">,</span> <span class="n">api_version</span><span class="p">,</span> <span class="n">args</span><span class="p">,</span> <span class="n">show_json</span><span class="o">=</span><span class="kc">False</span><span class="p">):</span>
<span class="sd">&quot;&quot;&quot;Output the list of available sources</span>
<span class="sd"> :param socket_path: Path to the Unix socket to use for API communication</span>
<span class="sd"> :type socket_path: str</span>
<span class="sd"> :param api_version: Version of the API to talk to. eg. &quot;0&quot;</span>
<span class="sd"> :type api_version: str</span>
<span class="sd"> :param args: List of remaining arguments from the cmdline</span>
<span class="sd"> :type args: list of str</span>
<span class="sd"> :param show_json: Set to True to show the JSON output instead of the human readable output</span>
<span class="sd"> :type show_json: bool</span>
<span class="sd"> sources list</span>
<span class="sd"> &quot;&quot;&quot;</span>
<span class="n">api_route</span> <span class="o">=</span> <span class="n">client</span><span class="o">.</span><span class="n">api_url</span><span class="p">(</span><span class="n">api_version</span><span class="p">,</span> <span class="s2">&quot;/projects/source/list&quot;</span><span class="p">)</span>
<span class="n">result</span> <span class="o">=</span> <span class="n">client</span><span class="o">.</span><span class="n">get_url_json</span><span class="p">(</span><span class="n">socket_path</span><span class="p">,</span> <span class="n">api_route</span><span class="p">)</span>
<span class="k">if</span> <span class="n">show_json</span><span class="p">:</span>
<span class="nb">print</span><span class="p">(</span><span class="n">json</span><span class="o">.</span><span class="n">dumps</span><span class="p">(</span><span class="n">result</span><span class="p">,</span> <span class="n">indent</span><span class="o">=</span><span class="mi">4</span><span class="p">))</span>
<span class="k">return</span> <span class="mi">0</span>
<span class="nb">print</span><span class="p">(</span><span class="s2">&quot;Sources: </span><span class="si">%s</span><span class="s2">&quot;</span> <span class="o">%</span> <span class="s2">&quot;, &quot;</span><span class="o">.</span><span class="n">join</span><span class="p">(</span><span class="n">result</span><span class="p">[</span><span class="s2">&quot;sources&quot;</span><span class="p">]))</span>
<span class="k">return</span> <span class="mi">0</span></div>
<div class="viewcode-block" id="sources_info"><a class="viewcode-back" href="../../../composer.cli.html#composer.cli.sources.sources_info">[docs]</a><span class="k">def</span> <span class="nf">sources_info</span><span class="p">(</span><span class="n">socket_path</span><span class="p">,</span> <span class="n">api_version</span><span class="p">,</span> <span class="n">args</span><span class="p">,</span> <span class="n">show_json</span><span class="o">=</span><span class="kc">False</span><span class="p">):</span>
<span class="sd">&quot;&quot;&quot;Output info on a list of projects</span>
<span class="sd"> :param socket_path: Path to the Unix socket to use for API communication</span>
<span class="sd"> :type socket_path: str</span>
<span class="sd"> :param api_version: Version of the API to talk to. eg. &quot;0&quot;</span>
<span class="sd"> :type api_version: str</span>
<span class="sd"> :param args: List of remaining arguments from the cmdline</span>
<span class="sd"> :type args: list of str</span>
<span class="sd"> :param show_json: Set to True to show the JSON output instead of the human readable output</span>
<span class="sd"> :type show_json: bool</span>
<span class="sd"> sources info &lt;source-name&gt;</span>
<span class="sd"> &quot;&quot;&quot;</span>
<span class="k">if</span> <span class="nb">len</span><span class="p">(</span><span class="n">args</span><span class="p">)</span> <span class="o">==</span> <span class="mi">0</span><span class="p">:</span>
<span class="n">log</span><span class="o">.</span><span class="n">error</span><span class="p">(</span><span class="s2">&quot;sources info is missing the name of the source&quot;</span><span class="p">)</span>
<span class="k">return</span> <span class="mi">1</span>
<span class="k">if</span> <span class="n">show_json</span><span class="p">:</span>
<span class="n">api_route</span> <span class="o">=</span> <span class="n">client</span><span class="o">.</span><span class="n">api_url</span><span class="p">(</span><span class="n">api_version</span><span class="p">,</span> <span class="s2">&quot;/projects/source/info/</span><span class="si">%s</span><span class="s2">&quot;</span> <span class="o">%</span> <span class="s2">&quot;,&quot;</span><span class="o">.</span><span class="n">join</span><span class="p">(</span><span class="n">args</span><span class="p">))</span>
<span class="n">result</span> <span class="o">=</span> <span class="n">client</span><span class="o">.</span><span class="n">get_url_json</span><span class="p">(</span><span class="n">socket_path</span><span class="p">,</span> <span class="n">api_route</span><span class="p">)</span>
<span class="nb">print</span><span class="p">(</span><span class="n">json</span><span class="o">.</span><span class="n">dumps</span><span class="p">(</span><span class="n">result</span><span class="p">,</span> <span class="n">indent</span><span class="o">=</span><span class="mi">4</span><span class="p">))</span>
<span class="k">return</span> <span class="mi">0</span>
<span class="k">else</span><span class="p">:</span>
<span class="n">api_route</span> <span class="o">=</span> <span class="n">client</span><span class="o">.</span><span class="n">api_url</span><span class="p">(</span><span class="n">api_version</span><span class="p">,</span> <span class="s2">&quot;/projects/source/info/</span><span class="si">%s</span><span class="s2">?format=toml&quot;</span> <span class="o">%</span> <span class="s2">&quot;,&quot;</span><span class="o">.</span><span class="n">join</span><span class="p">(</span><span class="n">args</span><span class="p">))</span>
<span class="n">result</span> <span class="o">=</span> <span class="n">client</span><span class="o">.</span><span class="n">get_url_raw</span><span class="p">(</span><span class="n">socket_path</span><span class="p">,</span> <span class="n">api_route</span><span class="p">)</span>
<span class="nb">print</span><span class="p">(</span><span class="n">result</span><span class="p">)</span>
<span class="k">return</span> <span class="mi">0</span></div>
<div class="viewcode-block" id="sources_add"><a class="viewcode-back" href="../../../composer.cli.html#composer.cli.sources.sources_add">[docs]</a><span class="k">def</span> <span class="nf">sources_add</span><span class="p">(</span><span class="n">socket_path</span><span class="p">,</span> <span class="n">api_version</span><span class="p">,</span> <span class="n">args</span><span class="p">,</span> <span class="n">show_json</span><span class="o">=</span><span class="kc">False</span><span class="p">):</span>
<span class="sd">&quot;&quot;&quot;Add or change a source</span>
<span class="sd"> :param socket_path: Path to the Unix socket to use for API communication</span>
<span class="sd"> :type socket_path: str</span>
<span class="sd"> :param api_version: Version of the API to talk to. eg. &quot;0&quot;</span>
<span class="sd"> :type api_version: str</span>
<span class="sd"> :param args: List of remaining arguments from the cmdline</span>
<span class="sd"> :type args: list of str</span>
<span class="sd"> :param show_json: Set to True to show the JSON output instead of the human readable output</span>
<span class="sd"> :type show_json: bool</span>
<span class="sd"> sources add &lt;source.toml&gt;</span>
<span class="sd"> &quot;&quot;&quot;</span>
<span class="n">api_route</span> <span class="o">=</span> <span class="n">client</span><span class="o">.</span><span class="n">api_url</span><span class="p">(</span><span class="n">api_version</span><span class="p">,</span> <span class="s2">&quot;/projects/source/new&quot;</span><span class="p">)</span>
<span class="n">rval</span> <span class="o">=</span> <span class="mi">0</span>
<span class="k">for</span> <span class="n">source</span> <span class="ow">in</span> <span class="n">argify</span><span class="p">(</span><span class="n">args</span><span class="p">):</span>
<span class="k">if</span> <span class="ow">not</span> <span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">exists</span><span class="p">(</span><span class="n">source</span><span class="p">):</span>
<span class="n">log</span><span class="o">.</span><span class="n">error</span><span class="p">(</span><span class="s2">&quot;Missing source file: </span><span class="si">%s</span><span class="s2">&quot;</span><span class="p">,</span> <span class="n">source</span><span class="p">)</span>
<span class="k">continue</span>
<span class="n">source_toml</span> <span class="o">=</span> <span class="nb">open</span><span class="p">(</span><span class="n">source</span><span class="p">,</span> <span class="s2">&quot;r&quot;</span><span class="p">)</span><span class="o">.</span><span class="n">read</span><span class="p">()</span>
<span class="n">result</span> <span class="o">=</span> <span class="n">client</span><span class="o">.</span><span class="n">post_url_toml</span><span class="p">(</span><span class="n">socket_path</span><span class="p">,</span> <span class="n">api_route</span><span class="p">,</span> <span class="n">source_toml</span><span class="p">)</span>
<span class="k">if</span> <span class="n">handle_api_result</span><span class="p">(</span><span class="n">result</span><span class="p">,</span> <span class="n">show_json</span><span class="p">):</span>
<span class="n">rval</span> <span class="o">=</span> <span class="mi">1</span>
<span class="k">return</span> <span class="n">rval</span></div>
<div class="viewcode-block" id="sources_delete"><a class="viewcode-back" href="../../../composer.cli.html#composer.cli.sources.sources_delete">[docs]</a><span class="k">def</span> <span class="nf">sources_delete</span><span class="p">(</span><span class="n">socket_path</span><span class="p">,</span> <span class="n">api_version</span><span class="p">,</span> <span class="n">args</span><span class="p">,</span> <span class="n">show_json</span><span class="o">=</span><span class="kc">False</span><span class="p">):</span>
<span class="sd">&quot;&quot;&quot;Delete a source</span>
<span class="sd"> :param socket_path: Path to the Unix socket to use for API communication</span>
<span class="sd"> :type socket_path: str</span>
<span class="sd"> :param api_version: Version of the API to talk to. eg. &quot;0&quot;</span>
<span class="sd"> :type api_version: str</span>
<span class="sd"> :param args: List of remaining arguments from the cmdline</span>
<span class="sd"> :type args: list of str</span>
<span class="sd"> :param show_json: Set to True to show the JSON output instead of the human readable output</span>
<span class="sd"> :type show_json: bool</span>
<span class="sd"> sources delete &lt;source-name&gt;</span>
<span class="sd"> &quot;&quot;&quot;</span>
<span class="n">api_route</span> <span class="o">=</span> <span class="n">client</span><span class="o">.</span><span class="n">api_url</span><span class="p">(</span><span class="n">api_version</span><span class="p">,</span> <span class="s2">&quot;/projects/source/delete/</span><span class="si">%s</span><span class="s2">&quot;</span> <span class="o">%</span> <span class="n">args</span><span class="p">[</span><span class="mi">0</span><span class="p">])</span>
<span class="n">result</span> <span class="o">=</span> <span class="n">client</span><span class="o">.</span><span class="n">delete_url_json</span><span class="p">(</span><span class="n">socket_path</span><span class="p">,</span> <span class="n">api_route</span><span class="p">)</span>
<span class="k">return</span> <span class="n">handle_api_result</span><span class="p">(</span><span class="n">result</span><span class="p">,</span> <span class="n">show_json</span><span class="p">)</span></div>
</pre></div>
</div>
</div>
<footer>
<hr/>
<div role="contentinfo">
<p>
&copy; Copyright 2018, Red Hat, Inc..
</p>
</div>
Built with <a href="http://sphinx-doc.org/">Sphinx</a> using a <a href="https://github.com/rtfd/sphinx_rtd_theme">theme</a> provided by <a href="https://readthedocs.org">Read the Docs</a>.
</footer>
</div>
</div>
</section>
</div>
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT:'../../../',
VERSION:'29.6',
LANGUAGE:'None',
COLLAPSE_INDEX:false,
FILE_SUFFIX:'.html',
HAS_SOURCE: true,
SOURCELINK_SUFFIX: '.txt'
};
</script>
<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>
<script type="text/javascript" src="../../../_static/js/theme.js"></script>
<script type="text/javascript">
jQuery(function () {
SphinxRtdTheme.Navigation.enable(true);
});
</script>
</body>
</html>

View File

@ -8,7 +8,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>composer.cli.utilities &mdash; Lorax 29.1 documentation</title> <title>composer.cli.utilities &mdash; Lorax 29.6 documentation</title>
@ -57,7 +57,7 @@
<div class="version"> <div class="version">
29.1 29.6
</div> </div>
@ -273,7 +273,7 @@
<script type="text/javascript"> <script type="text/javascript">
var DOCUMENTATION_OPTIONS = { var DOCUMENTATION_OPTIONS = {
URL_ROOT:'../../../', URL_ROOT:'../../../',
VERSION:'29.1', VERSION:'29.6',
LANGUAGE:'None', LANGUAGE:'None',
COLLAPSE_INDEX:false, COLLAPSE_INDEX:false,
FILE_SUFFIX:'.html', FILE_SUFFIX:'.html',
@ -294,9 +294,7 @@
<script type="text/javascript"> <script type="text/javascript">
jQuery(function () { jQuery(function () {
SphinxRtdTheme.Navigation.enable(true);
SphinxRtdTheme.Navigation.enableSticky();
}); });
</script> </script>

View File

@ -8,7 +8,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>composer.http_client &mdash; Lorax 29.1 documentation</title> <title>composer.http_client &mdash; Lorax 29.6 documentation</title>
@ -57,7 +57,7 @@
<div class="version"> <div class="version">
29.1 29.6
</div> </div>
@ -388,7 +388,7 @@
<script type="text/javascript"> <script type="text/javascript">
var DOCUMENTATION_OPTIONS = { var DOCUMENTATION_OPTIONS = {
URL_ROOT:'../../', URL_ROOT:'../../',
VERSION:'29.1', VERSION:'29.6',
LANGUAGE:'None', LANGUAGE:'None',
COLLAPSE_INDEX:false, COLLAPSE_INDEX:false,
FILE_SUFFIX:'.html', FILE_SUFFIX:'.html',
@ -409,9 +409,7 @@
<script type="text/javascript"> <script type="text/javascript">
jQuery(function () { jQuery(function () {
SphinxRtdTheme.Navigation.enable(true);
SphinxRtdTheme.Navigation.enableSticky();
}); });
</script> </script>

View File

@ -8,7 +8,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>composer.unix_socket &mdash; Lorax 29.1 documentation</title> <title>composer.unix_socket &mdash; Lorax 29.6 documentation</title>
@ -57,7 +57,7 @@
<div class="version"> <div class="version">
29.1 29.6
</div> </div>
@ -248,7 +248,7 @@
<script type="text/javascript"> <script type="text/javascript">
var DOCUMENTATION_OPTIONS = { var DOCUMENTATION_OPTIONS = {
URL_ROOT:'../../', URL_ROOT:'../../',
VERSION:'29.1', VERSION:'29.6',
LANGUAGE:'None', LANGUAGE:'None',
COLLAPSE_INDEX:false, COLLAPSE_INDEX:false,
FILE_SUFFIX:'.html', FILE_SUFFIX:'.html',
@ -269,9 +269,7 @@
<script type="text/javascript"> <script type="text/javascript">
jQuery(function () { jQuery(function () {
SphinxRtdTheme.Navigation.enable(true);
SphinxRtdTheme.Navigation.enableSticky();
}); });
</script> </script>

View File

@ -8,7 +8,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Overview: module code &mdash; Lorax 29.1 documentation</title> <title>Overview: module code &mdash; Lorax 29.6 documentation</title>
@ -57,7 +57,7 @@
<div class="version"> <div class="version">
29.1 29.6
</div> </div>
@ -157,6 +157,7 @@
<li><a href="composer/cli/compose.html">composer.cli.compose</a></li> <li><a href="composer/cli/compose.html">composer.cli.compose</a></li>
<li><a href="composer/cli/modules.html">composer.cli.modules</a></li> <li><a href="composer/cli/modules.html">composer.cli.modules</a></li>
<li><a href="composer/cli/projects.html">composer.cli.projects</a></li> <li><a href="composer/cli/projects.html">composer.cli.projects</a></li>
<li><a href="composer/cli/sources.html">composer.cli.sources</a></li>
<li><a href="composer/cli/utilities.html">composer.cli.utilities</a></li> <li><a href="composer/cli/utilities.html">composer.cli.utilities</a></li>
</ul><li><a href="composer/http_client.html">composer.http_client</a></li> </ul><li><a href="composer/http_client.html">composer.http_client</a></li>
<li><a href="composer/unix_socket.html">composer.unix_socket</a></li> <li><a href="composer/unix_socket.html">composer.unix_socket</a></li>
@ -221,7 +222,7 @@
<script type="text/javascript"> <script type="text/javascript">
var DOCUMENTATION_OPTIONS = { var DOCUMENTATION_OPTIONS = {
URL_ROOT:'../', URL_ROOT:'../',
VERSION:'29.1', VERSION:'29.6',
LANGUAGE:'None', LANGUAGE:'None',
COLLAPSE_INDEX:false, COLLAPSE_INDEX:false,
FILE_SUFFIX:'.html', FILE_SUFFIX:'.html',
@ -242,9 +243,7 @@
<script type="text/javascript"> <script type="text/javascript">
jQuery(function () { jQuery(function () {
SphinxRtdTheme.Navigation.enable(true);
SphinxRtdTheme.Navigation.enableSticky();
}); });
</script> </script>

View File

@ -8,7 +8,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>pylorax &mdash; Lorax 29.1 documentation</title> <title>pylorax &mdash; Lorax 29.6 documentation</title>
@ -57,7 +57,7 @@
<div class="version"> <div class="version">
29.1 29.6
</div> </div>
@ -631,7 +631,7 @@
<script type="text/javascript"> <script type="text/javascript">
var DOCUMENTATION_OPTIONS = { var DOCUMENTATION_OPTIONS = {
URL_ROOT:'../', URL_ROOT:'../',
VERSION:'29.1', VERSION:'29.6',
LANGUAGE:'None', LANGUAGE:'None',
COLLAPSE_INDEX:false, COLLAPSE_INDEX:false,
FILE_SUFFIX:'.html', FILE_SUFFIX:'.html',
@ -652,9 +652,7 @@
<script type="text/javascript"> <script type="text/javascript">
jQuery(function () { jQuery(function () {
SphinxRtdTheme.Navigation.enable(true);
SphinxRtdTheme.Navigation.enableSticky();
}); });
</script> </script>

View File

@ -8,7 +8,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>pylorax.api.cmdline &mdash; Lorax 29.1 documentation</title> <title>pylorax.api.cmdline &mdash; Lorax 29.6 documentation</title>
@ -57,7 +57,7 @@
<div class="version"> <div class="version">
29.1 29.6
</div> </div>
@ -247,7 +247,7 @@
<script type="text/javascript"> <script type="text/javascript">
var DOCUMENTATION_OPTIONS = { var DOCUMENTATION_OPTIONS = {
URL_ROOT:'../../../', URL_ROOT:'../../../',
VERSION:'29.1', VERSION:'29.6',
LANGUAGE:'None', LANGUAGE:'None',
COLLAPSE_INDEX:false, COLLAPSE_INDEX:false,
FILE_SUFFIX:'.html', FILE_SUFFIX:'.html',
@ -268,9 +268,7 @@
<script type="text/javascript"> <script type="text/javascript">
jQuery(function () { jQuery(function () {
SphinxRtdTheme.Navigation.enable(true);
SphinxRtdTheme.Navigation.enableSticky();
}); });
</script> </script>

View File

@ -8,7 +8,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>pylorax.api.compose &mdash; Lorax 29.1 documentation</title> <title>pylorax.api.compose &mdash; Lorax 29.6 documentation</title>
@ -57,7 +57,7 @@
<div class="version"> <div class="version">
29.1 29.6
</div> </div>
@ -380,9 +380,9 @@
<span class="c1"># Combine modules and packages and depsolve the list</span> <span class="c1"># Combine modules and packages and depsolve the list</span>
<span class="c1"># TODO include the version/glob in the depsolving</span> <span class="c1"># TODO include the version/glob in the depsolving</span>
<span class="n">module_names</span> <span class="o">=</span> <span class="p">[</span><span class="n">m</span><span class="p">[</span><span class="s2">&quot;name&quot;</span><span class="p">]</span> <span class="k">for</span> <span class="n">m</span> <span class="ow">in</span> <span class="n">recipe</span><span class="p">[</span><span class="s2">&quot;modules&quot;</span><span class="p">]</span> <span class="ow">or</span> <span class="p">[]]</span> <span class="n">module_nver</span> <span class="o">=</span> <span class="n">recipe</span><span class="o">.</span><span class="n">module_nver</span>
<span class="n">package_names</span> <span class="o">=</span> <span class="p">[</span><span class="n">p</span><span class="p">[</span><span class="s2">&quot;name&quot;</span><span class="p">]</span> <span class="k">for</span> <span class="n">p</span> <span class="ow">in</span> <span class="n">recipe</span><span class="p">[</span><span class="s2">&quot;packages&quot;</span><span class="p">]</span> <span class="ow">or</span> <span class="p">[]]</span> <span class="n">package_nver</span> <span class="o">=</span> <span class="n">recipe</span><span class="o">.</span><span class="n">package_nver</span>
<span class="n">projects</span> <span class="o">=</span> <span class="nb">sorted</span><span class="p">(</span><span class="nb">set</span><span class="p">(</span><span class="n">module_names</span><span class="o">+</span><span class="n">package_names</span><span class="p">),</span> <span class="n">key</span><span class="o">=</span><span class="k">lambda</span> <span class="n">n</span><span class="p">:</span> <span class="n">n</span><span class="o">.</span><span class="n">lower</span><span class="p">())</span> <span class="n">projects</span> <span class="o">=</span> <span class="nb">sorted</span><span class="p">(</span><span class="nb">set</span><span class="p">(</span><span class="n">module_nver</span><span class="o">+</span><span class="n">package_nver</span><span class="p">),</span> <span class="n">key</span><span class="o">=</span><span class="k">lambda</span> <span class="n">p</span><span class="p">:</span> <span class="n">p</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span><span class="o">.</span><span class="n">lower</span><span class="p">())</span>
<span class="n">deps</span> <span class="o">=</span> <span class="p">[]</span> <span class="n">deps</span> <span class="o">=</span> <span class="p">[]</span>
<span class="k">try</span><span class="p">:</span> <span class="k">try</span><span class="p">:</span>
<span class="k">with</span> <span class="n">dnflock</span><span class="o">.</span><span class="n">lock</span><span class="p">:</span> <span class="k">with</span> <span class="n">dnflock</span><span class="o">.</span><span class="n">lock</span><span class="p">:</span>
@ -399,9 +399,10 @@
<span class="n">ks_version</span> <span class="o">=</span> <span class="n">makeVersion</span><span class="p">()</span> <span class="n">ks_version</span> <span class="o">=</span> <span class="n">makeVersion</span><span class="p">()</span>
<span class="n">ks</span> <span class="o">=</span> <span class="n">KickstartParser</span><span class="p">(</span><span class="n">ks_version</span><span class="p">,</span> <span class="n">errorsAreFatal</span><span class="o">=</span><span class="kc">False</span><span class="p">,</span> <span class="n">missingIncludeIsFatal</span><span class="o">=</span><span class="kc">False</span><span class="p">)</span> <span class="n">ks</span> <span class="o">=</span> <span class="n">KickstartParser</span><span class="p">(</span><span class="n">ks_version</span><span class="p">,</span> <span class="n">errorsAreFatal</span><span class="o">=</span><span class="kc">False</span><span class="p">,</span> <span class="n">missingIncludeIsFatal</span><span class="o">=</span><span class="kc">False</span><span class="p">)</span>
<span class="n">ks</span><span class="o">.</span><span class="n">readKickstartFromString</span><span class="p">(</span><span class="n">ks_template</span><span class="o">+</span><span class="s2">&quot;</span><span class="se">\n</span><span class="si">%e</span><span class="s2">nd</span><span class="se">\n</span><span class="s2">&quot;</span><span class="p">)</span> <span class="n">ks</span><span class="o">.</span><span class="n">readKickstartFromString</span><span class="p">(</span><span class="n">ks_template</span><span class="o">+</span><span class="s2">&quot;</span><span class="se">\n</span><span class="si">%e</span><span class="s2">nd</span><span class="se">\n</span><span class="s2">&quot;</span><span class="p">)</span>
<span class="n">ks_projects</span> <span class="o">=</span> <span class="p">[(</span><span class="n">name</span><span class="p">,</span> <span class="s2">&quot;*&quot;</span><span class="p">)</span> <span class="k">for</span> <span class="n">name</span> <span class="ow">in</span> <span class="n">ks</span><span class="o">.</span><span class="n">handler</span><span class="o">.</span><span class="n">packages</span><span class="o">.</span><span class="n">packageList</span><span class="p">]</span>
<span class="k">try</span><span class="p">:</span> <span class="k">try</span><span class="p">:</span>
<span class="k">with</span> <span class="n">dnflock</span><span class="o">.</span><span class="n">lock</span><span class="p">:</span> <span class="k">with</span> <span class="n">dnflock</span><span class="o">.</span><span class="n">lock</span><span class="p">:</span>
<span class="p">(</span><span class="n">template_size</span><span class="p">,</span> <span class="n">_</span><span class="p">)</span> <span class="o">=</span> <span class="n">projects_depsolve_with_size</span><span class="p">(</span><span class="n">dnflock</span><span class="o">.</span><span class="n">dbo</span><span class="p">,</span> <span class="n">ks</span><span class="o">.</span><span class="n">handler</span><span class="o">.</span><span class="n">packages</span><span class="o">.</span><span class="n">packageList</span><span class="p">,</span> <span class="p">(</span><span class="n">template_size</span><span class="p">,</span> <span class="n">_</span><span class="p">)</span> <span class="o">=</span> <span class="n">projects_depsolve_with_size</span><span class="p">(</span><span class="n">dnflock</span><span class="o">.</span><span class="n">dbo</span><span class="p">,</span> <span class="n">ks_projects</span><span class="p">,</span>
<span class="n">with_core</span><span class="o">=</span><span class="ow">not</span> <span class="n">ks</span><span class="o">.</span><span class="n">handler</span><span class="o">.</span><span class="n">packages</span><span class="o">.</span><span class="n">nocore</span><span class="p">)</span> <span class="n">with_core</span><span class="o">=</span><span class="ow">not</span> <span class="n">ks</span><span class="o">.</span><span class="n">handler</span><span class="o">.</span><span class="n">packages</span><span class="o">.</span><span class="n">nocore</span><span class="p">)</span>
<span class="k">except</span> <span class="n">ProjectsError</span> <span class="k">as</span> <span class="n">e</span><span class="p">:</span> <span class="k">except</span> <span class="n">ProjectsError</span> <span class="k">as</span> <span class="n">e</span><span class="p">:</span>
<span class="n">log</span><span class="o">.</span><span class="n">error</span><span class="p">(</span><span class="s2">&quot;start_build depsolve: </span><span class="si">%s</span><span class="s2">&quot;</span><span class="p">,</span> <span class="nb">str</span><span class="p">(</span><span class="n">e</span><span class="p">))</span> <span class="n">log</span><span class="o">.</span><span class="n">error</span><span class="p">(</span><span class="s2">&quot;start_build depsolve: </span><span class="si">%s</span><span class="s2">&quot;</span><span class="p">,</span> <span class="nb">str</span><span class="p">(</span><span class="n">e</span><span class="p">))</span>
@ -697,7 +698,7 @@
<script type="text/javascript"> <script type="text/javascript">
var DOCUMENTATION_OPTIONS = { var DOCUMENTATION_OPTIONS = {
URL_ROOT:'../../../', URL_ROOT:'../../../',
VERSION:'29.1', VERSION:'29.6',
LANGUAGE:'None', LANGUAGE:'None',
COLLAPSE_INDEX:false, COLLAPSE_INDEX:false,
FILE_SUFFIX:'.html', FILE_SUFFIX:'.html',
@ -718,9 +719,7 @@
<script type="text/javascript"> <script type="text/javascript">
jQuery(function () { jQuery(function () {
SphinxRtdTheme.Navigation.enable(true);
SphinxRtdTheme.Navigation.enableSticky();
}); });
</script> </script>

View File

@ -8,7 +8,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>pylorax.api.config &mdash; Lorax 29.1 documentation</title> <title>pylorax.api.config &mdash; Lorax 29.6 documentation</title>
@ -57,7 +57,7 @@
<div class="version"> <div class="version">
29.1 29.6
</div> </div>
@ -201,9 +201,9 @@
<span class="n">conf</span><span class="o">.</span><span class="n">add_section</span><span class="p">(</span><span class="s2">&quot;composer&quot;</span><span class="p">)</span> <span class="n">conf</span><span class="o">.</span><span class="n">add_section</span><span class="p">(</span><span class="s2">&quot;composer&quot;</span><span class="p">)</span>
<span class="n">conf</span><span class="o">.</span><span class="n">set</span><span class="p">(</span><span class="s2">&quot;composer&quot;</span><span class="p">,</span> <span class="s2">&quot;share_dir&quot;</span><span class="p">,</span> <span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">realpath</span><span class="p">(</span><span class="n">joinpaths</span><span class="p">(</span><span class="n">root_dir</span><span class="p">,</span> <span class="s2">&quot;/usr/share/lorax/&quot;</span><span class="p">)))</span> <span class="n">conf</span><span class="o">.</span><span class="n">set</span><span class="p">(</span><span class="s2">&quot;composer&quot;</span><span class="p">,</span> <span class="s2">&quot;share_dir&quot;</span><span class="p">,</span> <span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">realpath</span><span class="p">(</span><span class="n">joinpaths</span><span class="p">(</span><span class="n">root_dir</span><span class="p">,</span> <span class="s2">&quot;/usr/share/lorax/&quot;</span><span class="p">)))</span>
<span class="n">conf</span><span class="o">.</span><span class="n">set</span><span class="p">(</span><span class="s2">&quot;composer&quot;</span><span class="p">,</span> <span class="s2">&quot;lib_dir&quot;</span><span class="p">,</span> <span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">realpath</span><span class="p">(</span><span class="n">joinpaths</span><span class="p">(</span><span class="n">root_dir</span><span class="p">,</span> <span class="s2">&quot;/var/lib/lorax/composer/&quot;</span><span class="p">)))</span> <span class="n">conf</span><span class="o">.</span><span class="n">set</span><span class="p">(</span><span class="s2">&quot;composer&quot;</span><span class="p">,</span> <span class="s2">&quot;lib_dir&quot;</span><span class="p">,</span> <span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">realpath</span><span class="p">(</span><span class="n">joinpaths</span><span class="p">(</span><span class="n">root_dir</span><span class="p">,</span> <span class="s2">&quot;/var/lib/lorax/composer/&quot;</span><span class="p">)))</span>
<span class="n">conf</span><span class="o">.</span><span class="n">set</span><span class="p">(</span><span class="s2">&quot;composer&quot;</span><span class="p">,</span> <span class="s2">&quot;repo_dir&quot;</span><span class="p">,</span> <span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">realpath</span><span class="p">(</span><span class="n">joinpaths</span><span class="p">(</span><span class="n">root_dir</span><span class="p">,</span> <span class="s2">&quot;/var/lib/lorax/composer/repos.d/&quot;</span><span class="p">)))</span>
<span class="n">conf</span><span class="o">.</span><span class="n">set</span><span class="p">(</span><span class="s2">&quot;composer&quot;</span><span class="p">,</span> <span class="s2">&quot;dnf_conf&quot;</span><span class="p">,</span> <span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">realpath</span><span class="p">(</span><span class="n">joinpaths</span><span class="p">(</span><span class="n">root_dir</span><span class="p">,</span> <span class="s2">&quot;/var/tmp/composer/dnf.conf&quot;</span><span class="p">)))</span> <span class="n">conf</span><span class="o">.</span><span class="n">set</span><span class="p">(</span><span class="s2">&quot;composer&quot;</span><span class="p">,</span> <span class="s2">&quot;dnf_conf&quot;</span><span class="p">,</span> <span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">realpath</span><span class="p">(</span><span class="n">joinpaths</span><span class="p">(</span><span class="n">root_dir</span><span class="p">,</span> <span class="s2">&quot;/var/tmp/composer/dnf.conf&quot;</span><span class="p">)))</span>
<span class="n">conf</span><span class="o">.</span><span class="n">set</span><span class="p">(</span><span class="s2">&quot;composer&quot;</span><span class="p">,</span> <span class="s2">&quot;dnf_root&quot;</span><span class="p">,</span> <span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">realpath</span><span class="p">(</span><span class="n">joinpaths</span><span class="p">(</span><span class="n">root_dir</span><span class="p">,</span> <span class="s2">&quot;/var/tmp/composer/dnf/root/&quot;</span><span class="p">)))</span> <span class="n">conf</span><span class="o">.</span><span class="n">set</span><span class="p">(</span><span class="s2">&quot;composer&quot;</span><span class="p">,</span> <span class="s2">&quot;dnf_root&quot;</span><span class="p">,</span> <span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">realpath</span><span class="p">(</span><span class="n">joinpaths</span><span class="p">(</span><span class="n">root_dir</span><span class="p">,</span> <span class="s2">&quot;/var/tmp/composer/dnf/root/&quot;</span><span class="p">)))</span>
<span class="n">conf</span><span class="o">.</span><span class="n">set</span><span class="p">(</span><span class="s2">&quot;composer&quot;</span><span class="p">,</span> <span class="s2">&quot;repo_dir&quot;</span><span class="p">,</span> <span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">realpath</span><span class="p">(</span><span class="n">joinpaths</span><span class="p">(</span><span class="n">root_dir</span><span class="p">,</span> <span class="s2">&quot;/var/tmp/composer/repos.d/&quot;</span><span class="p">)))</span>
<span class="n">conf</span><span class="o">.</span><span class="n">set</span><span class="p">(</span><span class="s2">&quot;composer&quot;</span><span class="p">,</span> <span class="s2">&quot;cache_dir&quot;</span><span class="p">,</span> <span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">realpath</span><span class="p">(</span><span class="n">joinpaths</span><span class="p">(</span><span class="n">root_dir</span><span class="p">,</span> <span class="s2">&quot;/var/tmp/composer/cache/&quot;</span><span class="p">)))</span> <span class="n">conf</span><span class="o">.</span><span class="n">set</span><span class="p">(</span><span class="s2">&quot;composer&quot;</span><span class="p">,</span> <span class="s2">&quot;cache_dir&quot;</span><span class="p">,</span> <span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">realpath</span><span class="p">(</span><span class="n">joinpaths</span><span class="p">(</span><span class="n">root_dir</span><span class="p">,</span> <span class="s2">&quot;/var/tmp/composer/cache/&quot;</span><span class="p">)))</span>
<span class="n">conf</span><span class="o">.</span><span class="n">set</span><span class="p">(</span><span class="s2">&quot;composer&quot;</span><span class="p">,</span> <span class="s2">&quot;tmp&quot;</span><span class="p">,</span> <span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">realpath</span><span class="p">(</span><span class="n">joinpaths</span><span class="p">(</span><span class="n">root_dir</span><span class="p">,</span> <span class="s2">&quot;/var/tmp/&quot;</span><span class="p">)))</span> <span class="n">conf</span><span class="o">.</span><span class="n">set</span><span class="p">(</span><span class="s2">&quot;composer&quot;</span><span class="p">,</span> <span class="s2">&quot;tmp&quot;</span><span class="p">,</span> <span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">realpath</span><span class="p">(</span><span class="n">joinpaths</span><span class="p">(</span><span class="n">root_dir</span><span class="p">,</span> <span class="s2">&quot;/var/tmp/&quot;</span><span class="p">)))</span>
@ -232,8 +232,11 @@
<span class="sd"> :returns: None</span> <span class="sd"> :returns: None</span>
<span class="sd"> &quot;&quot;&quot;</span> <span class="sd"> &quot;&quot;&quot;</span>
<span class="k">for</span> <span class="n">p</span> <span class="ow">in</span> <span class="p">[</span><span class="s2">&quot;dnf_conf&quot;</span><span class="p">,</span> <span class="s2">&quot;repo_dir&quot;</span><span class="p">,</span> <span class="s2">&quot;cache_dir&quot;</span><span class="p">,</span> <span class="s2">&quot;dnf_root&quot;</span><span class="p">]:</span> <span class="k">for</span> <span class="n">p</span> <span class="ow">in</span> <span class="p">[</span><span class="s2">&quot;dnf_conf&quot;</span><span class="p">,</span> <span class="s2">&quot;repo_dir&quot;</span><span class="p">,</span> <span class="s2">&quot;cache_dir&quot;</span><span class="p">,</span> <span class="s2">&quot;dnf_root&quot;</span><span class="p">]:</span>
<span class="n">p_dir</span> <span class="o">=</span> <span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">dirname</span><span class="p">(</span><span class="n">conf</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="s2">&quot;composer&quot;</span><span class="p">,</span> <span class="n">p</span><span class="p">))</span> <span class="n">p_dir</span> <span class="o">=</span> <span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">abspath</span><span class="p">(</span><span class="n">conf</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="s2">&quot;composer&quot;</span><span class="p">,</span> <span class="n">p</span><span class="p">))</span>
<span class="k">if</span> <span class="ow">not</span> <span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">exists</span><span class="p">(</span><span class="n">p_dir</span><span class="p">):</span> <span class="k">if</span> <span class="n">p</span> <span class="o">==</span> <span class="s2">&quot;dnf_conf&quot;</span><span class="p">:</span>
<span class="n">p_dir</span> <span class="o">=</span> <span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">dirname</span><span class="p">(</span><span class="n">p_dir</span><span class="p">)</span>
<span class="k">if</span> <span class="ow">not</span> <span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">isdir</span><span class="p">(</span><span class="n">p_dir</span><span class="p">):</span>
<span class="n">os</span><span class="o">.</span><span class="n">makedirs</span><span class="p">(</span><span class="n">p_dir</span><span class="p">)</span></div> <span class="n">os</span><span class="o">.</span><span class="n">makedirs</span><span class="p">(</span><span class="n">p_dir</span><span class="p">)</span></div>
<div class="viewcode-block" id="make_queue_dirs"><a class="viewcode-back" href="../../../pylorax.api.html#pylorax.api.config.make_queue_dirs">[docs]</a><span class="k">def</span> <span class="nf">make_queue_dirs</span><span class="p">(</span><span class="n">conf</span><span class="p">,</span> <span class="n">gid</span><span class="p">):</span> <div class="viewcode-block" id="make_queue_dirs"><a class="viewcode-back" href="../../../pylorax.api.html#pylorax.api.config.make_queue_dirs">[docs]</a><span class="k">def</span> <span class="nf">make_queue_dirs</span><span class="p">(</span><span class="n">conf</span><span class="p">,</span> <span class="n">gid</span><span class="p">):</span>
@ -299,7 +302,7 @@
<script type="text/javascript"> <script type="text/javascript">
var DOCUMENTATION_OPTIONS = { var DOCUMENTATION_OPTIONS = {
URL_ROOT:'../../../', URL_ROOT:'../../../',
VERSION:'29.1', VERSION:'29.6',
LANGUAGE:'None', LANGUAGE:'None',
COLLAPSE_INDEX:false, COLLAPSE_INDEX:false,
FILE_SUFFIX:'.html', FILE_SUFFIX:'.html',
@ -320,9 +323,7 @@
<script type="text/javascript"> <script type="text/javascript">
jQuery(function () { jQuery(function () {
SphinxRtdTheme.Navigation.enable(true);
SphinxRtdTheme.Navigation.enableSticky();
}); });
</script> </script>

View File

@ -8,7 +8,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>pylorax.api.crossdomain &mdash; Lorax 29.1 documentation</title> <title>pylorax.api.crossdomain &mdash; Lorax 29.6 documentation</title>
@ -57,7 +57,7 @@
<div class="version"> <div class="version">
29.1 29.6
</div> </div>
@ -253,7 +253,7 @@
<script type="text/javascript"> <script type="text/javascript">
var DOCUMENTATION_OPTIONS = { var DOCUMENTATION_OPTIONS = {
URL_ROOT:'../../../', URL_ROOT:'../../../',
VERSION:'29.1', VERSION:'29.6',
LANGUAGE:'None', LANGUAGE:'None',
COLLAPSE_INDEX:false, COLLAPSE_INDEX:false,
FILE_SUFFIX:'.html', FILE_SUFFIX:'.html',
@ -274,9 +274,7 @@
<script type="text/javascript"> <script type="text/javascript">
jQuery(function () { jQuery(function () {
SphinxRtdTheme.Navigation.enable(true);
SphinxRtdTheme.Navigation.enableSticky();
}); });
</script> </script>

View File

@ -8,7 +8,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>pylorax.api.projects &mdash; Lorax 29.1 documentation</title> <title>pylorax.api.projects &mdash; Lorax 29.6 documentation</title>
@ -57,7 +57,7 @@
<div class="version"> <div class="version">
29.1 29.6
</div> </div>
@ -174,7 +174,10 @@
<span class="kn">import</span> <span class="nn">logging</span> <span class="kn">import</span> <span class="nn">logging</span>
<span class="n">log</span> <span class="o">=</span> <span class="n">logging</span><span class="o">.</span><span class="n">getLogger</span><span class="p">(</span><span class="s2">&quot;lorax-composer&quot;</span><span class="p">)</span> <span class="n">log</span> <span class="o">=</span> <span class="n">logging</span><span class="o">.</span><span class="n">getLogger</span><span class="p">(</span><span class="s2">&quot;lorax-composer&quot;</span><span class="p">)</span>
<span class="kn">import</span> <span class="nn">os</span>
<span class="kn">from</span> <span class="nn">configparser</span> <span class="k">import</span> <span class="n">ConfigParser</span>
<span class="kn">import</span> <span class="nn">dnf</span> <span class="kn">import</span> <span class="nn">dnf</span>
<span class="kn">from</span> <span class="nn">glob</span> <span class="k">import</span> <span class="n">glob</span>
<span class="kn">import</span> <span class="nn">time</span> <span class="kn">import</span> <span class="nn">time</span>
<span class="n">TIME_FORMAT</span> <span class="o">=</span> <span class="s2">&quot;%Y-%m-</span><span class="si">%d</span><span class="s2">T%H:%M:%S&quot;</span> <span class="n">TIME_FORMAT</span> <span class="o">=</span> <span class="s2">&quot;%Y-%m-</span><span class="si">%d</span><span class="s2">T%H:%M:%S&quot;</span>
@ -336,29 +339,50 @@
<span class="n">pkgs</span> <span class="o">=</span> <span class="n">dbo</span><span class="o">.</span><span class="n">sack</span><span class="o">.</span><span class="n">query</span><span class="p">()</span><span class="o">.</span><span class="n">available</span><span class="p">()</span> <span class="n">pkgs</span> <span class="o">=</span> <span class="n">dbo</span><span class="o">.</span><span class="n">sack</span><span class="o">.</span><span class="n">query</span><span class="p">()</span><span class="o">.</span><span class="n">available</span><span class="p">()</span>
<span class="k">return</span> <span class="nb">sorted</span><span class="p">(</span><span class="nb">map</span><span class="p">(</span><span class="n">pkg_to_project_info</span><span class="p">,</span> <span class="n">pkgs</span><span class="p">),</span> <span class="n">key</span><span class="o">=</span><span class="k">lambda</span> <span class="n">p</span><span class="p">:</span> <span class="n">p</span><span class="p">[</span><span class="s2">&quot;name&quot;</span><span class="p">]</span><span class="o">.</span><span class="n">lower</span><span class="p">())</span></div> <span class="k">return</span> <span class="nb">sorted</span><span class="p">(</span><span class="nb">map</span><span class="p">(</span><span class="n">pkg_to_project_info</span><span class="p">,</span> <span class="n">pkgs</span><span class="p">),</span> <span class="n">key</span><span class="o">=</span><span class="k">lambda</span> <span class="n">p</span><span class="p">:</span> <span class="n">p</span><span class="p">[</span><span class="s2">&quot;name&quot;</span><span class="p">]</span><span class="o">.</span><span class="n">lower</span><span class="p">())</span></div>
<span class="k">def</span> <span class="nf">_depsolve</span><span class="p">(</span><span class="n">dbo</span><span class="p">,</span> <span class="n">projects</span><span class="p">):</span>
<span class="sd">&quot;&quot;&quot;Add projects to a new transaction</span>
<div class="viewcode-block" id="projects_depsolve"><a class="viewcode-back" href="../../../pylorax.api.html#pylorax.api.projects.projects_depsolve">[docs]</a><span class="k">def</span> <span class="nf">projects_depsolve</span><span class="p">(</span><span class="n">dbo</span><span class="p">,</span> <span class="n">project_names</span><span class="p">):</span> <span class="sd"> :param dbo: dnf base object</span>
<span class="sd"> :type dbo: dnf.Base</span>
<span class="sd"> :param projects: The projects and version globs to find the dependencies for</span>
<span class="sd"> :type projects: List of tuples</span>
<span class="sd"> :returns: None</span>
<span class="sd"> :rtype: None</span>
<span class="sd"> :raises: ProjectsError if there was a problem installing something</span>
<span class="sd"> &quot;&quot;&quot;</span>
<span class="c1"># This resets the transaction</span>
<span class="n">dbo</span><span class="o">.</span><span class="n">reset</span><span class="p">(</span><span class="n">goal</span><span class="o">=</span><span class="kc">True</span><span class="p">)</span>
<span class="k">for</span> <span class="n">name</span><span class="p">,</span> <span class="n">version</span> <span class="ow">in</span> <span class="n">projects</span><span class="p">:</span>
<span class="k">try</span><span class="p">:</span>
<span class="k">if</span> <span class="ow">not</span> <span class="n">version</span><span class="p">:</span>
<span class="n">version</span> <span class="o">=</span> <span class="s2">&quot;*&quot;</span>
<span class="n">pkgs</span> <span class="o">=</span> <span class="p">[</span><span class="n">pkg</span> <span class="k">for</span> <span class="n">pkg</span> <span class="ow">in</span> <span class="n">dnf</span><span class="o">.</span><span class="n">subject</span><span class="o">.</span><span class="n">Subject</span><span class="p">(</span><span class="n">name</span><span class="p">)</span><span class="o">.</span><span class="n">get_best_query</span><span class="p">(</span><span class="n">dbo</span><span class="o">.</span><span class="n">sack</span><span class="p">)</span><span class="o">.</span><span class="n">filter</span><span class="p">(</span><span class="n">version__glob</span><span class="o">=</span><span class="n">version</span><span class="p">,</span> <span class="n">latest</span><span class="o">=</span><span class="kc">True</span><span class="p">)]</span>
<span class="k">if</span> <span class="ow">not</span> <span class="n">pkgs</span><span class="p">:</span>
<span class="k">raise</span> <span class="n">ProjectsError</span><span class="p">(</span><span class="s2">&quot;No match for </span><span class="si">%s</span><span class="s2">-</span><span class="si">%s</span><span class="s2">&quot;</span> <span class="o">%</span> <span class="p">(</span><span class="n">name</span><span class="p">,</span> <span class="n">version</span><span class="p">))</span>
<span class="k">for</span> <span class="n">p</span> <span class="ow">in</span> <span class="n">pkgs</span><span class="p">:</span>
<span class="n">dbo</span><span class="o">.</span><span class="n">package_install</span><span class="p">(</span><span class="n">p</span><span class="p">)</span>
<span class="k">except</span> <span class="n">dnf</span><span class="o">.</span><span class="n">exceptions</span><span class="o">.</span><span class="n">MarkingError</span><span class="p">:</span>
<span class="k">raise</span> <span class="n">ProjectsError</span><span class="p">(</span><span class="s2">&quot;No match for </span><span class="si">%s</span><span class="s2">-</span><span class="si">%s</span><span class="s2">&quot;</span> <span class="o">%</span> <span class="p">(</span><span class="n">name</span><span class="p">,</span> <span class="n">version</span><span class="p">))</span>
<div class="viewcode-block" id="projects_depsolve"><a class="viewcode-back" href="../../../pylorax.api.html#pylorax.api.projects.projects_depsolve">[docs]</a><span class="k">def</span> <span class="nf">projects_depsolve</span><span class="p">(</span><span class="n">dbo</span><span class="p">,</span> <span class="n">projects</span><span class="p">):</span>
<span class="sd">&quot;&quot;&quot;Return the dependencies for a list of projects</span> <span class="sd">&quot;&quot;&quot;Return the dependencies for a list of projects</span>
<span class="sd"> :param dbo: dnf base object</span> <span class="sd"> :param dbo: dnf base object</span>
<span class="sd"> :type dbo: dnf.Base</span> <span class="sd"> :type dbo: dnf.Base</span>
<span class="sd"> :param project_names: The projects to find the dependencies for</span> <span class="sd"> :param projects: The projects to find the dependencies for</span>
<span class="sd"> :type project_names: List of Strings</span> <span class="sd"> :type projects: List of Strings</span>
<span class="sd"> :returns: NEVRA&#39;s of the project and its dependencies</span> <span class="sd"> :returns: NEVRA&#39;s of the project and its dependencies</span>
<span class="sd"> :rtype: list of dicts</span> <span class="sd"> :rtype: list of dicts</span>
<span class="sd"> :raises: ProjectsError if there was a problem installing something</span>
<span class="sd"> &quot;&quot;&quot;</span> <span class="sd"> &quot;&quot;&quot;</span>
<span class="c1"># This resets the transaction</span> <span class="n">_depsolve</span><span class="p">(</span><span class="n">dbo</span><span class="p">,</span> <span class="n">projects</span><span class="p">)</span>
<span class="n">dbo</span><span class="o">.</span><span class="n">reset</span><span class="p">(</span><span class="n">goal</span><span class="o">=</span><span class="kc">True</span><span class="p">)</span>
<span class="k">for</span> <span class="n">p</span> <span class="ow">in</span> <span class="n">project_names</span><span class="p">:</span>
<span class="k">try</span><span class="p">:</span>
<span class="n">dbo</span><span class="o">.</span><span class="n">install</span><span class="p">(</span><span class="n">p</span><span class="p">)</span>
<span class="k">except</span> <span class="n">dnf</span><span class="o">.</span><span class="n">exceptions</span><span class="o">.</span><span class="n">MarkingError</span><span class="p">:</span>
<span class="k">raise</span> <span class="n">ProjectsError</span><span class="p">(</span><span class="s2">&quot;No match for </span><span class="si">%s</span><span class="s2">&quot;</span> <span class="o">%</span> <span class="n">p</span><span class="p">)</span>
<span class="k">try</span><span class="p">:</span> <span class="k">try</span><span class="p">:</span>
<span class="n">dbo</span><span class="o">.</span><span class="n">resolve</span><span class="p">()</span> <span class="n">dbo</span><span class="o">.</span><span class="n">resolve</span><span class="p">()</span>
<span class="k">except</span> <span class="n">dnf</span><span class="o">.</span><span class="n">exceptions</span><span class="o">.</span><span class="n">DepsolveError</span> <span class="k">as</span> <span class="n">e</span><span class="p">:</span> <span class="k">except</span> <span class="n">dnf</span><span class="o">.</span><span class="n">exceptions</span><span class="o">.</span><span class="n">DepsolveError</span> <span class="k">as</span> <span class="n">e</span><span class="p">:</span>
<span class="k">raise</span> <span class="n">ProjectsError</span><span class="p">(</span><span class="s2">&quot;There was a problem depsolving </span><span class="si">%s</span><span class="s2">: </span><span class="si">%s</span><span class="s2">&quot;</span> <span class="o">%</span> <span class="p">(</span><span class="n">project_names</span><span class="p">,</span> <span class="nb">str</span><span class="p">(</span><span class="n">e</span><span class="p">)))</span> <span class="k">raise</span> <span class="n">ProjectsError</span><span class="p">(</span><span class="s2">&quot;There was a problem depsolving </span><span class="si">%s</span><span class="s2">: </span><span class="si">%s</span><span class="s2">&quot;</span> <span class="o">%</span> <span class="p">(</span><span class="n">projects</span><span class="p">,</span> <span class="nb">str</span><span class="p">(</span><span class="n">e</span><span class="p">)))</span>
<span class="k">if</span> <span class="nb">len</span><span class="p">(</span><span class="n">dbo</span><span class="o">.</span><span class="n">transaction</span><span class="p">)</span> <span class="o">==</span> <span class="mi">0</span><span class="p">:</span> <span class="k">if</span> <span class="nb">len</span><span class="p">(</span><span class="n">dbo</span><span class="o">.</span><span class="n">transaction</span><span class="p">)</span> <span class="o">==</span> <span class="mi">0</span><span class="p">:</span>
<span class="k">return</span> <span class="p">[]</span> <span class="k">return</span> <span class="p">[]</span>
@ -387,7 +411,7 @@
<span class="k">return</span> <span class="n">installed_size</span></div> <span class="k">return</span> <span class="n">installed_size</span></div>
<div class="viewcode-block" id="projects_depsolve_with_size"><a class="viewcode-back" href="../../../pylorax.api.html#pylorax.api.projects.projects_depsolve_with_size">[docs]</a><span class="k">def</span> <span class="nf">projects_depsolve_with_size</span><span class="p">(</span><span class="n">dbo</span><span class="p">,</span> <span class="n">project_names</span><span class="p">,</span> <span class="n">with_core</span><span class="o">=</span><span class="kc">True</span><span class="p">):</span> <div class="viewcode-block" id="projects_depsolve_with_size"><a class="viewcode-back" href="../../../pylorax.api.html#pylorax.api.projects.projects_depsolve_with_size">[docs]</a><span class="k">def</span> <span class="nf">projects_depsolve_with_size</span><span class="p">(</span><span class="n">dbo</span><span class="p">,</span> <span class="n">projects</span><span class="p">,</span> <span class="n">with_core</span><span class="o">=</span><span class="kc">True</span><span class="p">):</span>
<span class="sd">&quot;&quot;&quot;Return the dependencies and installed size for a list of projects</span> <span class="sd">&quot;&quot;&quot;Return the dependencies and installed size for a list of projects</span>
<span class="sd"> :param dbo: dnf base object</span> <span class="sd"> :param dbo: dnf base object</span>
@ -396,14 +420,9 @@
<span class="sd"> :type project_names: List of Strings</span> <span class="sd"> :type project_names: List of Strings</span>
<span class="sd"> :returns: installed size and a list of NEVRA&#39;s of the project and its dependencies</span> <span class="sd"> :returns: installed size and a list of NEVRA&#39;s of the project and its dependencies</span>
<span class="sd"> :rtype: tuple of (int, list of dicts)</span> <span class="sd"> :rtype: tuple of (int, list of dicts)</span>
<span class="sd"> :raises: ProjectsError if there was a problem installing something</span>
<span class="sd"> &quot;&quot;&quot;</span> <span class="sd"> &quot;&quot;&quot;</span>
<span class="c1"># This resets the transaction</span> <span class="n">_depsolve</span><span class="p">(</span><span class="n">dbo</span><span class="p">,</span> <span class="n">projects</span><span class="p">)</span>
<span class="n">dbo</span><span class="o">.</span><span class="n">reset</span><span class="p">(</span><span class="n">goal</span><span class="o">=</span><span class="kc">True</span><span class="p">)</span>
<span class="k">for</span> <span class="n">p</span> <span class="ow">in</span> <span class="n">project_names</span><span class="p">:</span>
<span class="k">try</span><span class="p">:</span>
<span class="n">dbo</span><span class="o">.</span><span class="n">install</span><span class="p">(</span><span class="n">p</span><span class="p">)</span>
<span class="k">except</span> <span class="n">dnf</span><span class="o">.</span><span class="n">exceptions</span><span class="o">.</span><span class="n">MarkingError</span><span class="p">:</span>
<span class="k">raise</span> <span class="n">ProjectsError</span><span class="p">(</span><span class="s2">&quot;No match for </span><span class="si">%s</span><span class="s2">&quot;</span> <span class="o">%</span> <span class="n">p</span><span class="p">)</span>
<span class="k">if</span> <span class="n">with_core</span><span class="p">:</span> <span class="k">if</span> <span class="n">with_core</span><span class="p">:</span>
<span class="n">dbo</span><span class="o">.</span><span class="n">group_install</span><span class="p">(</span><span class="s2">&quot;core&quot;</span><span class="p">,</span> <span class="p">[</span><span class="s1">&#39;mandatory&#39;</span><span class="p">,</span> <span class="s1">&#39;default&#39;</span><span class="p">,</span> <span class="s1">&#39;optional&#39;</span><span class="p">])</span> <span class="n">dbo</span><span class="o">.</span><span class="n">group_install</span><span class="p">(</span><span class="s2">&quot;core&quot;</span><span class="p">,</span> <span class="p">[</span><span class="s1">&#39;mandatory&#39;</span><span class="p">,</span> <span class="s1">&#39;default&#39;</span><span class="p">,</span> <span class="s1">&#39;optional&#39;</span><span class="p">])</span>
@ -411,7 +430,7 @@
<span class="k">try</span><span class="p">:</span> <span class="k">try</span><span class="p">:</span>
<span class="n">dbo</span><span class="o">.</span><span class="n">resolve</span><span class="p">()</span> <span class="n">dbo</span><span class="o">.</span><span class="n">resolve</span><span class="p">()</span>
<span class="k">except</span> <span class="n">dnf</span><span class="o">.</span><span class="n">exceptions</span><span class="o">.</span><span class="n">DepsolveError</span> <span class="k">as</span> <span class="n">e</span><span class="p">:</span> <span class="k">except</span> <span class="n">dnf</span><span class="o">.</span><span class="n">exceptions</span><span class="o">.</span><span class="n">DepsolveError</span> <span class="k">as</span> <span class="n">e</span><span class="p">:</span>
<span class="k">raise</span> <span class="n">ProjectsError</span><span class="p">(</span><span class="s2">&quot;There was a problem depsolving </span><span class="si">%s</span><span class="s2">: </span><span class="si">%s</span><span class="s2">&quot;</span> <span class="o">%</span> <span class="p">(</span><span class="n">project_names</span><span class="p">,</span> <span class="nb">str</span><span class="p">(</span><span class="n">e</span><span class="p">)))</span> <span class="k">raise</span> <span class="n">ProjectsError</span><span class="p">(</span><span class="s2">&quot;There was a problem depsolving </span><span class="si">%s</span><span class="s2">: </span><span class="si">%s</span><span class="s2">&quot;</span> <span class="o">%</span> <span class="p">(</span><span class="n">projects</span><span class="p">,</span> <span class="nb">str</span><span class="p">(</span><span class="n">e</span><span class="p">)))</span>
<span class="k">if</span> <span class="nb">len</span><span class="p">(</span><span class="n">dbo</span><span class="o">.</span><span class="n">transaction</span><span class="p">)</span> <span class="o">==</span> <span class="mi">0</span><span class="p">:</span> <span class="k">if</span> <span class="nb">len</span><span class="p">(</span><span class="n">dbo</span><span class="o">.</span><span class="n">transaction</span><span class="p">)</span> <span class="o">==</span> <span class="mi">0</span><span class="p">:</span>
<span class="k">return</span> <span class="p">(</span><span class="mi">0</span><span class="p">,</span> <span class="p">[])</span> <span class="k">return</span> <span class="p">(</span><span class="mi">0</span><span class="p">,</span> <span class="p">[])</span>
@ -456,9 +475,218 @@
<span class="c1"># Add the dependency info to each one</span> <span class="c1"># Add the dependency info to each one</span>
<span class="k">for</span> <span class="n">module</span> <span class="ow">in</span> <span class="n">modules</span><span class="p">:</span> <span class="k">for</span> <span class="n">module</span> <span class="ow">in</span> <span class="n">modules</span><span class="p">:</span>
<span class="n">module</span><span class="p">[</span><span class="s2">&quot;dependencies&quot;</span><span class="p">]</span> <span class="o">=</span> <span class="n">projects_depsolve</span><span class="p">(</span><span class="n">dbo</span><span class="p">,</span> <span class="p">[</span><span class="n">module</span><span class="p">[</span><span class="s2">&quot;name&quot;</span><span class="p">]])</span> <span class="n">module</span><span class="p">[</span><span class="s2">&quot;dependencies&quot;</span><span class="p">]</span> <span class="o">=</span> <span class="n">projects_depsolve</span><span class="p">(</span><span class="n">dbo</span><span class="p">,</span> <span class="p">[(</span><span class="n">module</span><span class="p">[</span><span class="s2">&quot;name&quot;</span><span class="p">],</span> <span class="s2">&quot;*.*&quot;</span><span class="p">)])</span>
<span class="k">return</span> <span class="n">modules</span></div> <span class="k">return</span> <span class="n">modules</span></div>
<div class="viewcode-block" id="dnf_repo_to_file_repo"><a class="viewcode-back" href="../../../pylorax.api.html#pylorax.api.projects.dnf_repo_to_file_repo">[docs]</a><span class="k">def</span> <span class="nf">dnf_repo_to_file_repo</span><span class="p">(</span><span class="n">repo</span><span class="p">):</span>
<span class="sd">&quot;&quot;&quot;Return a string representation of a DNF Repo object suitable for writing to a .repo file</span>
<span class="sd"> :param repo: DNF Repository</span>
<span class="sd"> :type repo: dnf.RepoDict</span>
<span class="sd"> :returns: A string</span>
<span class="sd"> :rtype: str</span>
<span class="sd"> The DNF Repo.dump() function does not produce a string that can be used as a dnf .repo file,</span>
<span class="sd"> it ouputs baseurl and gpgkey as python lists which DNF cannot read. So do this manually with</span>
<span class="sd"> only the attributes we care about.</span>
<span class="sd"> &quot;&quot;&quot;</span>
<span class="n">repo_str</span> <span class="o">=</span> <span class="s2">&quot;[</span><span class="si">%s</span><span class="s2">]</span><span class="se">\n</span><span class="s2">&quot;</span> <span class="o">%</span> <span class="n">repo</span><span class="o">.</span><span class="n">id</span>
<span class="k">if</span> <span class="n">repo</span><span class="o">.</span><span class="n">metalink</span><span class="p">:</span>
<span class="n">repo_str</span> <span class="o">+=</span> <span class="s2">&quot;metalink = </span><span class="si">%s</span><span class="se">\n</span><span class="s2">&quot;</span> <span class="o">%</span> <span class="n">repo</span><span class="o">.</span><span class="n">metalink</span>
<span class="k">elif</span> <span class="n">repo</span><span class="o">.</span><span class="n">mirrorlist</span><span class="p">:</span>
<span class="n">repo_str</span> <span class="o">+=</span> <span class="s2">&quot;mirrorlist = </span><span class="si">%s</span><span class="se">\n</span><span class="s2">&quot;</span> <span class="o">%</span> <span class="n">repo</span><span class="o">.</span><span class="n">mirrorlist</span>
<span class="k">elif</span> <span class="n">repo</span><span class="o">.</span><span class="n">baseurl</span><span class="p">:</span>
<span class="n">repo_str</span> <span class="o">+=</span> <span class="s2">&quot;baseurl = </span><span class="si">%s</span><span class="se">\n</span><span class="s2">&quot;</span> <span class="o">%</span> <span class="n">repo</span><span class="o">.</span><span class="n">baseurl</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span>
<span class="k">else</span><span class="p">:</span>
<span class="k">raise</span> <span class="ne">RuntimeError</span><span class="p">(</span><span class="s2">&quot;Repo has no baseurl, metalink, or mirrorlist&quot;</span><span class="p">)</span>
<span class="c1"># proxy is optional</span>
<span class="k">if</span> <span class="n">repo</span><span class="o">.</span><span class="n">proxy</span><span class="p">:</span>
<span class="n">repo_str</span> <span class="o">+=</span> <span class="s2">&quot;proxy = </span><span class="si">%s</span><span class="se">\n</span><span class="s2">&quot;</span> <span class="o">%</span> <span class="n">repo</span><span class="o">.</span><span class="n">proxy</span>
<span class="n">repo_str</span> <span class="o">+=</span> <span class="s2">&quot;sslverify = </span><span class="si">%s</span><span class="se">\n</span><span class="s2">&quot;</span> <span class="o">%</span> <span class="n">repo</span><span class="o">.</span><span class="n">sslverify</span>
<span class="n">repo_str</span> <span class="o">+=</span> <span class="s2">&quot;gpgcheck = </span><span class="si">%s</span><span class="se">\n</span><span class="s2">&quot;</span> <span class="o">%</span> <span class="n">repo</span><span class="o">.</span><span class="n">gpgcheck</span>
<span class="k">if</span> <span class="n">repo</span><span class="o">.</span><span class="n">gpgkey</span><span class="p">:</span>
<span class="n">repo_str</span> <span class="o">+=</span> <span class="s2">&quot;gpgkey = </span><span class="si">%s</span><span class="se">\n</span><span class="s2">&quot;</span> <span class="o">%</span> <span class="s2">&quot;,&quot;</span><span class="o">.</span><span class="n">join</span><span class="p">(</span><span class="n">repo</span><span class="o">.</span><span class="n">gpgkey</span><span class="p">)</span>
<span class="k">return</span> <span class="n">repo_str</span></div>
<div class="viewcode-block" id="repo_to_source"><a class="viewcode-back" href="../../../pylorax.api.html#pylorax.api.projects.repo_to_source">[docs]</a><span class="k">def</span> <span class="nf">repo_to_source</span><span class="p">(</span><span class="n">repo</span><span class="p">,</span> <span class="n">system_source</span><span class="p">):</span>
<span class="sd">&quot;&quot;&quot;Return a Weldr Source dict created from the DNF Repository</span>
<span class="sd"> :param repo: DNF Repository</span>
<span class="sd"> :type repo: dnf.RepoDict</span>
<span class="sd"> :param system_source: True if this source is an immutable system source</span>
<span class="sd"> :type system_source: bool</span>
<span class="sd"> :returns: A dict with Weldr Source fields filled in</span>
<span class="sd"> :rtype: dict</span>
<span class="sd"> Example::</span>
<span class="sd"> {</span>
<span class="sd"> &quot;check_gpg&quot;: true,</span>
<span class="sd"> &quot;check_ssl&quot;: true,</span>
<span class="sd"> &quot;gpgkey_url&quot;: [</span>
<span class="sd"> &quot;file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-28-x86_64&quot;</span>
<span class="sd"> ],</span>
<span class="sd"> &quot;name&quot;: &quot;fedora&quot;,</span>
<span class="sd"> &quot;proxy&quot;: &quot;http://proxy.brianlane.com:8123&quot;,</span>
<span class="sd"> &quot;system&quot;: true</span>
<span class="sd"> &quot;type&quot;: &quot;yum-metalink&quot;,</span>
<span class="sd"> &quot;url&quot;: &quot;https://mirrors.fedoraproject.org/metalink?repo=fedora-28&amp;arch=x86_64&quot;</span>
<span class="sd"> }</span>
<span class="sd"> &quot;&quot;&quot;</span>
<span class="n">source</span> <span class="o">=</span> <span class="p">{</span><span class="s2">&quot;name&quot;</span><span class="p">:</span> <span class="n">repo</span><span class="o">.</span><span class="n">id</span><span class="p">,</span> <span class="s2">&quot;system&quot;</span><span class="p">:</span> <span class="n">system_source</span><span class="p">}</span>
<span class="k">if</span> <span class="n">repo</span><span class="o">.</span><span class="n">baseurl</span><span class="p">:</span>
<span class="n">source</span><span class="p">[</span><span class="s2">&quot;url&quot;</span><span class="p">]</span> <span class="o">=</span> <span class="n">repo</span><span class="o">.</span><span class="n">baseurl</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span>
<span class="n">source</span><span class="p">[</span><span class="s2">&quot;type&quot;</span><span class="p">]</span> <span class="o">=</span> <span class="s2">&quot;yum-baseurl&quot;</span>
<span class="k">elif</span> <span class="n">repo</span><span class="o">.</span><span class="n">metalink</span><span class="p">:</span>
<span class="n">source</span><span class="p">[</span><span class="s2">&quot;url&quot;</span><span class="p">]</span> <span class="o">=</span> <span class="n">repo</span><span class="o">.</span><span class="n">metalink</span>
<span class="n">source</span><span class="p">[</span><span class="s2">&quot;type&quot;</span><span class="p">]</span> <span class="o">=</span> <span class="s2">&quot;yum-metalink&quot;</span>
<span class="k">elif</span> <span class="n">repo</span><span class="o">.</span><span class="n">mirrorlist</span><span class="p">:</span>
<span class="n">source</span><span class="p">[</span><span class="s2">&quot;url&quot;</span><span class="p">]</span> <span class="o">=</span> <span class="n">repo</span><span class="o">.</span><span class="n">mirrorlist</span>
<span class="n">source</span><span class="p">[</span><span class="s2">&quot;type&quot;</span><span class="p">]</span> <span class="o">=</span> <span class="s2">&quot;yum-mirrorlist&quot;</span>
<span class="k">else</span><span class="p">:</span>
<span class="k">raise</span> <span class="ne">RuntimeError</span><span class="p">(</span><span class="s2">&quot;Repo has no baseurl, metalink, or mirrorlist&quot;</span><span class="p">)</span>
<span class="c1"># proxy is optional</span>
<span class="k">if</span> <span class="n">repo</span><span class="o">.</span><span class="n">proxy</span><span class="p">:</span>
<span class="n">source</span><span class="p">[</span><span class="s2">&quot;proxy&quot;</span><span class="p">]</span> <span class="o">=</span> <span class="n">repo</span><span class="o">.</span><span class="n">proxy</span>
<span class="k">if</span> <span class="ow">not</span> <span class="n">repo</span><span class="o">.</span><span class="n">sslverify</span><span class="p">:</span>
<span class="n">source</span><span class="p">[</span><span class="s2">&quot;check_ssl&quot;</span><span class="p">]</span> <span class="o">=</span> <span class="kc">False</span>
<span class="k">else</span><span class="p">:</span>
<span class="n">source</span><span class="p">[</span><span class="s2">&quot;check_ssl&quot;</span><span class="p">]</span> <span class="o">=</span> <span class="kc">True</span>
<span class="k">if</span> <span class="ow">not</span> <span class="n">repo</span><span class="o">.</span><span class="n">gpgcheck</span><span class="p">:</span>
<span class="n">source</span><span class="p">[</span><span class="s2">&quot;check_gpg&quot;</span><span class="p">]</span> <span class="o">=</span> <span class="kc">False</span>
<span class="k">else</span><span class="p">:</span>
<span class="n">source</span><span class="p">[</span><span class="s2">&quot;check_gpg&quot;</span><span class="p">]</span> <span class="o">=</span> <span class="kc">True</span>
<span class="k">if</span> <span class="n">repo</span><span class="o">.</span><span class="n">gpgkey</span><span class="p">:</span>
<span class="n">source</span><span class="p">[</span><span class="s2">&quot;gpgkey_urls&quot;</span><span class="p">]</span> <span class="o">=</span> <span class="n">repo</span><span class="o">.</span><span class="n">gpgkey</span>
<span class="k">return</span> <span class="n">source</span></div>
<div class="viewcode-block" id="source_to_repo"><a class="viewcode-back" href="../../../pylorax.api.html#pylorax.api.projects.source_to_repo">[docs]</a><span class="k">def</span> <span class="nf">source_to_repo</span><span class="p">(</span><span class="n">source</span><span class="p">,</span> <span class="n">dnf_conf</span><span class="p">):</span>
<span class="sd">&quot;&quot;&quot;Return a dnf Repo object created from a source dict</span>
<span class="sd"> :param source: A Weldr source dict</span>
<span class="sd"> :type source: dict</span>
<span class="sd"> :returns: A dnf Repo object</span>
<span class="sd"> :rtype: dnf.Repo</span>
<span class="sd"> Example::</span>
<span class="sd"> {</span>
<span class="sd"> &quot;check_gpg&quot;: True,</span>
<span class="sd"> &quot;check_ssl&quot;: True,</span>
<span class="sd"> &quot;gpgkey_urls&quot;: [</span>
<span class="sd"> &quot;file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-28-x86_64&quot;</span>
<span class="sd"> ],</span>
<span class="sd"> &quot;name&quot;: &quot;fedora&quot;,</span>
<span class="sd"> &quot;proxy&quot;: &quot;http://proxy.brianlane.com:8123&quot;,</span>
<span class="sd"> &quot;system&quot;: True</span>
<span class="sd"> &quot;type&quot;: &quot;yum-metalink&quot;,</span>
<span class="sd"> &quot;url&quot;: &quot;https://mirrors.fedoraproject.org/metalink?repo=fedora-28&amp;arch=x86_64&quot;</span>
<span class="sd"> }</span>
<span class="sd"> &quot;&quot;&quot;</span>
<span class="n">repo</span> <span class="o">=</span> <span class="n">dnf</span><span class="o">.</span><span class="n">repo</span><span class="o">.</span><span class="n">Repo</span><span class="p">(</span><span class="n">source</span><span class="p">[</span><span class="s2">&quot;name&quot;</span><span class="p">],</span> <span class="n">dnf_conf</span><span class="p">)</span>
<span class="c1"># This will allow errors to be raised so we can catch them</span>
<span class="c1"># without this they are logged, but the repo is silently disabled</span>
<span class="n">repo</span><span class="o">.</span><span class="n">skip_if_unavailable</span> <span class="o">=</span> <span class="kc">False</span>
<span class="k">if</span> <span class="n">source</span><span class="p">[</span><span class="s2">&quot;type&quot;</span><span class="p">]</span> <span class="o">==</span> <span class="s2">&quot;yum-baseurl&quot;</span><span class="p">:</span>
<span class="n">repo</span><span class="o">.</span><span class="n">baseurl</span> <span class="o">=</span> <span class="n">source</span><span class="p">[</span><span class="s2">&quot;url&quot;</span><span class="p">]</span>
<span class="k">elif</span> <span class="n">source</span><span class="p">[</span><span class="s2">&quot;type&quot;</span><span class="p">]</span> <span class="o">==</span> <span class="s2">&quot;yum-metalink&quot;</span><span class="p">:</span>
<span class="n">repo</span><span class="o">.</span><span class="n">metalink</span> <span class="o">=</span> <span class="n">source</span><span class="p">[</span><span class="s2">&quot;url&quot;</span><span class="p">]</span>
<span class="k">elif</span> <span class="n">source</span><span class="p">[</span><span class="s2">&quot;type&quot;</span><span class="p">]</span> <span class="o">==</span> <span class="s2">&quot;yum-mirrorlist&quot;</span><span class="p">:</span>
<span class="n">repo</span><span class="o">.</span><span class="n">mirrorlist</span> <span class="o">=</span> <span class="n">source</span><span class="p">[</span><span class="s2">&quot;url&quot;</span><span class="p">]</span>
<span class="k">if</span> <span class="s2">&quot;proxy&quot;</span> <span class="ow">in</span> <span class="n">source</span><span class="p">:</span>
<span class="n">repo</span><span class="o">.</span><span class="n">proxy</span> <span class="o">=</span> <span class="n">source</span><span class="p">[</span><span class="s2">&quot;proxy&quot;</span><span class="p">]</span>
<span class="k">if</span> <span class="n">source</span><span class="p">[</span><span class="s2">&quot;check_ssl&quot;</span><span class="p">]:</span>
<span class="n">repo</span><span class="o">.</span><span class="n">sslverify</span> <span class="o">=</span> <span class="kc">True</span>
<span class="k">else</span><span class="p">:</span>
<span class="n">repo</span><span class="o">.</span><span class="n">sslverify</span> <span class="o">=</span> <span class="kc">False</span>
<span class="k">if</span> <span class="n">source</span><span class="p">[</span><span class="s2">&quot;check_gpg&quot;</span><span class="p">]:</span>
<span class="n">repo</span><span class="o">.</span><span class="n">gpgcheck</span> <span class="o">=</span> <span class="kc">True</span>
<span class="k">else</span><span class="p">:</span>
<span class="n">repo</span><span class="o">.</span><span class="n">gpgcheck</span> <span class="o">=</span> <span class="kc">False</span>
<span class="k">if</span> <span class="s2">&quot;gpgkey_urls&quot;</span> <span class="ow">in</span> <span class="n">source</span><span class="p">:</span>
<span class="n">repo</span><span class="o">.</span><span class="n">gpgkey</span> <span class="o">=</span> <span class="s2">&quot;,&quot;</span><span class="o">.</span><span class="n">join</span><span class="p">(</span><span class="n">source</span><span class="p">[</span><span class="s2">&quot;gpgkey_urls&quot;</span><span class="p">])</span>
<span class="n">repo</span><span class="o">.</span><span class="n">enable</span><span class="p">()</span>
<span class="k">return</span> <span class="n">repo</span></div>
<div class="viewcode-block" id="get_source_ids"><a class="viewcode-back" href="../../../pylorax.api.html#pylorax.api.projects.get_source_ids">[docs]</a><span class="k">def</span> <span class="nf">get_source_ids</span><span class="p">(</span><span class="n">source_path</span><span class="p">):</span>
<span class="sd">&quot;&quot;&quot;Return a list of the source ids in a file</span>
<span class="sd"> :param source_path: Full path and filename of the source (yum repo) file</span>
<span class="sd"> :type source_path: str</span>
<span class="sd"> :returns: A list of source id strings</span>
<span class="sd"> :rtype: list of str</span>
<span class="sd"> &quot;&quot;&quot;</span>
<span class="k">if</span> <span class="ow">not</span> <span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">exists</span><span class="p">(</span><span class="n">source_path</span><span class="p">):</span>
<span class="k">return</span> <span class="p">[]</span>
<span class="n">cfg</span> <span class="o">=</span> <span class="n">ConfigParser</span><span class="p">()</span>
<span class="n">cfg</span><span class="o">.</span><span class="n">read</span><span class="p">(</span><span class="n">source_path</span><span class="p">)</span>
<span class="k">return</span> <span class="n">cfg</span><span class="o">.</span><span class="n">sections</span><span class="p">()</span></div>
<div class="viewcode-block" id="get_repo_sources"><a class="viewcode-back" href="../../../pylorax.api.html#pylorax.api.projects.get_repo_sources">[docs]</a><span class="k">def</span> <span class="nf">get_repo_sources</span><span class="p">(</span><span class="n">source_glob</span><span class="p">):</span>
<span class="sd">&quot;&quot;&quot;Return a list of sources from a directory of yum repositories</span>
<span class="sd"> :param source_glob: A glob to use to match the source files, including full path</span>
<span class="sd"> :type source_glob: str</span>
<span class="sd"> :returns: A list of the source ids in all of the matching files</span>
<span class="sd"> :rtype: list of str</span>
<span class="sd"> &quot;&quot;&quot;</span>
<span class="n">sources</span> <span class="o">=</span> <span class="p">[]</span>
<span class="k">for</span> <span class="n">f</span> <span class="ow">in</span> <span class="n">glob</span><span class="p">(</span><span class="n">source_glob</span><span class="p">):</span>
<span class="n">sources</span><span class="o">.</span><span class="n">extend</span><span class="p">(</span><span class="n">get_source_ids</span><span class="p">(</span><span class="n">f</span><span class="p">))</span>
<span class="k">return</span> <span class="n">sources</span></div>
<div class="viewcode-block" id="delete_repo_source"><a class="viewcode-back" href="../../../pylorax.api.html#pylorax.api.projects.delete_repo_source">[docs]</a><span class="k">def</span> <span class="nf">delete_repo_source</span><span class="p">(</span><span class="n">source_glob</span><span class="p">,</span> <span class="n">source_name</span><span class="p">):</span>
<span class="sd">&quot;&quot;&quot;Delete a source from a repo file</span>
<span class="sd"> :param source_glob: A glob of the repo sources to search</span>
<span class="sd"> :type source_glob: str</span>
<span class="sd"> :returns: None</span>
<span class="sd"> :raises: ProjectsError if there was a problem</span>
<span class="sd"> A repo file may have multiple sources in it, delete only the selected source.</span>
<span class="sd"> If it is the last one in the file, delete the file.</span>
<span class="sd"> WARNING: This will delete ANY source, the caller needs to ensure that a system</span>
<span class="sd"> source_name isn&#39;t passed to it.</span>
<span class="sd"> &quot;&quot;&quot;</span>
<span class="n">found</span> <span class="o">=</span> <span class="kc">False</span>
<span class="k">for</span> <span class="n">f</span> <span class="ow">in</span> <span class="n">glob</span><span class="p">(</span><span class="n">source_glob</span><span class="p">):</span>
<span class="k">try</span><span class="p">:</span>
<span class="n">cfg</span> <span class="o">=</span> <span class="n">ConfigParser</span><span class="p">()</span>
<span class="n">cfg</span><span class="o">.</span><span class="n">read</span><span class="p">(</span><span class="n">f</span><span class="p">)</span>
<span class="k">if</span> <span class="n">source_name</span> <span class="ow">in</span> <span class="n">cfg</span><span class="o">.</span><span class="n">sections</span><span class="p">():</span>
<span class="n">found</span> <span class="o">=</span> <span class="kc">True</span>
<span class="n">cfg</span><span class="o">.</span><span class="n">remove_section</span><span class="p">(</span><span class="n">source_name</span><span class="p">)</span>
<span class="c1"># If there are other sections, rewrite the file without the deleted one</span>
<span class="k">if</span> <span class="nb">len</span><span class="p">(</span><span class="n">cfg</span><span class="o">.</span><span class="n">sections</span><span class="p">())</span> <span class="o">&gt;</span> <span class="mi">0</span><span class="p">:</span>
<span class="k">with</span> <span class="nb">open</span><span class="p">(</span><span class="n">f</span><span class="p">,</span> <span class="s2">&quot;w&quot;</span><span class="p">)</span> <span class="k">as</span> <span class="n">cfg_file</span><span class="p">:</span>
<span class="n">cfg</span><span class="o">.</span><span class="n">write</span><span class="p">(</span><span class="n">cfg_file</span><span class="p">)</span>
<span class="k">else</span><span class="p">:</span>
<span class="c1"># No sections left, just delete the file</span>
<span class="n">os</span><span class="o">.</span><span class="n">unlink</span><span class="p">(</span><span class="n">f</span><span class="p">)</span>
<span class="k">except</span> <span class="ne">Exception</span> <span class="k">as</span> <span class="n">e</span><span class="p">:</span>
<span class="k">raise</span> <span class="n">ProjectsError</span><span class="p">(</span><span class="s2">&quot;Problem deleting repo source </span><span class="si">%s</span><span class="s2">: </span><span class="si">%s</span><span class="s2">&quot;</span> <span class="o">%</span> <span class="p">(</span><span class="n">source_name</span><span class="p">,</span> <span class="nb">str</span><span class="p">(</span><span class="n">e</span><span class="p">)))</span>
<span class="k">if</span> <span class="ow">not</span> <span class="n">found</span><span class="p">:</span>
<span class="k">raise</span> <span class="n">ProjectsError</span><span class="p">(</span><span class="s2">&quot;source </span><span class="si">%s</span><span class="s2"> not found&quot;</span> <span class="o">%</span> <span class="n">source_name</span><span class="p">)</span></div>
</pre></div> </pre></div>
</div> </div>
@ -493,7 +721,7 @@
<script type="text/javascript"> <script type="text/javascript">
var DOCUMENTATION_OPTIONS = { var DOCUMENTATION_OPTIONS = {
URL_ROOT:'../../../', URL_ROOT:'../../../',
VERSION:'29.1', VERSION:'29.6',
LANGUAGE:'None', LANGUAGE:'None',
COLLAPSE_INDEX:false, COLLAPSE_INDEX:false,
FILE_SUFFIX:'.html', FILE_SUFFIX:'.html',
@ -514,9 +742,7 @@
<script type="text/javascript"> <script type="text/javascript">
jQuery(function () { jQuery(function () {
SphinxRtdTheme.Navigation.enable(true);
SphinxRtdTheme.Navigation.enableSticky();
}); });
</script> </script>

View File

@ -8,7 +8,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>pylorax.api.queue &mdash; Lorax 29.1 documentation</title> <title>pylorax.api.queue &mdash; Lorax 29.6 documentation</title>
@ -57,7 +57,7 @@
<div class="version"> <div class="version">
29.1 29.6
</div> </div>
@ -247,7 +247,7 @@
<span class="c1"># Pick the oldest and move it into ./run/</span> <span class="c1"># Pick the oldest and move it into ./run/</span>
<span class="k">if</span> <span class="ow">not</span> <span class="n">uuids</span><span class="p">:</span> <span class="k">if</span> <span class="ow">not</span> <span class="n">uuids</span><span class="p">:</span>
<span class="c1"># No composes left to process, sleep for a bit</span> <span class="c1"># No composes left to process, sleep for a bit</span>
<span class="n">time</span><span class="o">.</span><span class="n">sleep</span><span class="p">(</span><span class="mi">30</span><span class="p">)</span> <span class="n">time</span><span class="o">.</span><span class="n">sleep</span><span class="p">(</span><span class="mi">5</span><span class="p">)</span>
<span class="k">else</span><span class="p">:</span> <span class="k">else</span><span class="p">:</span>
<span class="n">src</span> <span class="o">=</span> <span class="n">joinpaths</span><span class="p">(</span><span class="n">cfg</span><span class="o">.</span><span class="n">composer_dir</span><span class="p">,</span> <span class="s2">&quot;queue/new&quot;</span><span class="p">,</span> <span class="n">uuids</span><span class="p">[</span><span class="mi">0</span><span class="p">])</span> <span class="n">src</span> <span class="o">=</span> <span class="n">joinpaths</span><span class="p">(</span><span class="n">cfg</span><span class="o">.</span><span class="n">composer_dir</span><span class="p">,</span> <span class="s2">&quot;queue/new&quot;</span><span class="p">,</span> <span class="n">uuids</span><span class="p">[</span><span class="mi">0</span><span class="p">])</span>
<span class="n">dst</span> <span class="o">=</span> <span class="n">joinpaths</span><span class="p">(</span><span class="n">cfg</span><span class="o">.</span><span class="n">composer_dir</span><span class="p">,</span> <span class="s2">&quot;queue/run&quot;</span><span class="p">,</span> <span class="n">uuids</span><span class="p">[</span><span class="mi">0</span><span class="p">])</span> <span class="n">dst</span> <span class="o">=</span> <span class="n">joinpaths</span><span class="p">(</span><span class="n">cfg</span><span class="o">.</span><span class="n">composer_dir</span><span class="p">,</span> <span class="s2">&quot;queue/run&quot;</span><span class="p">,</span> <span class="n">uuids</span><span class="p">[</span><span class="mi">0</span><span class="p">])</span>
@ -353,7 +353,7 @@
<span class="n">test_path</span> <span class="o">=</span> <span class="n">joinpaths</span><span class="p">(</span><span class="n">results_dir</span><span class="p">,</span> <span class="s2">&quot;TEST&quot;</span><span class="p">)</span> <span class="n">test_path</span> <span class="o">=</span> <span class="n">joinpaths</span><span class="p">(</span><span class="n">results_dir</span><span class="p">,</span> <span class="s2">&quot;TEST&quot;</span><span class="p">)</span>
<span class="k">if</span> <span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">exists</span><span class="p">(</span><span class="n">test_path</span><span class="p">):</span> <span class="k">if</span> <span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">exists</span><span class="p">(</span><span class="n">test_path</span><span class="p">):</span>
<span class="c1"># Pretend to run the compose</span> <span class="c1"># Pretend to run the compose</span>
<span class="n">time</span><span class="o">.</span><span class="n">sleep</span><span class="p">(</span><span class="mi">10</span><span class="p">)</span> <span class="n">time</span><span class="o">.</span><span class="n">sleep</span><span class="p">(</span><span class="mi">5</span><span class="p">)</span>
<span class="k">try</span><span class="p">:</span> <span class="k">try</span><span class="p">:</span>
<span class="n">test_mode</span> <span class="o">=</span> <span class="nb">int</span><span class="p">(</span><span class="nb">open</span><span class="p">(</span><span class="n">test_path</span><span class="p">,</span> <span class="s2">&quot;r&quot;</span><span class="p">)</span><span class="o">.</span><span class="n">read</span><span class="p">())</span> <span class="n">test_mode</span> <span class="o">=</span> <span class="nb">int</span><span class="p">(</span><span class="nb">open</span><span class="p">(</span><span class="n">test_path</span><span class="p">,</span> <span class="s2">&quot;r&quot;</span><span class="p">)</span><span class="o">.</span><span class="n">read</span><span class="p">())</span>
<span class="k">except</span> <span class="ne">Exception</span><span class="p">:</span> <span class="k">except</span> <span class="ne">Exception</span><span class="p">:</span>
@ -805,7 +805,7 @@
<script type="text/javascript"> <script type="text/javascript">
var DOCUMENTATION_OPTIONS = { var DOCUMENTATION_OPTIONS = {
URL_ROOT:'../../../', URL_ROOT:'../../../',
VERSION:'29.1', VERSION:'29.6',
LANGUAGE:'None', LANGUAGE:'None',
COLLAPSE_INDEX:false, COLLAPSE_INDEX:false,
FILE_SUFFIX:'.html', FILE_SUFFIX:'.html',
@ -826,9 +826,7 @@
<script type="text/javascript"> <script type="text/javascript">
jQuery(function () { jQuery(function () {
SphinxRtdTheme.Navigation.enable(true);
SphinxRtdTheme.Navigation.enableSticky();
}); });
</script> </script>

View File

@ -8,7 +8,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>pylorax.api.recipes &mdash; Lorax 29.1 documentation</title> <title>pylorax.api.recipes &mdash; Lorax 29.6 documentation</title>
@ -57,7 +57,7 @@
<div class="version"> <div class="version">
29.1 29.6
</div> </div>
@ -230,11 +230,21 @@
<span class="sd">&quot;&quot;&quot;Return the names of the packages&quot;&quot;&quot;</span> <span class="sd">&quot;&quot;&quot;Return the names of the packages&quot;&quot;&quot;</span>
<span class="k">return</span> <span class="p">[</span><span class="n">p</span><span class="p">[</span><span class="s2">&quot;name&quot;</span><span class="p">]</span> <span class="k">for</span> <span class="n">p</span> <span class="ow">in</span> <span class="bp">self</span><span class="p">[</span><span class="s2">&quot;packages&quot;</span><span class="p">]</span> <span class="ow">or</span> <span class="p">[]]</span> <span class="k">return</span> <span class="p">[</span><span class="n">p</span><span class="p">[</span><span class="s2">&quot;name&quot;</span><span class="p">]</span> <span class="k">for</span> <span class="n">p</span> <span class="ow">in</span> <span class="bp">self</span><span class="p">[</span><span class="s2">&quot;packages&quot;</span><span class="p">]</span> <span class="ow">or</span> <span class="p">[]]</span>
<span class="nd">@property</span>
<span class="k">def</span> <span class="nf">package_nver</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
<span class="sd">&quot;&quot;&quot;Return the names and version globs of the packages&quot;&quot;&quot;</span>
<span class="k">return</span> <span class="p">[(</span><span class="n">p</span><span class="p">[</span><span class="s2">&quot;name&quot;</span><span class="p">],</span> <span class="n">p</span><span class="p">[</span><span class="s2">&quot;version&quot;</span><span class="p">])</span> <span class="k">for</span> <span class="n">p</span> <span class="ow">in</span> <span class="bp">self</span><span class="p">[</span><span class="s2">&quot;packages&quot;</span><span class="p">]</span> <span class="ow">or</span> <span class="p">[]]</span>
<span class="nd">@property</span> <span class="nd">@property</span>
<span class="k">def</span> <span class="nf">module_names</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span> <span class="k">def</span> <span class="nf">module_names</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
<span class="sd">&quot;&quot;&quot;Return the names of the modules&quot;&quot;&quot;</span> <span class="sd">&quot;&quot;&quot;Return the names of the modules&quot;&quot;&quot;</span>
<span class="k">return</span> <span class="p">[</span><span class="n">m</span><span class="p">[</span><span class="s2">&quot;name&quot;</span><span class="p">]</span> <span class="k">for</span> <span class="n">m</span> <span class="ow">in</span> <span class="bp">self</span><span class="p">[</span><span class="s2">&quot;modules&quot;</span><span class="p">]</span> <span class="ow">or</span> <span class="p">[]]</span> <span class="k">return</span> <span class="p">[</span><span class="n">m</span><span class="p">[</span><span class="s2">&quot;name&quot;</span><span class="p">]</span> <span class="k">for</span> <span class="n">m</span> <span class="ow">in</span> <span class="bp">self</span><span class="p">[</span><span class="s2">&quot;modules&quot;</span><span class="p">]</span> <span class="ow">or</span> <span class="p">[]]</span>
<span class="nd">@property</span>
<span class="k">def</span> <span class="nf">module_nver</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
<span class="sd">&quot;&quot;&quot;Return the names and version globs of the modules&quot;&quot;&quot;</span>
<span class="k">return</span> <span class="p">[(</span><span class="n">m</span><span class="p">[</span><span class="s2">&quot;name&quot;</span><span class="p">],</span> <span class="n">m</span><span class="p">[</span><span class="s2">&quot;version&quot;</span><span class="p">])</span> <span class="k">for</span> <span class="n">m</span> <span class="ow">in</span> <span class="bp">self</span><span class="p">[</span><span class="s2">&quot;modules&quot;</span><span class="p">]</span> <span class="ow">or</span> <span class="p">[]]</span>
<span class="nd">@property</span> <span class="nd">@property</span>
<span class="k">def</span> <span class="nf">filename</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span> <span class="k">def</span> <span class="nf">filename</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
<span class="sd">&quot;&quot;&quot;Return the Recipe&#39;s filename</span> <span class="sd">&quot;&quot;&quot;Return the Recipe&#39;s filename</span>
@ -1080,7 +1090,7 @@
<script type="text/javascript"> <script type="text/javascript">
var DOCUMENTATION_OPTIONS = { var DOCUMENTATION_OPTIONS = {
URL_ROOT:'../../../', URL_ROOT:'../../../',
VERSION:'29.1', VERSION:'29.6',
LANGUAGE:'None', LANGUAGE:'None',
COLLAPSE_INDEX:false, COLLAPSE_INDEX:false,
FILE_SUFFIX:'.html', FILE_SUFFIX:'.html',
@ -1101,9 +1111,7 @@
<script type="text/javascript"> <script type="text/javascript">
jQuery(function () { jQuery(function () {
SphinxRtdTheme.Navigation.enable(true);
SphinxRtdTheme.Navigation.enableSticky();
}); });
</script> </script>

View File

@ -8,7 +8,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>pylorax.api.server &mdash; Lorax 29.1 documentation</title> <title>pylorax.api.server &mdash; Lorax 29.6 documentation</title>
@ -57,7 +57,7 @@
<div class="version"> <div class="version">
29.1 29.6
</div> </div>
@ -266,7 +266,7 @@
<script type="text/javascript"> <script type="text/javascript">
var DOCUMENTATION_OPTIONS = { var DOCUMENTATION_OPTIONS = {
URL_ROOT:'../../../', URL_ROOT:'../../../',
VERSION:'29.1', VERSION:'29.6',
LANGUAGE:'None', LANGUAGE:'None',
COLLAPSE_INDEX:false, COLLAPSE_INDEX:false,
FILE_SUFFIX:'.html', FILE_SUFFIX:'.html',
@ -287,9 +287,7 @@
<script type="text/javascript"> <script type="text/javascript">
jQuery(function () { jQuery(function () {
SphinxRtdTheme.Navigation.enable(true);
SphinxRtdTheme.Navigation.enableSticky();
}); });
</script> </script>

View File

@ -8,7 +8,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>pylorax.api.v0 &mdash; Lorax 29.1 documentation</title> <title>pylorax.api.v0 &mdash; Lorax 29.6 documentation</title>
@ -57,7 +57,7 @@
<div class="version"> <div class="version">
29.1 29.6
</div> </div>
@ -658,6 +658,94 @@
<span class="sd"> ]</span> <span class="sd"> ]</span>
<span class="sd"> }</span> <span class="sd"> }</span>
<span class="sd">`/api/v0/projects/source/list`</span>
<span class="sd">^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^</span>
<span class="sd"> Return the list of repositories used for depsolving and installing packages.</span>
<span class="sd"> Example::</span>
<span class="sd"> {</span>
<span class="sd"> &quot;sources&quot;: [</span>
<span class="sd"> &quot;fedora&quot;,</span>
<span class="sd"> &quot;fedora-cisco-openh264&quot;,</span>
<span class="sd"> &quot;fedora-updates-testing&quot;,</span>
<span class="sd"> &quot;fedora-updates&quot;</span>
<span class="sd"> ]</span>
<span class="sd"> }</span>
<span class="sd">`/api/v0/projects/source/info/&lt;source-names&gt;`</span>
<span class="sd">^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^</span>
<span class="sd"> Return information about the comma-separated list of source names. Or all of the</span>
<span class="sd"> sources if &#39;*&#39; is passed. Note that general globbing is not supported, only &#39;*&#39;.</span>
<span class="sd"> immutable system sources will have the &quot;system&quot; field set to true. User added sources</span>
<span class="sd"> will have it set to false. System sources cannot be changed or deleted.</span>
<span class="sd"> Example::</span>
<span class="sd"> {</span>
<span class="sd"> &quot;errors&quot;: [],</span>
<span class="sd"> &quot;sources&quot;: {</span>
<span class="sd"> &quot;fedora&quot;: {</span>
<span class="sd"> &quot;check_gpg&quot;: true,</span>
<span class="sd"> &quot;check_ssl&quot;: true,</span>
<span class="sd"> &quot;gpgkey_urls&quot;: [</span>
<span class="sd"> &quot;file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-28-x86_64&quot;</span>
<span class="sd"> ],</span>
<span class="sd"> &quot;name&quot;: &quot;fedora&quot;,</span>
<span class="sd"> &quot;proxy&quot;: &quot;http://proxy.brianlane.com:8123&quot;,</span>
<span class="sd"> &quot;system&quot;: true,</span>
<span class="sd"> &quot;type&quot;: &quot;yum-metalink&quot;,</span>
<span class="sd"> &quot;url&quot;: &quot;https://mirrors.fedoraproject.org/metalink?repo=fedora-28&amp;arch=x86_64&quot;</span>
<span class="sd"> }</span>
<span class="sd"> }</span>
<span class="sd"> }</span>
<span class="sd">POST `/api/v0/projects/source/new`</span>
<span class="sd">^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^</span>
<span class="sd"> Add (or change) a source for use when depsolving blueprints and composing images.</span>
<span class="sd"> The ``proxy`` and ``gpgkey_urls`` entries are optional. All of the others are required. The supported</span>
<span class="sd"> types for the urls are:</span>
<span class="sd"> * ``yum-baseurl`` is a URL to a yum repository.</span>
<span class="sd"> * ``yum-mirrorlist`` is a URL for a mirrorlist.</span>
<span class="sd"> * ``yum-metalink`` is a URL for a metalink.</span>
<span class="sd"> If ``check_ssl`` is true the https certificates must be valid. If they are self-signed you can either set</span>
<span class="sd"> this to false, or add your Certificate Authority to the host system.</span>
<span class="sd"> If ``check_gpg`` is true the GPG key must either be installed on the host system, or ``gpgkey_urls``</span>
<span class="sd"> should point to it.</span>
<span class="sd"> You can edit an existing source (other than system sources), by doing a POST</span>
<span class="sd"> of the new version of the source. It will overwrite the previous one.</span>
<span class="sd"> Example::</span>
<span class="sd"> {</span>
<span class="sd"> &quot;name&quot;: &quot;custom-source-1&quot;,</span>
<span class="sd"> &quot;url&quot;: &quot;https://url/path/to/repository/&quot;,</span>
<span class="sd"> &quot;type&quot;: &quot;yum-baseurl&quot;,</span>
<span class="sd"> &quot;check_ssl&quot;: true,</span>
<span class="sd"> &quot;check_gpg&quot;: true,</span>
<span class="sd"> &quot;gpgkey_urls&quot;: [</span>
<span class="sd"> &quot;https://url/path/to/gpg-key&quot;</span>
<span class="sd"> ]</span>
<span class="sd"> }</span>
<span class="sd">DELETE `/api/v0/projects/source/delete/&lt;source-name&gt;`</span>
<span class="sd">^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^</span>
<span class="sd"> Delete a user added source. This will fail if a system source is passed to</span>
<span class="sd"> it.</span>
<span class="sd"> The response will be a status response with `status` set to true, or an</span>
<span class="sd"> error response with it set to false and an error message included.</span>
<span class="sd">`/api/v0/modules/list[?offset=0&amp;limit=20]`</span> <span class="sd">`/api/v0/modules/list[?offset=0&amp;limit=20]`</span>
<span class="sd">^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^</span> <span class="sd">^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^</span>
@ -1035,11 +1123,14 @@
<span class="kn">import</span> <span class="nn">os</span> <span class="kn">import</span> <span class="nn">os</span>
<span class="kn">from</span> <span class="nn">flask</span> <span class="k">import</span> <span class="n">jsonify</span><span class="p">,</span> <span class="n">request</span><span class="p">,</span> <span class="n">Response</span><span class="p">,</span> <span class="n">send_file</span> <span class="kn">from</span> <span class="nn">flask</span> <span class="k">import</span> <span class="n">jsonify</span><span class="p">,</span> <span class="n">request</span><span class="p">,</span> <span class="n">Response</span><span class="p">,</span> <span class="n">send_file</span>
<span class="kn">import</span> <span class="nn">pytoml</span> <span class="k">as</span> <span class="nn">toml</span>
<span class="kn">from</span> <span class="nn">pylorax.sysutils</span> <span class="k">import</span> <span class="n">joinpaths</span>
<span class="kn">from</span> <span class="nn">pylorax.api.compose</span> <span class="k">import</span> <span class="n">start_build</span><span class="p">,</span> <span class="n">compose_types</span> <span class="kn">from</span> <span class="nn">pylorax.api.compose</span> <span class="k">import</span> <span class="n">start_build</span><span class="p">,</span> <span class="n">compose_types</span>
<span class="kn">from</span> <span class="nn">pylorax.api.crossdomain</span> <span class="k">import</span> <span class="n">crossdomain</span> <span class="kn">from</span> <span class="nn">pylorax.api.crossdomain</span> <span class="k">import</span> <span class="n">crossdomain</span>
<span class="kn">from</span> <span class="nn">pylorax.api.projects</span> <span class="k">import</span> <span class="n">projects_list</span><span class="p">,</span> <span class="n">projects_info</span><span class="p">,</span> <span class="n">projects_depsolve</span> <span class="kn">from</span> <span class="nn">pylorax.api.projects</span> <span class="k">import</span> <span class="n">projects_list</span><span class="p">,</span> <span class="n">projects_info</span><span class="p">,</span> <span class="n">projects_depsolve</span>
<span class="kn">from</span> <span class="nn">pylorax.api.projects</span> <span class="k">import</span> <span class="n">modules_list</span><span class="p">,</span> <span class="n">modules_info</span><span class="p">,</span> <span class="n">ProjectsError</span> <span class="kn">from</span> <span class="nn">pylorax.api.projects</span> <span class="k">import</span> <span class="n">modules_list</span><span class="p">,</span> <span class="n">modules_info</span><span class="p">,</span> <span class="n">ProjectsError</span><span class="p">,</span> <span class="n">repo_to_source</span>
<span class="kn">from</span> <span class="nn">pylorax.api.projects</span> <span class="k">import</span> <span class="n">get_repo_sources</span><span class="p">,</span> <span class="n">delete_repo_source</span><span class="p">,</span> <span class="n">source_to_repo</span><span class="p">,</span> <span class="n">dnf_repo_to_file_repo</span>
<span class="kn">from</span> <span class="nn">pylorax.api.queue</span> <span class="k">import</span> <span class="n">queue_status</span><span class="p">,</span> <span class="n">build_status</span><span class="p">,</span> <span class="n">uuid_delete</span><span class="p">,</span> <span class="n">uuid_status</span><span class="p">,</span> <span class="n">uuid_info</span> <span class="kn">from</span> <span class="nn">pylorax.api.queue</span> <span class="k">import</span> <span class="n">queue_status</span><span class="p">,</span> <span class="n">build_status</span><span class="p">,</span> <span class="n">uuid_delete</span><span class="p">,</span> <span class="n">uuid_status</span><span class="p">,</span> <span class="n">uuid_info</span>
<span class="kn">from</span> <span class="nn">pylorax.api.queue</span> <span class="k">import</span> <span class="n">uuid_tar</span><span class="p">,</span> <span class="n">uuid_image</span><span class="p">,</span> <span class="n">uuid_cancel</span><span class="p">,</span> <span class="n">uuid_log</span> <span class="kn">from</span> <span class="nn">pylorax.api.queue</span> <span class="k">import</span> <span class="n">uuid_tar</span><span class="p">,</span> <span class="n">uuid_image</span><span class="p">,</span> <span class="n">uuid_cancel</span><span class="p">,</span> <span class="n">uuid_log</span>
<span class="kn">from</span> <span class="nn">pylorax.api.recipes</span> <span class="k">import</span> <span class="n">list_branch_files</span><span class="p">,</span> <span class="n">read_recipe_commit</span><span class="p">,</span> <span class="n">recipe_filename</span><span class="p">,</span> <span class="n">list_commits</span> <span class="kn">from</span> <span class="nn">pylorax.api.recipes</span> <span class="k">import</span> <span class="n">list_branch_files</span><span class="p">,</span> <span class="n">read_recipe_commit</span><span class="p">,</span> <span class="n">recipe_filename</span><span class="p">,</span> <span class="n">list_commits</span>
@ -1338,9 +1429,9 @@
<span class="c1"># Combine modules and packages and depsolve the list</span> <span class="c1"># Combine modules and packages and depsolve the list</span>
<span class="c1"># TODO include the version/glob in the depsolving</span> <span class="c1"># TODO include the version/glob in the depsolving</span>
<span class="n">module_names</span> <span class="o">=</span> <span class="n">blueprint</span><span class="o">.</span><span class="n">module_names</span> <span class="n">module_nver</span> <span class="o">=</span> <span class="n">blueprint</span><span class="o">.</span><span class="n">module_nver</span>
<span class="n">package_names</span> <span class="o">=</span> <span class="n">blueprint</span><span class="o">.</span><span class="n">package_names</span> <span class="n">package_nver</span> <span class="o">=</span> <span class="n">blueprint</span><span class="o">.</span><span class="n">package_nver</span>
<span class="n">projects</span> <span class="o">=</span> <span class="nb">sorted</span><span class="p">(</span><span class="nb">set</span><span class="p">(</span><span class="n">module_names</span><span class="o">+</span><span class="n">package_names</span><span class="p">),</span> <span class="n">key</span><span class="o">=</span><span class="k">lambda</span> <span class="n">n</span><span class="p">:</span> <span class="n">n</span><span class="o">.</span><span class="n">lower</span><span class="p">())</span> <span class="n">projects</span> <span class="o">=</span> <span class="nb">sorted</span><span class="p">(</span><span class="nb">set</span><span class="p">(</span><span class="n">module_nver</span><span class="o">+</span><span class="n">package_nver</span><span class="p">),</span> <span class="n">key</span><span class="o">=</span><span class="k">lambda</span> <span class="n">p</span><span class="p">:</span> <span class="n">p</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span><span class="o">.</span><span class="n">lower</span><span class="p">())</span>
<span class="n">deps</span> <span class="o">=</span> <span class="p">[]</span> <span class="n">deps</span> <span class="o">=</span> <span class="p">[]</span>
<span class="k">try</span><span class="p">:</span> <span class="k">try</span><span class="p">:</span>
<span class="k">with</span> <span class="n">api</span><span class="o">.</span><span class="n">config</span><span class="p">[</span><span class="s2">&quot;DNFLOCK&quot;</span><span class="p">]</span><span class="o">.</span><span class="n">lock</span><span class="p">:</span> <span class="k">with</span> <span class="n">api</span><span class="o">.</span><span class="n">config</span><span class="p">[</span><span class="s2">&quot;DNFLOCK&quot;</span><span class="p">]</span><span class="o">.</span><span class="n">lock</span><span class="p">:</span>
@ -1390,9 +1481,9 @@
<span class="c1"># Combine modules and packages and depsolve the list</span> <span class="c1"># Combine modules and packages and depsolve the list</span>
<span class="c1"># TODO include the version/glob in the depsolving</span> <span class="c1"># TODO include the version/glob in the depsolving</span>
<span class="n">module_names</span> <span class="o">=</span> <span class="p">[</span><span class="n">m</span><span class="p">[</span><span class="s2">&quot;name&quot;</span><span class="p">]</span> <span class="k">for</span> <span class="n">m</span> <span class="ow">in</span> <span class="n">blueprint</span><span class="p">[</span><span class="s2">&quot;modules&quot;</span><span class="p">]</span> <span class="ow">or</span> <span class="p">[]]</span> <span class="n">module_nver</span> <span class="o">=</span> <span class="n">blueprint</span><span class="o">.</span><span class="n">module_nver</span>
<span class="n">package_names</span> <span class="o">=</span> <span class="p">[</span><span class="n">p</span><span class="p">[</span><span class="s2">&quot;name&quot;</span><span class="p">]</span> <span class="k">for</span> <span class="n">p</span> <span class="ow">in</span> <span class="n">blueprint</span><span class="p">[</span><span class="s2">&quot;packages&quot;</span><span class="p">]</span> <span class="ow">or</span> <span class="p">[]]</span> <span class="n">package_nver</span> <span class="o">=</span> <span class="n">blueprint</span><span class="o">.</span><span class="n">package_nver</span>
<span class="n">projects</span> <span class="o">=</span> <span class="nb">sorted</span><span class="p">(</span><span class="nb">set</span><span class="p">(</span><span class="n">module_names</span><span class="o">+</span><span class="n">package_names</span><span class="p">),</span> <span class="n">key</span><span class="o">=</span><span class="k">lambda</span> <span class="n">n</span><span class="p">:</span> <span class="n">n</span><span class="o">.</span><span class="n">lower</span><span class="p">())</span> <span class="n">projects</span> <span class="o">=</span> <span class="nb">sorted</span><span class="p">(</span><span class="nb">set</span><span class="p">(</span><span class="n">module_nver</span><span class="o">+</span><span class="n">package_nver</span><span class="p">),</span> <span class="n">key</span><span class="o">=</span><span class="k">lambda</span> <span class="n">p</span><span class="p">:</span> <span class="n">p</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span><span class="o">.</span><span class="n">lower</span><span class="p">())</span>
<span class="n">deps</span> <span class="o">=</span> <span class="p">[]</span> <span class="n">deps</span> <span class="o">=</span> <span class="p">[]</span>
<span class="k">try</span><span class="p">:</span> <span class="k">try</span><span class="p">:</span>
<span class="k">with</span> <span class="n">api</span><span class="o">.</span><span class="n">config</span><span class="p">[</span><span class="s2">&quot;DNFLOCK&quot;</span><span class="p">]</span><span class="o">.</span><span class="n">lock</span><span class="p">:</span> <span class="k">with</span> <span class="n">api</span><span class="o">.</span><span class="n">config</span><span class="p">[</span><span class="s2">&quot;DNFLOCK&quot;</span><span class="p">]</span><span class="o">.</span><span class="n">lock</span><span class="p">:</span>
@ -1451,13 +1542,139 @@
<span class="sd">&quot;&quot;&quot;Return detailed information about the listed projects&quot;&quot;&quot;</span> <span class="sd">&quot;&quot;&quot;Return detailed information about the listed projects&quot;&quot;&quot;</span>
<span class="k">try</span><span class="p">:</span> <span class="k">try</span><span class="p">:</span>
<span class="k">with</span> <span class="n">api</span><span class="o">.</span><span class="n">config</span><span class="p">[</span><span class="s2">&quot;DNFLOCK&quot;</span><span class="p">]</span><span class="o">.</span><span class="n">lock</span><span class="p">:</span> <span class="k">with</span> <span class="n">api</span><span class="o">.</span><span class="n">config</span><span class="p">[</span><span class="s2">&quot;DNFLOCK&quot;</span><span class="p">]</span><span class="o">.</span><span class="n">lock</span><span class="p">:</span>
<span class="n">deps</span> <span class="o">=</span> <span class="n">projects_depsolve</span><span class="p">(</span><span class="n">api</span><span class="o">.</span><span class="n">config</span><span class="p">[</span><span class="s2">&quot;DNFLOCK&quot;</span><span class="p">]</span><span class="o">.</span><span class="n">dbo</span><span class="p">,</span> <span class="n">project_names</span><span class="o">.</span><span class="n">split</span><span class="p">(</span><span class="s2">&quot;,&quot;</span><span class="p">))</span> <span class="n">deps</span> <span class="o">=</span> <span class="n">projects_depsolve</span><span class="p">(</span><span class="n">api</span><span class="o">.</span><span class="n">config</span><span class="p">[</span><span class="s2">&quot;DNFLOCK&quot;</span><span class="p">]</span><span class="o">.</span><span class="n">dbo</span><span class="p">,</span> <span class="p">[(</span><span class="n">n</span><span class="p">,</span> <span class="s2">&quot;*&quot;</span><span class="p">)</span> <span class="k">for</span> <span class="n">n</span> <span class="ow">in</span> <span class="n">project_names</span><span class="o">.</span><span class="n">split</span><span class="p">(</span><span class="s2">&quot;,&quot;</span><span class="p">)])</span>
<span class="k">except</span> <span class="n">ProjectsError</span> <span class="k">as</span> <span class="n">e</span><span class="p">:</span> <span class="k">except</span> <span class="n">ProjectsError</span> <span class="k">as</span> <span class="n">e</span><span class="p">:</span>
<span class="n">log</span><span class="o">.</span><span class="n">error</span><span class="p">(</span><span class="s2">&quot;(v0_projects_depsolve) </span><span class="si">%s</span><span class="s2">&quot;</span><span class="p">,</span> <span class="nb">str</span><span class="p">(</span><span class="n">e</span><span class="p">))</span> <span class="n">log</span><span class="o">.</span><span class="n">error</span><span class="p">(</span><span class="s2">&quot;(v0_projects_depsolve) </span><span class="si">%s</span><span class="s2">&quot;</span><span class="p">,</span> <span class="nb">str</span><span class="p">(</span><span class="n">e</span><span class="p">))</span>
<span class="k">return</span> <span class="n">jsonify</span><span class="p">(</span><span class="n">status</span><span class="o">=</span><span class="kc">False</span><span class="p">,</span> <span class="n">errors</span><span class="o">=</span><span class="p">[</span><span class="nb">str</span><span class="p">(</span><span class="n">e</span><span class="p">)]),</span> <span class="mi">400</span> <span class="k">return</span> <span class="n">jsonify</span><span class="p">(</span><span class="n">status</span><span class="o">=</span><span class="kc">False</span><span class="p">,</span> <span class="n">errors</span><span class="o">=</span><span class="p">[</span><span class="nb">str</span><span class="p">(</span><span class="n">e</span><span class="p">)]),</span> <span class="mi">400</span>
<span class="k">return</span> <span class="n">jsonify</span><span class="p">(</span><span class="n">projects</span><span class="o">=</span><span class="n">deps</span><span class="p">)</span> <span class="k">return</span> <span class="n">jsonify</span><span class="p">(</span><span class="n">projects</span><span class="o">=</span><span class="n">deps</span><span class="p">)</span>
<span class="nd">@api</span><span class="o">.</span><span class="n">route</span><span class="p">(</span><span class="s2">&quot;/api/v0/projects/source/list&quot;</span><span class="p">)</span>
<span class="nd">@crossdomain</span><span class="p">(</span><span class="n">origin</span><span class="o">=</span><span class="s2">&quot;*&quot;</span><span class="p">)</span>
<span class="k">def</span> <span class="nf">v0_projects_source_list</span><span class="p">():</span>
<span class="sd">&quot;&quot;&quot;Return the list of source names&quot;&quot;&quot;</span>
<span class="k">with</span> <span class="n">api</span><span class="o">.</span><span class="n">config</span><span class="p">[</span><span class="s2">&quot;DNFLOCK&quot;</span><span class="p">]</span><span class="o">.</span><span class="n">lock</span><span class="p">:</span>
<span class="n">repos</span> <span class="o">=</span> <span class="nb">list</span><span class="p">(</span><span class="n">api</span><span class="o">.</span><span class="n">config</span><span class="p">[</span><span class="s2">&quot;DNFLOCK&quot;</span><span class="p">]</span><span class="o">.</span><span class="n">dbo</span><span class="o">.</span><span class="n">repos</span><span class="o">.</span><span class="n">iter_enabled</span><span class="p">())</span>
<span class="n">sources</span> <span class="o">=</span> <span class="nb">sorted</span><span class="p">([</span><span class="n">r</span><span class="o">.</span><span class="n">id</span> <span class="k">for</span> <span class="n">r</span> <span class="ow">in</span> <span class="n">repos</span><span class="p">])</span>
<span class="k">return</span> <span class="n">jsonify</span><span class="p">(</span><span class="n">sources</span><span class="o">=</span><span class="n">sources</span><span class="p">)</span>
<span class="nd">@api</span><span class="o">.</span><span class="n">route</span><span class="p">(</span><span class="s2">&quot;/api/v0/projects/source/info/&lt;source_names&gt;&quot;</span><span class="p">)</span>
<span class="nd">@crossdomain</span><span class="p">(</span><span class="n">origin</span><span class="o">=</span><span class="s2">&quot;*&quot;</span><span class="p">)</span>
<span class="k">def</span> <span class="nf">v0_projects_source_info</span><span class="p">(</span><span class="n">source_names</span><span class="p">):</span>
<span class="sd">&quot;&quot;&quot;Return detailed info about the list of sources&quot;&quot;&quot;</span>
<span class="n">out_fmt</span> <span class="o">=</span> <span class="n">request</span><span class="o">.</span><span class="n">args</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="s2">&quot;format&quot;</span><span class="p">,</span> <span class="s2">&quot;json&quot;</span><span class="p">)</span>
<span class="c1"># Return info on all of the sources</span>
<span class="k">if</span> <span class="n">source_names</span> <span class="o">==</span> <span class="s2">&quot;*&quot;</span><span class="p">:</span>
<span class="k">with</span> <span class="n">api</span><span class="o">.</span><span class="n">config</span><span class="p">[</span><span class="s2">&quot;DNFLOCK&quot;</span><span class="p">]</span><span class="o">.</span><span class="n">lock</span><span class="p">:</span>
<span class="n">source_names</span> <span class="o">=</span> <span class="s2">&quot;,&quot;</span><span class="o">.</span><span class="n">join</span><span class="p">(</span><span class="n">r</span><span class="o">.</span><span class="n">id</span> <span class="k">for</span> <span class="n">r</span> <span class="ow">in</span> <span class="n">api</span><span class="o">.</span><span class="n">config</span><span class="p">[</span><span class="s2">&quot;DNFLOCK&quot;</span><span class="p">]</span><span class="o">.</span><span class="n">dbo</span><span class="o">.</span><span class="n">repos</span><span class="o">.</span><span class="n">iter_enabled</span><span class="p">())</span>
<span class="n">sources</span> <span class="o">=</span> <span class="p">{}</span>
<span class="n">errors</span> <span class="o">=</span> <span class="p">[]</span>
<span class="n">system_sources</span> <span class="o">=</span> <span class="n">get_repo_sources</span><span class="p">(</span><span class="s2">&quot;/etc/yum.repos.d/*.repo&quot;</span><span class="p">)</span>
<span class="k">for</span> <span class="n">source</span> <span class="ow">in</span> <span class="n">source_names</span><span class="o">.</span><span class="n">split</span><span class="p">(</span><span class="s2">&quot;,&quot;</span><span class="p">):</span>
<span class="k">with</span> <span class="n">api</span><span class="o">.</span><span class="n">config</span><span class="p">[</span><span class="s2">&quot;DNFLOCK&quot;</span><span class="p">]</span><span class="o">.</span><span class="n">lock</span><span class="p">:</span>
<span class="n">repo</span> <span class="o">=</span> <span class="n">api</span><span class="o">.</span><span class="n">config</span><span class="p">[</span><span class="s2">&quot;DNFLOCK&quot;</span><span class="p">]</span><span class="o">.</span><span class="n">dbo</span><span class="o">.</span><span class="n">repos</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="n">source</span><span class="p">,</span> <span class="kc">None</span><span class="p">)</span>
<span class="k">if</span> <span class="ow">not</span> <span class="n">repo</span><span class="p">:</span>
<span class="n">errors</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="s2">&quot;</span><span class="si">%s</span><span class="s2"> is not a valid source&quot;</span> <span class="o">%</span> <span class="n">source</span><span class="p">)</span>
<span class="k">continue</span>
<span class="n">sources</span><span class="p">[</span><span class="n">repo</span><span class="o">.</span><span class="n">id</span><span class="p">]</span> <span class="o">=</span> <span class="n">repo_to_source</span><span class="p">(</span><span class="n">repo</span><span class="p">,</span> <span class="n">repo</span><span class="o">.</span><span class="n">id</span> <span class="ow">in</span> <span class="n">system_sources</span><span class="p">)</span>
<span class="k">if</span> <span class="n">out_fmt</span> <span class="o">==</span> <span class="s2">&quot;toml&quot;</span> <span class="ow">and</span> <span class="ow">not</span> <span class="n">errors</span><span class="p">:</span>
<span class="c1"># With TOML output we just want to dump the raw sources, skipping the errors</span>
<span class="k">return</span> <span class="n">toml</span><span class="o">.</span><span class="n">dumps</span><span class="p">(</span><span class="n">sources</span><span class="p">)</span>
<span class="k">elif</span> <span class="n">out_fmt</span> <span class="o">==</span> <span class="s2">&quot;toml&quot;</span> <span class="ow">and</span> <span class="n">errors</span><span class="p">:</span>
<span class="c1"># TOML requested, but there was an error</span>
<span class="k">return</span> <span class="n">jsonify</span><span class="p">(</span><span class="n">status</span><span class="o">=</span><span class="kc">False</span><span class="p">,</span> <span class="n">errors</span><span class="o">=</span><span class="n">errors</span><span class="p">),</span> <span class="mi">400</span>
<span class="k">else</span><span class="p">:</span>
<span class="k">return</span> <span class="n">jsonify</span><span class="p">(</span><span class="n">sources</span><span class="o">=</span><span class="n">sources</span><span class="p">,</span> <span class="n">errors</span><span class="o">=</span><span class="n">errors</span><span class="p">)</span>
<span class="nd">@api</span><span class="o">.</span><span class="n">route</span><span class="p">(</span><span class="s2">&quot;/api/v0/projects/source/new&quot;</span><span class="p">,</span> <span class="n">methods</span><span class="o">=</span><span class="p">[</span><span class="s2">&quot;POST&quot;</span><span class="p">])</span>
<span class="nd">@crossdomain</span><span class="p">(</span><span class="n">origin</span><span class="o">=</span><span class="s2">&quot;*&quot;</span><span class="p">)</span>
<span class="k">def</span> <span class="nf">v0_projects_source_new</span><span class="p">():</span>
<span class="sd">&quot;&quot;&quot;Add a new package source. Or change an existing one&quot;&quot;&quot;</span>
<span class="k">if</span> <span class="n">request</span><span class="o">.</span><span class="n">headers</span><span class="p">[</span><span class="s1">&#39;Content-Type&#39;</span><span class="p">]</span> <span class="o">==</span> <span class="s2">&quot;text/x-toml&quot;</span><span class="p">:</span>
<span class="n">source</span> <span class="o">=</span> <span class="n">toml</span><span class="o">.</span><span class="n">loads</span><span class="p">(</span><span class="n">request</span><span class="o">.</span><span class="n">data</span><span class="p">)</span>
<span class="k">else</span><span class="p">:</span>
<span class="n">source</span> <span class="o">=</span> <span class="n">request</span><span class="o">.</span><span class="n">get_json</span><span class="p">(</span><span class="n">cache</span><span class="o">=</span><span class="kc">False</span><span class="p">)</span>
<span class="n">system_sources</span> <span class="o">=</span> <span class="n">get_repo_sources</span><span class="p">(</span><span class="s2">&quot;/etc/yum.repos.d/*.repo&quot;</span><span class="p">)</span>
<span class="k">if</span> <span class="n">source</span><span class="p">[</span><span class="s2">&quot;name&quot;</span><span class="p">]</span> <span class="ow">in</span> <span class="n">system_sources</span><span class="p">:</span>
<span class="k">return</span> <span class="n">jsonify</span><span class="p">(</span><span class="n">status</span><span class="o">=</span><span class="kc">False</span><span class="p">,</span> <span class="n">errors</span><span class="o">=</span><span class="p">[</span><span class="s2">&quot;</span><span class="si">%s</span><span class="s2"> is a system source, it cannot be deleted.&quot;</span> <span class="o">%</span> <span class="n">source</span><span class="p">[</span><span class="s2">&quot;name&quot;</span><span class="p">]]),</span> <span class="mi">400</span>
<span class="k">try</span><span class="p">:</span>
<span class="c1"># Remove it from the RepoDict (NOTE that this isn&#39;t explicitly supported by the DNF API)</span>
<span class="k">with</span> <span class="n">api</span><span class="o">.</span><span class="n">config</span><span class="p">[</span><span class="s2">&quot;DNFLOCK&quot;</span><span class="p">]</span><span class="o">.</span><span class="n">lock</span><span class="p">:</span>
<span class="n">dbo</span> <span class="o">=</span> <span class="n">api</span><span class="o">.</span><span class="n">config</span><span class="p">[</span><span class="s2">&quot;DNFLOCK&quot;</span><span class="p">]</span><span class="o">.</span><span class="n">dbo</span>
<span class="c1"># If this repo already exists, delete it and replace it with the new one</span>
<span class="n">repos</span> <span class="o">=</span> <span class="nb">list</span><span class="p">(</span><span class="n">r</span><span class="o">.</span><span class="n">id</span> <span class="k">for</span> <span class="n">r</span> <span class="ow">in</span> <span class="n">dbo</span><span class="o">.</span><span class="n">repos</span><span class="o">.</span><span class="n">iter_enabled</span><span class="p">())</span>
<span class="k">if</span> <span class="n">source</span><span class="p">[</span><span class="s2">&quot;name&quot;</span><span class="p">]</span> <span class="ow">in</span> <span class="n">repos</span><span class="p">:</span>
<span class="k">del</span> <span class="n">dbo</span><span class="o">.</span><span class="n">repos</span><span class="p">[</span><span class="n">source</span><span class="p">[</span><span class="s2">&quot;name&quot;</span><span class="p">]]</span>
<span class="n">repo</span> <span class="o">=</span> <span class="n">source_to_repo</span><span class="p">(</span><span class="n">source</span><span class="p">,</span> <span class="n">dbo</span><span class="o">.</span><span class="n">conf</span><span class="p">)</span>
<span class="n">dbo</span><span class="o">.</span><span class="n">repos</span><span class="o">.</span><span class="n">add</span><span class="p">(</span><span class="n">repo</span><span class="p">)</span>
<span class="n">log</span><span class="o">.</span><span class="n">info</span><span class="p">(</span><span class="s2">&quot;Updating repository metadata after adding </span><span class="si">%s</span><span class="s2">&quot;</span><span class="p">,</span> <span class="n">source</span><span class="p">[</span><span class="s2">&quot;name&quot;</span><span class="p">])</span>
<span class="n">dbo</span><span class="o">.</span><span class="n">fill_sack</span><span class="p">(</span><span class="n">load_system_repo</span><span class="o">=</span><span class="kc">False</span><span class="p">)</span>
<span class="n">dbo</span><span class="o">.</span><span class="n">read_comps</span><span class="p">()</span>
<span class="c1"># Write the new repo to disk, replacing any existing ones</span>
<span class="n">repo_dir</span> <span class="o">=</span> <span class="n">api</span><span class="o">.</span><span class="n">config</span><span class="p">[</span><span class="s2">&quot;COMPOSER_CFG&quot;</span><span class="p">]</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="s2">&quot;composer&quot;</span><span class="p">,</span> <span class="s2">&quot;repo_dir&quot;</span><span class="p">)</span>
<span class="c1"># Remove any previous sources with this name, ignore it if it isn&#39;t found</span>
<span class="k">try</span><span class="p">:</span>
<span class="n">delete_repo_source</span><span class="p">(</span><span class="n">joinpaths</span><span class="p">(</span><span class="n">repo_dir</span><span class="p">,</span> <span class="s2">&quot;*.repo&quot;</span><span class="p">),</span> <span class="n">source</span><span class="p">[</span><span class="s2">&quot;name&quot;</span><span class="p">])</span>
<span class="k">except</span> <span class="n">ProjectsError</span><span class="p">:</span>
<span class="k">pass</span>
<span class="c1"># Make sure the source name can&#39;t contain a path traversal by taking the basename</span>
<span class="n">source_path</span> <span class="o">=</span> <span class="n">joinpaths</span><span class="p">(</span><span class="n">repo_dir</span><span class="p">,</span> <span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">basename</span><span class="p">(</span><span class="s2">&quot;</span><span class="si">%s</span><span class="s2">.repo&quot;</span> <span class="o">%</span> <span class="n">source</span><span class="p">[</span><span class="s2">&quot;name&quot;</span><span class="p">]))</span>
<span class="k">with</span> <span class="nb">open</span><span class="p">(</span><span class="n">source_path</span><span class="p">,</span> <span class="s2">&quot;w&quot;</span><span class="p">)</span> <span class="k">as</span> <span class="n">f</span><span class="p">:</span>
<span class="n">f</span><span class="o">.</span><span class="n">write</span><span class="p">(</span><span class="n">dnf_repo_to_file_repo</span><span class="p">(</span><span class="n">repo</span><span class="p">))</span>
<span class="k">except</span> <span class="ne">Exception</span> <span class="k">as</span> <span class="n">e</span><span class="p">:</span>
<span class="n">log</span><span class="o">.</span><span class="n">error</span><span class="p">(</span><span class="s2">&quot;(v0_projects_source_add) adding </span><span class="si">%s</span><span class="s2"> failed: </span><span class="si">%s</span><span class="s2">&quot;</span><span class="p">,</span> <span class="n">source</span><span class="p">[</span><span class="s2">&quot;name&quot;</span><span class="p">],</span> <span class="nb">str</span><span class="p">(</span><span class="n">e</span><span class="p">))</span>
<span class="c1"># Cleanup the mess, if loading it failed we don&#39;t want to leave it in memory</span>
<span class="n">repos</span> <span class="o">=</span> <span class="nb">list</span><span class="p">(</span><span class="n">r</span><span class="o">.</span><span class="n">id</span> <span class="k">for</span> <span class="n">r</span> <span class="ow">in</span> <span class="n">dbo</span><span class="o">.</span><span class="n">repos</span><span class="o">.</span><span class="n">iter_enabled</span><span class="p">())</span>
<span class="k">if</span> <span class="n">source</span><span class="p">[</span><span class="s2">&quot;name&quot;</span><span class="p">]</span> <span class="ow">in</span> <span class="n">repos</span><span class="p">:</span>
<span class="k">with</span> <span class="n">api</span><span class="o">.</span><span class="n">config</span><span class="p">[</span><span class="s2">&quot;DNFLOCK&quot;</span><span class="p">]</span><span class="o">.</span><span class="n">lock</span><span class="p">:</span>
<span class="n">dbo</span> <span class="o">=</span> <span class="n">api</span><span class="o">.</span><span class="n">config</span><span class="p">[</span><span class="s2">&quot;DNFLOCK&quot;</span><span class="p">]</span><span class="o">.</span><span class="n">dbo</span>
<span class="k">del</span> <span class="n">dbo</span><span class="o">.</span><span class="n">repos</span><span class="p">[</span><span class="n">source</span><span class="p">[</span><span class="s2">&quot;name&quot;</span><span class="p">]]</span>
<span class="n">log</span><span class="o">.</span><span class="n">info</span><span class="p">(</span><span class="s2">&quot;Updating repository metadata after adding </span><span class="si">%s</span><span class="s2"> failed&quot;</span><span class="p">,</span> <span class="n">source</span><span class="p">[</span><span class="s2">&quot;name&quot;</span><span class="p">])</span>
<span class="n">dbo</span><span class="o">.</span><span class="n">fill_sack</span><span class="p">(</span><span class="n">load_system_repo</span><span class="o">=</span><span class="kc">False</span><span class="p">)</span>
<span class="n">dbo</span><span class="o">.</span><span class="n">read_comps</span><span class="p">()</span>
<span class="k">return</span> <span class="n">jsonify</span><span class="p">(</span><span class="n">status</span><span class="o">=</span><span class="kc">False</span><span class="p">,</span> <span class="n">errors</span><span class="o">=</span><span class="p">[</span><span class="nb">str</span><span class="p">(</span><span class="n">e</span><span class="p">)]),</span> <span class="mi">400</span>
<span class="k">return</span> <span class="n">jsonify</span><span class="p">(</span><span class="n">status</span><span class="o">=</span><span class="kc">True</span><span class="p">)</span>
<span class="nd">@api</span><span class="o">.</span><span class="n">route</span><span class="p">(</span><span class="s2">&quot;/api/v0/projects/source/delete/&lt;source_name&gt;&quot;</span><span class="p">,</span> <span class="n">methods</span><span class="o">=</span><span class="p">[</span><span class="s2">&quot;DELETE&quot;</span><span class="p">])</span>
<span class="nd">@crossdomain</span><span class="p">(</span><span class="n">origin</span><span class="o">=</span><span class="s2">&quot;*&quot;</span><span class="p">)</span>
<span class="k">def</span> <span class="nf">v0_projects_source_delete</span><span class="p">(</span><span class="n">source_name</span><span class="p">):</span>
<span class="sd">&quot;&quot;&quot;Delete the named source and return a status response&quot;&quot;&quot;</span>
<span class="n">system_sources</span> <span class="o">=</span> <span class="n">get_repo_sources</span><span class="p">(</span><span class="s2">&quot;/etc/yum.repos.d/*.repo&quot;</span><span class="p">)</span>
<span class="k">if</span> <span class="n">source_name</span> <span class="ow">in</span> <span class="n">system_sources</span><span class="p">:</span>
<span class="k">return</span> <span class="n">jsonify</span><span class="p">(</span><span class="n">status</span><span class="o">=</span><span class="kc">False</span><span class="p">,</span> <span class="n">errors</span><span class="o">=</span><span class="p">[</span><span class="s2">&quot;</span><span class="si">%s</span><span class="s2"> is a system source, it cannot be deleted.&quot;</span> <span class="o">%</span> <span class="n">source_name</span><span class="p">]),</span> <span class="mi">400</span>
<span class="n">share_dir</span> <span class="o">=</span> <span class="n">api</span><span class="o">.</span><span class="n">config</span><span class="p">[</span><span class="s2">&quot;COMPOSER_CFG&quot;</span><span class="p">]</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="s2">&quot;composer&quot;</span><span class="p">,</span> <span class="s2">&quot;repo_dir&quot;</span><span class="p">)</span>
<span class="k">try</span><span class="p">:</span>
<span class="c1"># Remove the file entry for the source</span>
<span class="n">delete_repo_source</span><span class="p">(</span><span class="n">joinpaths</span><span class="p">(</span><span class="n">share_dir</span><span class="p">,</span> <span class="s2">&quot;*.repo&quot;</span><span class="p">),</span> <span class="n">source_name</span><span class="p">)</span>
<span class="c1"># Remove it from the RepoDict (NOTE that this isn&#39;t explicitly supported by the DNF API)</span>
<span class="k">with</span> <span class="n">api</span><span class="o">.</span><span class="n">config</span><span class="p">[</span><span class="s2">&quot;DNFLOCK&quot;</span><span class="p">]</span><span class="o">.</span><span class="n">lock</span><span class="p">:</span>
<span class="k">if</span> <span class="n">source_name</span> <span class="ow">in</span> <span class="n">api</span><span class="o">.</span><span class="n">config</span><span class="p">[</span><span class="s2">&quot;DNFLOCK&quot;</span><span class="p">]</span><span class="o">.</span><span class="n">dbo</span><span class="o">.</span><span class="n">repos</span><span class="p">:</span>
<span class="k">del</span> <span class="n">api</span><span class="o">.</span><span class="n">config</span><span class="p">[</span><span class="s2">&quot;DNFLOCK&quot;</span><span class="p">]</span><span class="o">.</span><span class="n">dbo</span><span class="o">.</span><span class="n">repos</span><span class="p">[</span><span class="n">source_name</span><span class="p">]</span>
<span class="n">log</span><span class="o">.</span><span class="n">info</span><span class="p">(</span><span class="s2">&quot;Updating repository metadata after removing </span><span class="si">%s</span><span class="s2">&quot;</span><span class="p">,</span> <span class="n">source_name</span><span class="p">)</span>
<span class="n">api</span><span class="o">.</span><span class="n">config</span><span class="p">[</span><span class="s2">&quot;DNFLOCK&quot;</span><span class="p">]</span><span class="o">.</span><span class="n">dbo</span><span class="o">.</span><span class="n">fill_sack</span><span class="p">(</span><span class="n">load_system_repo</span><span class="o">=</span><span class="kc">False</span><span class="p">)</span>
<span class="n">api</span><span class="o">.</span><span class="n">config</span><span class="p">[</span><span class="s2">&quot;DNFLOCK&quot;</span><span class="p">]</span><span class="o">.</span><span class="n">dbo</span><span class="o">.</span><span class="n">read_comps</span><span class="p">()</span>
<span class="k">except</span> <span class="n">ProjectsError</span> <span class="k">as</span> <span class="n">e</span><span class="p">:</span>
<span class="n">log</span><span class="o">.</span><span class="n">error</span><span class="p">(</span><span class="s2">&quot;(v0_projects_source_delete) </span><span class="si">%s</span><span class="s2">&quot;</span><span class="p">,</span> <span class="nb">str</span><span class="p">(</span><span class="n">e</span><span class="p">))</span>
<span class="k">return</span> <span class="n">jsonify</span><span class="p">(</span><span class="n">status</span><span class="o">=</span><span class="kc">False</span><span class="p">,</span> <span class="n">errors</span><span class="o">=</span><span class="p">[</span><span class="nb">str</span><span class="p">(</span><span class="n">e</span><span class="p">)]),</span> <span class="mi">400</span>
<span class="k">return</span> <span class="n">jsonify</span><span class="p">(</span><span class="n">status</span><span class="o">=</span><span class="kc">True</span><span class="p">)</span>
<span class="nd">@api</span><span class="o">.</span><span class="n">route</span><span class="p">(</span><span class="s2">&quot;/api/v0/modules/list&quot;</span><span class="p">)</span> <span class="nd">@api</span><span class="o">.</span><span class="n">route</span><span class="p">(</span><span class="s2">&quot;/api/v0/modules/list&quot;</span><span class="p">)</span>
<span class="nd">@api</span><span class="o">.</span><span class="n">route</span><span class="p">(</span><span class="s2">&quot;/api/v0/modules/list/&lt;module_names&gt;&quot;</span><span class="p">)</span> <span class="nd">@api</span><span class="o">.</span><span class="n">route</span><span class="p">(</span><span class="s2">&quot;/api/v0/modules/list/&lt;module_names&gt;&quot;</span><span class="p">)</span>
<span class="nd">@crossdomain</span><span class="p">(</span><span class="n">origin</span><span class="o">=</span><span class="s2">&quot;*&quot;</span><span class="p">)</span> <span class="nd">@crossdomain</span><span class="p">(</span><span class="n">origin</span><span class="o">=</span><span class="s2">&quot;*&quot;</span><span class="p">)</span>
@ -1752,7 +1969,7 @@
<script type="text/javascript"> <script type="text/javascript">
var DOCUMENTATION_OPTIONS = { var DOCUMENTATION_OPTIONS = {
URL_ROOT:'../../../', URL_ROOT:'../../../',
VERSION:'29.1', VERSION:'29.6',
LANGUAGE:'None', LANGUAGE:'None',
COLLAPSE_INDEX:false, COLLAPSE_INDEX:false,
FILE_SUFFIX:'.html', FILE_SUFFIX:'.html',
@ -1773,9 +1990,7 @@
<script type="text/javascript"> <script type="text/javascript">
jQuery(function () { jQuery(function () {
SphinxRtdTheme.Navigation.enable(true);
SphinxRtdTheme.Navigation.enableSticky();
}); });
</script> </script>

View File

@ -8,7 +8,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>pylorax.api.workspace &mdash; Lorax 29.1 documentation</title> <title>pylorax.api.workspace &mdash; Lorax 29.6 documentation</title>
@ -57,7 +57,7 @@
<div class="version"> <div class="version">
29.1 29.6
</div> </div>
@ -288,7 +288,7 @@
<script type="text/javascript"> <script type="text/javascript">
var DOCUMENTATION_OPTIONS = { var DOCUMENTATION_OPTIONS = {
URL_ROOT:'../../../', URL_ROOT:'../../../',
VERSION:'29.1', VERSION:'29.6',
LANGUAGE:'None', LANGUAGE:'None',
COLLAPSE_INDEX:false, COLLAPSE_INDEX:false,
FILE_SUFFIX:'.html', FILE_SUFFIX:'.html',
@ -309,9 +309,7 @@
<script type="text/javascript"> <script type="text/javascript">
jQuery(function () { jQuery(function () {
SphinxRtdTheme.Navigation.enable(true);
SphinxRtdTheme.Navigation.enableSticky();
}); });
</script> </script>

View File

@ -8,7 +8,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>pylorax.base &mdash; Lorax 29.1 documentation</title> <title>pylorax.base &mdash; Lorax 29.6 documentation</title>
@ -57,7 +57,7 @@
<div class="version"> <div class="version">
29.1 29.6
</div> </div>
@ -256,7 +256,7 @@
<script type="text/javascript"> <script type="text/javascript">
var DOCUMENTATION_OPTIONS = { var DOCUMENTATION_OPTIONS = {
URL_ROOT:'../../', URL_ROOT:'../../',
VERSION:'29.1', VERSION:'29.6',
LANGUAGE:'None', LANGUAGE:'None',
COLLAPSE_INDEX:false, COLLAPSE_INDEX:false,
FILE_SUFFIX:'.html', FILE_SUFFIX:'.html',
@ -277,9 +277,7 @@
<script type="text/javascript"> <script type="text/javascript">
jQuery(function () { jQuery(function () {
SphinxRtdTheme.Navigation.enable(true);
SphinxRtdTheme.Navigation.enableSticky();
}); });
</script> </script>

View File

@ -8,7 +8,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>pylorax.buildstamp &mdash; Lorax 29.1 documentation</title> <title>pylorax.buildstamp &mdash; Lorax 29.6 documentation</title>
@ -57,7 +57,7 @@
<div class="version"> <div class="version">
29.1 29.6
</div> </div>
@ -250,7 +250,7 @@
<script type="text/javascript"> <script type="text/javascript">
var DOCUMENTATION_OPTIONS = { var DOCUMENTATION_OPTIONS = {
URL_ROOT:'../../', URL_ROOT:'../../',
VERSION:'29.1', VERSION:'29.6',
LANGUAGE:'None', LANGUAGE:'None',
COLLAPSE_INDEX:false, COLLAPSE_INDEX:false,
FILE_SUFFIX:'.html', FILE_SUFFIX:'.html',
@ -271,9 +271,7 @@
<script type="text/javascript"> <script type="text/javascript">
jQuery(function () { jQuery(function () {
SphinxRtdTheme.Navigation.enable(true);
SphinxRtdTheme.Navigation.enableSticky();
}); });
</script> </script>

View File

@ -8,7 +8,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>pylorax.cmdline &mdash; Lorax 29.1 documentation</title> <title>pylorax.cmdline &mdash; Lorax 29.6 documentation</title>
@ -57,7 +57,7 @@
<div class="version"> <div class="version">
29.1 29.6
</div> </div>
@ -483,7 +483,7 @@
<script type="text/javascript"> <script type="text/javascript">
var DOCUMENTATION_OPTIONS = { var DOCUMENTATION_OPTIONS = {
URL_ROOT:'../../', URL_ROOT:'../../',
VERSION:'29.1', VERSION:'29.6',
LANGUAGE:'None', LANGUAGE:'None',
COLLAPSE_INDEX:false, COLLAPSE_INDEX:false,
FILE_SUFFIX:'.html', FILE_SUFFIX:'.html',
@ -504,9 +504,7 @@
<script type="text/javascript"> <script type="text/javascript">
jQuery(function () { jQuery(function () {
SphinxRtdTheme.Navigation.enable(true);
SphinxRtdTheme.Navigation.enableSticky();
}); });
</script> </script>

View File

@ -8,7 +8,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>pylorax.creator &mdash; Lorax 29.1 documentation</title> <title>pylorax.creator &mdash; Lorax 29.6 documentation</title>
@ -57,7 +57,7 @@
<div class="version"> <div class="version">
29.1 29.6
</div> </div>
@ -903,7 +903,7 @@
<script type="text/javascript"> <script type="text/javascript">
var DOCUMENTATION_OPTIONS = { var DOCUMENTATION_OPTIONS = {
URL_ROOT:'../../', URL_ROOT:'../../',
VERSION:'29.1', VERSION:'29.6',
LANGUAGE:'None', LANGUAGE:'None',
COLLAPSE_INDEX:false, COLLAPSE_INDEX:false,
FILE_SUFFIX:'.html', FILE_SUFFIX:'.html',
@ -924,9 +924,7 @@
<script type="text/javascript"> <script type="text/javascript">
jQuery(function () { jQuery(function () {
SphinxRtdTheme.Navigation.enable(true);
SphinxRtdTheme.Navigation.enableSticky();
}); });
</script> </script>

View File

@ -8,7 +8,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>pylorax.decorators &mdash; Lorax 29.1 documentation</title> <title>pylorax.decorators &mdash; Lorax 29.6 documentation</title>
@ -57,7 +57,7 @@
<div class="version"> <div class="version">
29.1 29.6
</div> </div>
@ -219,7 +219,7 @@
<script type="text/javascript"> <script type="text/javascript">
var DOCUMENTATION_OPTIONS = { var DOCUMENTATION_OPTIONS = {
URL_ROOT:'../../', URL_ROOT:'../../',
VERSION:'29.1', VERSION:'29.6',
LANGUAGE:'None', LANGUAGE:'None',
COLLAPSE_INDEX:false, COLLAPSE_INDEX:false,
FILE_SUFFIX:'.html', FILE_SUFFIX:'.html',
@ -240,9 +240,7 @@
<script type="text/javascript"> <script type="text/javascript">
jQuery(function () { jQuery(function () {
SphinxRtdTheme.Navigation.enable(true);
SphinxRtdTheme.Navigation.enableSticky();
}); });
</script> </script>

View File

@ -8,7 +8,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>pylorax.discinfo &mdash; Lorax 29.1 documentation</title> <title>pylorax.discinfo &mdash; Lorax 29.6 documentation</title>
@ -57,7 +57,7 @@
<div class="version"> <div class="version">
29.1 29.6
</div> </div>
@ -228,7 +228,7 @@
<script type="text/javascript"> <script type="text/javascript">
var DOCUMENTATION_OPTIONS = { var DOCUMENTATION_OPTIONS = {
URL_ROOT:'../../', URL_ROOT:'../../',
VERSION:'29.1', VERSION:'29.6',
LANGUAGE:'None', LANGUAGE:'None',
COLLAPSE_INDEX:false, COLLAPSE_INDEX:false,
FILE_SUFFIX:'.html', FILE_SUFFIX:'.html',
@ -249,9 +249,7 @@
<script type="text/javascript"> <script type="text/javascript">
jQuery(function () { jQuery(function () {
SphinxRtdTheme.Navigation.enable(true);
SphinxRtdTheme.Navigation.enableSticky();
}); });
</script> </script>

View File

@ -8,7 +8,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>pylorax.dnfhelper &mdash; Lorax 29.1 documentation</title> <title>pylorax.dnfhelper &mdash; Lorax 29.6 documentation</title>
@ -57,7 +57,7 @@
<div class="version"> <div class="version">
29.1 29.6
</div> </div>
@ -298,7 +298,7 @@
<script type="text/javascript"> <script type="text/javascript">
var DOCUMENTATION_OPTIONS = { var DOCUMENTATION_OPTIONS = {
URL_ROOT:'../../', URL_ROOT:'../../',
VERSION:'29.1', VERSION:'29.6',
LANGUAGE:'None', LANGUAGE:'None',
COLLAPSE_INDEX:false, COLLAPSE_INDEX:false,
FILE_SUFFIX:'.html', FILE_SUFFIX:'.html',
@ -319,9 +319,7 @@
<script type="text/javascript"> <script type="text/javascript">
jQuery(function () { jQuery(function () {
SphinxRtdTheme.Navigation.enable(true);
SphinxRtdTheme.Navigation.enableSticky();
}); });
</script> </script>

View File

@ -8,7 +8,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>pylorax.executils &mdash; Lorax 29.1 documentation</title> <title>pylorax.executils &mdash; Lorax 29.6 documentation</title>
@ -57,7 +57,7 @@
<div class="version"> <div class="version">
29.1 29.6
</div> </div>
@ -536,7 +536,7 @@
<script type="text/javascript"> <script type="text/javascript">
var DOCUMENTATION_OPTIONS = { var DOCUMENTATION_OPTIONS = {
URL_ROOT:'../../', URL_ROOT:'../../',
VERSION:'29.1', VERSION:'29.6',
LANGUAGE:'None', LANGUAGE:'None',
COLLAPSE_INDEX:false, COLLAPSE_INDEX:false,
FILE_SUFFIX:'.html', FILE_SUFFIX:'.html',
@ -557,9 +557,7 @@
<script type="text/javascript"> <script type="text/javascript">
jQuery(function () { jQuery(function () {
SphinxRtdTheme.Navigation.enable(true);
SphinxRtdTheme.Navigation.enableSticky();
}); });
</script> </script>

View File

@ -8,7 +8,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>pylorax.imgutils &mdash; Lorax 29.1 documentation</title> <title>pylorax.imgutils &mdash; Lorax 29.6 documentation</title>
@ -57,7 +57,7 @@
<div class="version"> <div class="version">
29.1 29.6
</div> </div>
@ -708,7 +708,7 @@
<script type="text/javascript"> <script type="text/javascript">
var DOCUMENTATION_OPTIONS = { var DOCUMENTATION_OPTIONS = {
URL_ROOT:'../../', URL_ROOT:'../../',
VERSION:'29.1', VERSION:'29.6',
LANGUAGE:'None', LANGUAGE:'None',
COLLAPSE_INDEX:false, COLLAPSE_INDEX:false,
FILE_SUFFIX:'.html', FILE_SUFFIX:'.html',
@ -729,9 +729,7 @@
<script type="text/javascript"> <script type="text/javascript">
jQuery(function () { jQuery(function () {
SphinxRtdTheme.Navigation.enable(true);
SphinxRtdTheme.Navigation.enableSticky();
}); });
</script> </script>

View File

@ -8,7 +8,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>pylorax.installer &mdash; Lorax 29.1 documentation</title> <title>pylorax.installer &mdash; Lorax 29.6 documentation</title>
@ -57,7 +57,7 @@
<div class="version"> <div class="version">
29.1 29.6
</div> </div>
@ -792,7 +792,7 @@
<script type="text/javascript"> <script type="text/javascript">
var DOCUMENTATION_OPTIONS = { var DOCUMENTATION_OPTIONS = {
URL_ROOT:'../../', URL_ROOT:'../../',
VERSION:'29.1', VERSION:'29.6',
LANGUAGE:'None', LANGUAGE:'None',
COLLAPSE_INDEX:false, COLLAPSE_INDEX:false,
FILE_SUFFIX:'.html', FILE_SUFFIX:'.html',
@ -813,9 +813,7 @@
<script type="text/javascript"> <script type="text/javascript">
jQuery(function () { jQuery(function () {
SphinxRtdTheme.Navigation.enable(true);
SphinxRtdTheme.Navigation.enableSticky();
}); });
</script> </script>

View File

@ -8,7 +8,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>pylorax.ltmpl &mdash; Lorax 29.1 documentation</title> <title>pylorax.ltmpl &mdash; Lorax 29.6 documentation</title>
@ -57,7 +57,7 @@
<div class="version"> <div class="version">
29.1 29.6
</div> </div>
@ -286,7 +286,7 @@
<span class="sd"> * Parsing and execution are *separate* passes - so you can&#39;t use the result</span> <span class="sd"> * Parsing and execution are *separate* passes - so you can&#39;t use the result</span>
<span class="sd"> of a command in an %if statement (or any other control statements)!</span> <span class="sd"> of a command in an %if statement (or any other control statements)!</span>
<span class="sd"> * Commands that run external programs (systemctl, gconfset) currently use</span> <span class="sd"> * Commands that run external programs (e.g. systemctl) currently use</span>
<span class="sd"> the *host*&#39;s copy of that program, which may cause problems if there&#39;s a</span> <span class="sd"> the *host*&#39;s copy of that program, which may cause problems if there&#39;s a</span>
<span class="sd"> big enough difference between the host and the image you&#39;re modifying.</span> <span class="sd"> big enough difference between the host and the image you&#39;re modifying.</span>
@ -616,22 +616,6 @@
<span class="k">for</span> <span class="n">f</span> <span class="ow">in</span> <span class="n">rglob</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">_out</span><span class="p">(</span><span class="n">fileglob</span><span class="p">),</span> <span class="n">fatal</span><span class="o">=</span><span class="kc">True</span><span class="p">):</span> <span class="k">for</span> <span class="n">f</span> <span class="ow">in</span> <span class="n">rglob</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">_out</span><span class="p">(</span><span class="n">fileglob</span><span class="p">),</span> <span class="n">fatal</span><span class="o">=</span><span class="kc">True</span><span class="p">):</span>
<span class="n">os</span><span class="o">.</span><span class="n">chmod</span><span class="p">(</span><span class="n">f</span><span class="p">,</span> <span class="nb">int</span><span class="p">(</span><span class="n">mode</span><span class="p">,</span><span class="mi">8</span><span class="p">))</span></div> <span class="n">os</span><span class="o">.</span><span class="n">chmod</span><span class="p">(</span><span class="n">f</span><span class="p">,</span> <span class="nb">int</span><span class="p">(</span><span class="n">mode</span><span class="p">,</span><span class="mi">8</span><span class="p">))</span></div>
<span class="c1"># TODO: do we need a new command for gsettings?</span>
<div class="viewcode-block" id="LoraxTemplateRunner.gconfset"><a class="viewcode-back" href="../../pylorax.html#pylorax.ltmpl.LoraxTemplateRunner.gconfset">[docs]</a> <span class="k">def</span> <span class="nf">gconfset</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">path</span><span class="p">,</span> <span class="n">keytype</span><span class="p">,</span> <span class="n">value</span><span class="p">,</span> <span class="n">outfile</span><span class="o">=</span><span class="kc">None</span><span class="p">):</span>
<span class="sd">&#39;&#39;&#39;</span>
<span class="sd"> gconfset PATH KEYTYPE VALUE [OUTFILE]</span>
<span class="sd"> Set the given gconf PATH, with type KEYTYPE, to the given value.</span>
<span class="sd"> OUTFILE defaults to /etc/gconf/gconf.xml.defaults if not given.</span>
<span class="sd"> Example:</span>
<span class="sd"> gconfset /apps/metacity/general/num_workspaces int 1</span>
<span class="sd"> &#39;&#39;&#39;</span>
<span class="k">if</span> <span class="n">outfile</span> <span class="ow">is</span> <span class="kc">None</span><span class="p">:</span>
<span class="n">outfile</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_out</span><span class="p">(</span><span class="s2">&quot;etc/gconf/gconf.xml.defaults&quot;</span><span class="p">)</span>
<span class="n">cmd</span> <span class="o">=</span> <span class="p">[</span><span class="s2">&quot;gconftool-2&quot;</span><span class="p">,</span> <span class="s2">&quot;--direct&quot;</span><span class="p">,</span>
<span class="s2">&quot;--config-source=xml:readwrite:</span><span class="si">%s</span><span class="s2">&quot;</span> <span class="o">%</span> <span class="n">outfile</span><span class="p">,</span>
<span class="s2">&quot;--set&quot;</span><span class="p">,</span> <span class="s2">&quot;--type&quot;</span><span class="p">,</span> <span class="n">keytype</span><span class="p">,</span> <span class="n">path</span><span class="p">,</span> <span class="n">value</span><span class="p">]</span>
<span class="n">runcmd</span><span class="p">(</span><span class="n">cmd</span><span class="p">)</span></div>
<div class="viewcode-block" id="LoraxTemplateRunner.log"><a class="viewcode-back" href="../../pylorax.html#pylorax.ltmpl.LoraxTemplateRunner.log">[docs]</a> <span class="k">def</span> <span class="nf">log</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">msg</span><span class="p">):</span> <div class="viewcode-block" id="LoraxTemplateRunner.log"><a class="viewcode-back" href="../../pylorax.html#pylorax.ltmpl.LoraxTemplateRunner.log">[docs]</a> <span class="k">def</span> <span class="nf">log</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">msg</span><span class="p">):</span>
<span class="sd">&#39;&#39;&#39;</span> <span class="sd">&#39;&#39;&#39;</span>
<span class="sd"> log MESSAGE</span> <span class="sd"> log MESSAGE</span>
@ -976,7 +960,7 @@
<script type="text/javascript"> <script type="text/javascript">
var DOCUMENTATION_OPTIONS = { var DOCUMENTATION_OPTIONS = {
URL_ROOT:'../../', URL_ROOT:'../../',
VERSION:'29.1', VERSION:'29.6',
LANGUAGE:'None', LANGUAGE:'None',
COLLAPSE_INDEX:false, COLLAPSE_INDEX:false,
FILE_SUFFIX:'.html', FILE_SUFFIX:'.html',
@ -997,9 +981,7 @@
<script type="text/javascript"> <script type="text/javascript">
jQuery(function () { jQuery(function () {
SphinxRtdTheme.Navigation.enable(true);
SphinxRtdTheme.Navigation.enableSticky();
}); });
</script> </script>

View File

@ -8,7 +8,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>pylorax.monitor &mdash; Lorax 29.1 documentation</title> <title>pylorax.monitor &mdash; Lorax 29.6 documentation</title>
@ -57,7 +57,7 @@
<div class="version"> <div class="version">
29.1 29.6
</div> </div>
@ -384,7 +384,7 @@
<script type="text/javascript"> <script type="text/javascript">
var DOCUMENTATION_OPTIONS = { var DOCUMENTATION_OPTIONS = {
URL_ROOT:'../../', URL_ROOT:'../../',
VERSION:'29.1', VERSION:'29.6',
LANGUAGE:'None', LANGUAGE:'None',
COLLAPSE_INDEX:false, COLLAPSE_INDEX:false,
FILE_SUFFIX:'.html', FILE_SUFFIX:'.html',
@ -405,9 +405,7 @@
<script type="text/javascript"> <script type="text/javascript">
jQuery(function () { jQuery(function () {
SphinxRtdTheme.Navigation.enable(true);
SphinxRtdTheme.Navigation.enableSticky();
}); });
</script> </script>

View File

@ -8,7 +8,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>pylorax.mount &mdash; Lorax 29.1 documentation</title> <title>pylorax.mount &mdash; Lorax 29.6 documentation</title>
@ -57,7 +57,7 @@
<div class="version"> <div class="version">
29.1 29.6
</div> </div>
@ -291,7 +291,7 @@
<script type="text/javascript"> <script type="text/javascript">
var DOCUMENTATION_OPTIONS = { var DOCUMENTATION_OPTIONS = {
URL_ROOT:'../../', URL_ROOT:'../../',
VERSION:'29.1', VERSION:'29.6',
LANGUAGE:'None', LANGUAGE:'None',
COLLAPSE_INDEX:false, COLLAPSE_INDEX:false,
FILE_SUFFIX:'.html', FILE_SUFFIX:'.html',
@ -312,9 +312,7 @@
<script type="text/javascript"> <script type="text/javascript">
jQuery(function () { jQuery(function () {
SphinxRtdTheme.Navigation.enable(true);
SphinxRtdTheme.Navigation.enableSticky();
}); });
</script> </script>

View File

@ -8,7 +8,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>pylorax.sysutils &mdash; Lorax 29.1 documentation</title> <title>pylorax.sysutils &mdash; Lorax 29.6 documentation</title>
@ -57,7 +57,7 @@
<div class="version"> <div class="version">
29.1 29.6
</div> </div>
@ -297,7 +297,7 @@
<script type="text/javascript"> <script type="text/javascript">
var DOCUMENTATION_OPTIONS = { var DOCUMENTATION_OPTIONS = {
URL_ROOT:'../../', URL_ROOT:'../../',
VERSION:'29.1', VERSION:'29.6',
LANGUAGE:'None', LANGUAGE:'None',
COLLAPSE_INDEX:false, COLLAPSE_INDEX:false,
FILE_SUFFIX:'.html', FILE_SUFFIX:'.html',
@ -318,9 +318,7 @@
<script type="text/javascript"> <script type="text/javascript">
jQuery(function () { jQuery(function () {
SphinxRtdTheme.Navigation.enable(true);
SphinxRtdTheme.Navigation.enableSticky();
}); });
</script> </script>

View File

@ -8,7 +8,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>pylorax.treebuilder &mdash; Lorax 29.1 documentation</title> <title>pylorax.treebuilder &mdash; Lorax 29.6 documentation</title>
@ -57,7 +57,7 @@
<div class="version"> <div class="version">
29.1 29.6
</div> </div>
@ -589,7 +589,7 @@
<script type="text/javascript"> <script type="text/javascript">
var DOCUMENTATION_OPTIONS = { var DOCUMENTATION_OPTIONS = {
URL_ROOT:'../../', URL_ROOT:'../../',
VERSION:'29.1', VERSION:'29.6',
LANGUAGE:'None', LANGUAGE:'None',
COLLAPSE_INDEX:false, COLLAPSE_INDEX:false,
FILE_SUFFIX:'.html', FILE_SUFFIX:'.html',
@ -610,9 +610,7 @@
<script type="text/javascript"> <script type="text/javascript">
jQuery(function () { jQuery(function () {
SphinxRtdTheme.Navigation.enable(true);
SphinxRtdTheme.Navigation.enableSticky();
}); });
</script> </script>

View File

@ -8,7 +8,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>pylorax.treeinfo &mdash; Lorax 29.1 documentation</title> <title>pylorax.treeinfo &mdash; Lorax 29.6 documentation</title>
@ -57,7 +57,7 @@
<div class="version"> <div class="version">
29.1 29.6
</div> </div>
@ -246,7 +246,7 @@
<script type="text/javascript"> <script type="text/javascript">
var DOCUMENTATION_OPTIONS = { var DOCUMENTATION_OPTIONS = {
URL_ROOT:'../../', URL_ROOT:'../../',
VERSION:'29.1', VERSION:'29.6',
LANGUAGE:'None', LANGUAGE:'None',
COLLAPSE_INDEX:false, COLLAPSE_INDEX:false,
FILE_SUFFIX:'.html', FILE_SUFFIX:'.html',
@ -267,9 +267,7 @@
<script type="text/javascript"> <script type="text/javascript">
jQuery(function () { jQuery(function () {
SphinxRtdTheme.Navigation.enable(true);
SphinxRtdTheme.Navigation.enableSticky();
}); });
</script> </script>

View File

@ -44,6 +44,14 @@ composer.cli.projects module
:undoc-members: :undoc-members:
:show-inheritance: :show-inheritance:
composer.cli.sources module
---------------------------
.. automodule:: composer.cli.sources
:members:
:undoc-members:
:show-inheritance:
composer.cli.utilities module composer.cli.utilities module
----------------------------- -----------------------------

View File

@ -23,7 +23,7 @@ Documentation for other Lorax Branches
====================================== ======================================
* `Fedora 28 <f28-branch/>`_ * `Fedora 28 <f28-branch/>`_
* `lorax-composer <lorax-composer/>`_ * `RHEL7 lorax-composer <lorax-composer/>`_
Indices and tables Indices and tables
================== ==================

View File

@ -160,10 +160,20 @@ changes. Here are the steps I used to convert the Fedora XFCE spin.
dracut-config-generic dracut-config-generic
dracut-live dracut-live
-dracut-config-rescue -dracut-config-rescue
grub-efi grub2-efi
memtest86+ memtest86+
syslinux syslinux
User created repositories
~~~~~~~~~~~~~~~~~~~~~~~~~
If you are using your own repositories and installing groups (eg. @core) make
sure you create the repodata with groups like this ``createrepo -g
/path/to/groups.xml /path/to/rpms``
Using a Proxy with repos
~~~~~~~~~~~~~~~~~~~~~~~~
One drawback to using qemu is that it pulls the packages from the repo each One drawback to using qemu is that it pulls the packages from the repo each
time you run it. To speed things up you either need a local mirror of the time you run it. To speed things up you either need a local mirror of the
packages, or you can use a caching proxy. When using a proxy you pass it to packages, or you can use a caching proxy. When using a proxy you pass it to
@ -177,7 +187,13 @@ packages will get cached, so your kickstart url would look like:
``url --url="http://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/x86_64/os/"`` ``url --url="http://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/x86_64/os/"``
You can also add an update repo, but don't name it updates. Add --proxy to it You can also add an update repo, but don't name it updates. Add --proxy to it
as well. as well. You can use all of the `kickstart commands <https://pykickstart.readthedocs.io/en/latest/kickstart-docs.html#chapter-2-kickstart-commands-in-fedora>`_ in your kickstart. Make sure there
is only one ``url`` command, other repos have to use the ``repo`` command and cannot be
named ``updates`` which is reserved for Anaconda's use. eg.::
url --url=PRIMARY-REPO-URL --proxy=PROXY-URL
repo --name="repo1" --baseurl=FIRST-REPO-URL --proxy=PROXY-URL
repo --name="repo2" --baseurl=SECOND-REPO_URL --proxy=PROXY-URL
Anaconda image install (no-virt) Anaconda image install (no-virt)
@ -602,6 +618,16 @@ When creating a new kickstart it is helpful to use vnc so that you can monitor
the installation as it happens, and if it gets stuck without lmc detecting the the installation as it happens, and if it gets stuck without lmc detecting the
problem you can switch to tty1 and examine the system directly. problem you can switch to tty1 and examine the system directly.
If you suspect problems with %pre or %post sections you can redirect the output
to the terminal and examine it by logging into the VM. eg.::
%pre
chvt
exec < /dev/tty3 > /dev/tty3 2>/dev/tty3
#do stuff
echo hello world
%end
If it does get stuck the best way to cancel is to use kill -9 on the qemu pid, If it does get stuck the best way to cancel is to use kill -9 on the qemu pid,
lmc will detect that the process died and cleanup. lmc will detect that the process died and cleanup.

View File

@ -19,9 +19,10 @@ Installation
The best way to install ``lorax-composer`` is to use ``sudo dnf install The best way to install ``lorax-composer`` is to use ``sudo dnf install
lorax-composer composer-cli``, this will setup the weldr user and install the lorax-composer composer-cli``, this will setup the weldr user and install the
systemd socket activation service. You will then need to enable it with ``sudo systemd socket activation service. You will then need to enable it with ``sudo
systemctl enable lorax-composer.socket``. This will leave the server off until systemctl enable lorax-composer.socket && sudo systemctl start
the first request is made. Systemd will then launch the server and it will lorax-composer.socket``. This will leave the server off until the first request
remain running until the system is rebooted. is made. Systemd will then launch the server and it will remain running until
the system is rebooted.
Quickstart Quickstart
---------- ----------
@ -29,8 +30,9 @@ Quickstart
1. Create a ``weldr`` user and group by running ``useradd weldr`` 1. Create a ``weldr`` user and group by running ``useradd weldr``
2. Remove any pre-existing socket directory with ``rm -rf /run/weldr/`` 2. Remove any pre-existing socket directory with ``rm -rf /run/weldr/``
A new directory with correct permissions will be created the first time the server runs. A new directory with correct permissions will be created the first time the server runs.
3. Enable the socket activation with ``systemctl enable lorax-composer.socket`` or 3. Enable the socket activation with ``systemctl enable lorax-composer.socket
run it directly with ``lorax-composer /path/to/blueprints/`` && sudo systemctl start lorax-composer.socket`` or run it directly with
``lorax-composer /path/to/blueprints/``
The ``/path/to/blueprints/`` directory is where the blueprints' git repo will The ``/path/to/blueprints/`` directory is where the blueprints' git repo will
be created, and all the blueprints created with the ``/api/v0/blueprints/new`` be created, and all the blueprints created with the ``/api/v0/blueprints/new``
@ -233,3 +235,55 @@ the results directory, or it could do some post-processing on it. The end of
the function should always clean up the ``./compose/`` directory, removing any the function should always clean up the ``./compose/`` directory, removing any
unneeded extra files. This is especially true for the ``live-iso`` since it produces unneeded extra files. This is especially true for the ``live-iso`` since it produces
the contents of the iso as well as the boot.iso itself. the contents of the iso as well as the boot.iso itself.
Package Sources
---------------
By default lorax-composer uses the host's configured repositories. It copies
the ``*.repo`` files from ``/etc/yum.repos.d/`` into
``/var/lib/lorax/composer/repos.d/`` at startup, these are immutable system
repositories and cannot be deleted or changed. If you want to add additional
repos you can put them into ``/var/lib/lorax/composer/repos.d/`` or use the
``/api/v0/projects/source/*`` API routes to create them.
The new source can be added by doing a POST to the ``/api/v0/projects/source/new``
route using JSON (with `Content-Type` header set to `application/json`) or TOML
(with it set to `text/x-toml`). The format of the source looks like this (in
TOML)::
name = "custom-source-1"
url = "https://url/path/to/repository/"
type = "yum-baseurl"
proxy = "https://proxy-url/"
check_ssl = true
check_gpg = true
gpgkey_urls = ["https://url/path/to/gpg-key"]
The ``proxy`` and ``gpgkey_urls`` entries are optional. All of the others are required. The supported
types for the urls are:
* ``yum-baseurl`` is a URL to a yum repository.
* ``yum-mirrorlist`` is a URL for a mirrorlist.
* ``yum-metalink`` is a URL for a metalink.
If ``check_ssl`` is true the https certificates must be valid. If they are self-signed you can either set
this to false, or add your Certificate Authority to the host system.
If ``check_gpg`` is true the GPG key must either be installed on the host system, or ``gpgkey_urls``
should point to it.
You can edit an existing source (other than system sources), by doing a POST to the ``new`` route
with the new version of the source. It will overwrite the previous one.
A list of existing sources is available from ``/api/v0/projects/source/list``, and detailed info
on a source can be retrieved with the ``/api/v0/projects/source/info/<source-name>`` route. By default
it returns JSON but it can also return TOML if ``?format=toml`` is added to the request.
Non-system sources can be deleted by doing a ``DELETE`` request to the
``/api/v0/projects/source/delete/<source-name>`` route.
The documentation for the source API routes can be `found here <pylorax.api.html#api-v0-projects-source-list>`_
The configured sources are used for all blueprint depsolve operations, and for composing images.
When adding additional sources you must make sure that the packages in the source do not
conflict with any other package sources, otherwise depsolving will fail.

View File

@ -92,7 +92,6 @@ installation. A number of template commands are used here:
* :func:`append <pylorax.ltmpl.LoraxTemplateRunner.append>` to add text to a file. * :func:`append <pylorax.ltmpl.LoraxTemplateRunner.append>` to add text to a file.
* :func:`chmod <pylorax.ltmpl.LoraxTemplateRunner.chmod>` changes the file's mode. * :func:`chmod <pylorax.ltmpl.LoraxTemplateRunner.chmod>` changes the file's mode.
* :func:`gconfset <pylorax.ltmpl.LoraxTemplateRunner.gconfset>` runs gconfset.
* :func:`install <pylorax.ltmpl.LoraxTemplateRunner.install>` to install a file into the installroot. * :func:`install <pylorax.ltmpl.LoraxTemplateRunner.install>` to install a file into the installroot.
* :func:`mkdir <pylorax.ltmpl.LoraxTemplateRunner.mkdir>` makes a new directory. * :func:`mkdir <pylorax.ltmpl.LoraxTemplateRunner.mkdir>` makes a new directory.
* :func:`move <pylorax.ltmpl.LoraxTemplateRunner.move>` to move a file into the installroot * :func:`move <pylorax.ltmpl.LoraxTemplateRunner.move>` to move a file into the installroot

View File

@ -1 +1 @@
.fa:before{-webkit-font-smoothing:antialiased}.clearfix{*zoom:1}.clearfix:before,.clearfix:after{display:table;content:""}.clearfix:after{clear:both}@font-face{font-family:FontAwesome;font-weight:normal;font-style:normal;src:url("../fonts/fontawesome-webfont.eot");src:url("../fonts/fontawesome-webfont.eot?#iefix") format("embedded-opentype"),url("../fonts/fontawesome-webfont.woff") format("woff"),url("../fonts/fontawesome-webfont.ttf") format("truetype"),url("../fonts/fontawesome-webfont.svg#FontAwesome") format("svg")}.fa:before{display:inline-block;font-family:FontAwesome;font-style:normal;font-weight:normal;line-height:1;text-decoration:inherit}a .fa{display:inline-block;text-decoration:inherit}li .fa{display:inline-block}li .fa-large:before,li .fa-large:before{width:1.875em}ul.fas{list-style-type:none;margin-left:2em;text-indent:-0.8em}ul.fas li .fa{width:.8em}ul.fas li .fa-large:before,ul.fas li .fa-large:before{vertical-align:baseline}.fa-book:before{content:""}.icon-book:before{content:""}.fa-caret-down:before{content:""}.icon-caret-down:before{content:""}.fa-caret-up:before{content:""}.icon-caret-up:before{content:""}.fa-caret-left:before{content:""}.icon-caret-left:before{content:""}.fa-caret-right:before{content:""}.icon-caret-right:before{content:""}.rst-versions{position:fixed;bottom:0;left:0;overflow-y:scroll;width:300px;color:#fcfcfc;background:#1f1d1d;font-family:"Lato","proxima-nova","Helvetica Neue",Arial,sans-serif;z-index:400}.rst-versions a{color:#2980B9;text-decoration:none}.rst-versions .rst-badge-small{display:none}.rst-versions .rst-current-version{padding:12px;background-color:#272525;display:block;text-align:right;font-size:90%;cursor:pointer;color:#27AE60;*zoom:1}.rst-versions .rst-current-version:before,.rst-versions .rst-current-version:after{display:table;content:""}.rst-versions .rst-current-version:after{clear:both}.rst-versions .rst-current-version .fa{color:#fcfcfc}.rst-versions .rst-current-version .fa-book{float:left}.rst-versions .rst-current-version .icon-book{float:left}.rst-versions .rst-current-version.rst-out-of-date{background-color:#E74C3C;color:#fff}.rst-versions .rst-current-version.rst-active-old-version{background-color:#F1C40F;color:#000}.rst-versions.shift-up{max-height:100%}.rst-versions.shift-up .rst-other-versions{display:block}.rst-versions .rst-other-versions{font-size:90%;padding:12px;color:gray;display:none}.rst-versions .rst-other-versions hr{display:block;height:1px;border:0;margin:20px 0;padding:0;border-top:solid 1px #413d3d}.rst-versions .rst-other-versions dd{display:inline-block;margin:0}.rst-versions .rst-other-versions dd a{display:inline-block;padding:6px;color:#fcfcfc}.rst-versions.rst-badge{width:auto;bottom:20px;right:20px;left:auto;border:none;max-width:300px}.rst-versions.rst-badge .icon-book{float:none}.rst-versions.rst-badge .fa-book{float:none}.rst-versions.rst-badge.shift-up .rst-current-version{text-align:right}.rst-versions.rst-badge.shift-up .rst-current-version .fa-book{float:left}.rst-versions.rst-badge.shift-up .rst-current-version .icon-book{float:left}.rst-versions.rst-badge .rst-current-version{width:auto;height:30px;line-height:30px;padding:0 6px;display:block;text-align:center}@media screen and (max-width: 768px){.rst-versions{width:85%;display:none}.rst-versions.shift{display:block}} .fa:before{-webkit-font-smoothing:antialiased}.clearfix{*zoom:1}.clearfix:before,.clearfix:after{display:table;content:""}.clearfix:after{clear:both}@font-face{font-family:FontAwesome;font-weight:normal;font-style:normal;src:url("../fonts/fontawesome-webfont.eot");src:url("../fonts/fontawesome-webfont.eot?#iefix") format("embedded-opentype"),url("../fonts/fontawesome-webfont.woff") format("woff"),url("../fonts/fontawesome-webfont.ttf") format("truetype"),url("../fonts/fontawesome-webfont.svg#FontAwesome") format("svg")}.fa:before{display:inline-block;font-family:FontAwesome;font-style:normal;font-weight:normal;line-height:1;text-decoration:inherit}a .fa{display:inline-block;text-decoration:inherit}li .fa{display:inline-block}li .fa-large:before,li .fa-large:before{width:1.875em}ul.fas{list-style-type:none;margin-left:2em;text-indent:-0.8em}ul.fas li .fa{width:.8em}ul.fas li .fa-large:before,ul.fas li .fa-large:before{vertical-align:baseline}.fa-book:before{content:""}.icon-book:before{content:""}.fa-caret-down:before{content:""}.icon-caret-down:before{content:""}.fa-caret-up:before{content:""}.icon-caret-up:before{content:""}.fa-caret-left:before{content:""}.icon-caret-left:before{content:""}.fa-caret-right:before{content:""}.icon-caret-right:before{content:""}.rst-versions{position:fixed;bottom:0;left:0;width:300px;color:#fcfcfc;background:#1f1d1d;font-family:"Lato","proxima-nova","Helvetica Neue",Arial,sans-serif;z-index:400}.rst-versions a{color:#2980B9;text-decoration:none}.rst-versions .rst-badge-small{display:none}.rst-versions .rst-current-version{padding:12px;background-color:#272525;display:block;text-align:right;font-size:90%;cursor:pointer;color:#27AE60;*zoom:1}.rst-versions .rst-current-version:before,.rst-versions .rst-current-version:after{display:table;content:""}.rst-versions .rst-current-version:after{clear:both}.rst-versions .rst-current-version .fa{color:#fcfcfc}.rst-versions .rst-current-version .fa-book{float:left}.rst-versions .rst-current-version .icon-book{float:left}.rst-versions .rst-current-version.rst-out-of-date{background-color:#E74C3C;color:#fff}.rst-versions .rst-current-version.rst-active-old-version{background-color:#F1C40F;color:#000}.rst-versions.shift-up{height:auto;max-height:100%}.rst-versions.shift-up .rst-other-versions{display:block}.rst-versions .rst-other-versions{font-size:90%;padding:12px;color:gray;display:none}.rst-versions .rst-other-versions hr{display:block;height:1px;border:0;margin:20px 0;padding:0;border-top:solid 1px #413d3d}.rst-versions .rst-other-versions dd{display:inline-block;margin:0}.rst-versions .rst-other-versions dd a{display:inline-block;padding:6px;color:#fcfcfc}.rst-versions.rst-badge{width:auto;bottom:20px;right:20px;left:auto;border:none;max-width:300px}.rst-versions.rst-badge .icon-book{float:none}.rst-versions.rst-badge .fa-book{float:none}.rst-versions.rst-badge.shift-up .rst-current-version{text-align:right}.rst-versions.rst-badge.shift-up .rst-current-version .fa-book{float:left}.rst-versions.rst-badge.shift-up .rst-current-version .icon-book{float:left}.rst-versions.rst-badge .rst-current-version{width:auto;height:30px;line-height:30px;padding:0 6px;display:block;text-align:center}@media screen and (max-width: 768px){.rst-versions{width:85%;display:none}.rst-versions.shift{display:block}}

File diff suppressed because one or more lines are too long

View File

@ -1,6 +1,6 @@
var DOCUMENTATION_OPTIONS = { var DOCUMENTATION_OPTIONS = {
URL_ROOT: '', URL_ROOT: '',
VERSION: '29.1', VERSION: '29.6',
LANGUAGE: 'None', LANGUAGE: 'None',
COLLAPSE_INDEX: false, COLLAPSE_INDEX: false,
FILE_SUFFIX: '.html', FILE_SUFFIX: '.html',

View File

@ -1 +1 @@
require=function r(s,a,l){function c(i,n){if(!a[i]){if(!s[i]){var e="function"==typeof require&&require;if(!n&&e)return e(i,!0);if(u)return u(i,!0);var t=new Error("Cannot find module '"+i+"'");throw t.code="MODULE_NOT_FOUND",t}var o=a[i]={exports:{}};s[i][0].call(o.exports,function(n){var e=s[i][1][n];return c(e||n)},o,o.exports,r,s,a,l)}return a[i].exports}for(var u="function"==typeof require&&require,n=0;n<l.length;n++)c(l[n]);return c}({"sphinx-rtd-theme":[function(n,e,i){var jQuery="undefined"!=typeof window?window.jQuery:n("jquery");e.exports.ThemeNav={navBar:null,win:null,winScroll:!1,winResize:!1,linkScroll:!1,winPosition:0,winHeight:null,docHeight:null,isRunning:!1,enable:function(e){var i=this;i.isRunning||(i.isRunning=!0,jQuery(function(n){i.init(n),i.reset(),i.win.on("hashchange",i.reset),e&&i.win.on("scroll",function(){i.linkScroll||i.winScroll||(i.winScroll=!0,requestAnimationFrame(function(){i.onScroll()}))}),i.win.on("resize",function(){i.winResize||(i.winResize=!0,requestAnimationFrame(function(){i.onResize()}))}),i.onResize()}))},enableSticky:function(){this.enable(!0)},init:function(i){i(document);var t=this;this.navBar=i("div.wy-side-scroll:first"),this.win=i(window),i(document).on("click","[data-toggle='wy-nav-top']",function(){i("[data-toggle='wy-nav-shift']").toggleClass("shift"),i("[data-toggle='rst-versions']").toggleClass("shift")}).on("click",".wy-menu-vertical .current ul li a",function(){var n=i(this);i("[data-toggle='wy-nav-shift']").removeClass("shift"),i("[data-toggle='rst-versions']").toggleClass("shift"),t.toggleCurrent(n),t.hashChange()}).on("click","[data-toggle='rst-current-version']",function(){i("[data-toggle='rst-versions']").toggleClass("shift-up")}),i("table.docutils:not(.field-list,.footnote,.citation)").wrap("<div class='wy-table-responsive'></div>"),i("table.docutils.footnote").wrap("<div class='wy-table-responsive footnote'></div>"),i("table.docutils.citation").wrap("<div class='wy-table-responsive citation'></div>"),i(".wy-menu-vertical ul").not(".simple").siblings("a").each(function(){var e=i(this);expand=i('<span class="toctree-expand"></span>'),expand.on("click",function(n){return t.toggleCurrent(e),n.stopPropagation(),!1}),e.prepend(expand)})},reset:function(){var n=encodeURI(window.location.hash)||"#";try{var e=$(".wy-menu-vertical"),i=e.find('[href="'+n+'"]');if(0===i.length){var t=$('.document [id="'+n.substring(1)+'"]').closest("div.section");0===(i=e.find('[href="#'+t.attr("id")+'"]')).length&&(i=e.find('[href="#"]'))}0<i.length&&($(".wy-menu-vertical .current").removeClass("current"),i.addClass("current"),i.closest("li.toctree-l1").addClass("current"),i.closest("li.toctree-l1").parent().addClass("current"),i.closest("li.toctree-l1").addClass("current"),i.closest("li.toctree-l2").addClass("current"),i.closest("li.toctree-l3").addClass("current"),i.closest("li.toctree-l4").addClass("current"))}catch(o){console.log("Error expanding nav for anchor",o)}},onScroll:function(){this.winScroll=!1;var n=this.win.scrollTop(),e=n+this.winHeight,i=this.navBar.scrollTop()+(n-this.winPosition);n<0||e>this.docHeight||(this.navBar.scrollTop(i),this.winPosition=n)},onResize:function(){this.winResize=!1,this.winHeight=this.win.height(),this.docHeight=$(document).height()},hashChange:function(){this.linkScroll=!0,this.win.one("hashchange",function(){this.linkScroll=!1})},toggleCurrent:function(n){var e=n.closest("li");e.siblings("li.current").removeClass("current"),e.siblings().find("li.current").removeClass("current"),e.find("> ul li.current").removeClass("current"),e.toggleClass("current")}},"undefined"!=typeof window&&(window.SphinxRtdTheme={Navigation:e.exports.ThemeNav}),function(){for(var r=0,n=["ms","moz","webkit","o"],e=0;e<n.length&&!window.requestAnimationFrame;++e)window.requestAnimationFrame=window[n[e]+"RequestAnimationFrame"],window.cancelAnimationFrame=window[n[e]+"CancelAnimationFrame"]||window[n[e]+"CancelRequestAnimationFrame"];window.requestAnimationFrame||(window.requestAnimationFrame=function(n,e){var i=(new Date).getTime(),t=Math.max(0,16-(i-r)),o=window.setTimeout(function(){n(i+t)},t);return r=i+t,o}),window.cancelAnimationFrame||(window.cancelAnimationFrame=function(n){clearTimeout(n)})}()},{jquery:"jquery"}]},{},["sphinx-rtd-theme"]); require=function r(s,a,l){function c(i,n){if(!a[i]){if(!s[i]){var e="function"==typeof require&&require;if(!n&&e)return e(i,!0);if(u)return u(i,!0);var t=new Error("Cannot find module '"+i+"'");throw t.code="MODULE_NOT_FOUND",t}var o=a[i]={exports:{}};s[i][0].call(o.exports,function(n){var e=s[i][1][n];return c(e||n)},o,o.exports,r,s,a,l)}return a[i].exports}for(var u="function"==typeof require&&require,n=0;n<l.length;n++)c(l[n]);return c}({"sphinx-rtd-theme":[function(n,e,i){var jQuery="undefined"!=typeof window?window.jQuery:n("jquery");e.exports.ThemeNav={navBar:null,win:null,winScroll:!1,winResize:!1,linkScroll:!1,winPosition:0,winHeight:null,docHeight:null,isRunning:!1,enable:function(e){var i=this;"undefined"==typeof withStickNav&&(e=!0),i.isRunning||(i.isRunning=!0,jQuery(function(n){i.init(n),i.reset(),i.win.on("hashchange",i.reset),e&&i.win.on("scroll",function(){i.linkScroll||i.winScroll||(i.winScroll=!0,requestAnimationFrame(function(){i.onScroll()}))}),i.win.on("resize",function(){i.winResize||(i.winResize=!0,requestAnimationFrame(function(){i.onResize()}))}),i.onResize()}))},enableSticky:function(){this.enable(!0)},init:function(i){i(document);var t=this;this.navBar=i("div.wy-side-scroll:first"),this.win=i(window),i(document).on("click","[data-toggle='wy-nav-top']",function(){i("[data-toggle='wy-nav-shift']").toggleClass("shift"),i("[data-toggle='rst-versions']").toggleClass("shift")}).on("click",".wy-menu-vertical .current ul li a",function(){var n=i(this);i("[data-toggle='wy-nav-shift']").removeClass("shift"),i("[data-toggle='rst-versions']").toggleClass("shift"),t.toggleCurrent(n),t.hashChange()}).on("click","[data-toggle='rst-current-version']",function(){i("[data-toggle='rst-versions']").toggleClass("shift-up")}),i("table.docutils:not(.field-list,.footnote,.citation)").wrap("<div class='wy-table-responsive'></div>"),i("table.docutils.footnote").wrap("<div class='wy-table-responsive footnote'></div>"),i("table.docutils.citation").wrap("<div class='wy-table-responsive citation'></div>"),i(".wy-menu-vertical ul").not(".simple").siblings("a").each(function(){var e=i(this);expand=i('<span class="toctree-expand"></span>'),expand.on("click",function(n){return t.toggleCurrent(e),n.stopPropagation(),!1}),e.prepend(expand)})},reset:function(){var n=encodeURI(window.location.hash)||"#";try{var e=$(".wy-menu-vertical"),i=e.find('[href="'+n+'"]');if(0===i.length){var t=$('.document [id="'+n.substring(1)+'"]').closest("div.section");0===(i=e.find('[href="#'+t.attr("id")+'"]')).length&&(i=e.find('[href="#"]'))}0<i.length&&($(".wy-menu-vertical .current").removeClass("current"),i.addClass("current"),i.closest("li.toctree-l1").addClass("current"),i.closest("li.toctree-l1").parent().addClass("current"),i.closest("li.toctree-l1").addClass("current"),i.closest("li.toctree-l2").addClass("current"),i.closest("li.toctree-l3").addClass("current"),i.closest("li.toctree-l4").addClass("current"))}catch(o){console.log("Error expanding nav for anchor",o)}},onScroll:function(){this.winScroll=!1;var n=this.win.scrollTop(),e=n+this.winHeight,i=this.navBar.scrollTop()+(n-this.winPosition);n<0||e>this.docHeight||(this.navBar.scrollTop(i),this.winPosition=n)},onResize:function(){this.winResize=!1,this.winHeight=this.win.height(),this.docHeight=$(document).height()},hashChange:function(){this.linkScroll=!0,this.win.one("hashchange",function(){this.linkScroll=!1})},toggleCurrent:function(n){var e=n.closest("li");e.siblings("li.current").removeClass("current"),e.siblings().find("li.current").removeClass("current"),e.find("> ul li.current").removeClass("current"),e.toggleClass("current")}},"undefined"!=typeof window&&(window.SphinxRtdTheme={Navigation:e.exports.ThemeNav,StickyNav:e.exports.ThemeNav}),function(){for(var r=0,n=["ms","moz","webkit","o"],e=0;e<n.length&&!window.requestAnimationFrame;++e)window.requestAnimationFrame=window[n[e]+"RequestAnimationFrame"],window.cancelAnimationFrame=window[n[e]+"CancelAnimationFrame"]||window[n[e]+"CancelRequestAnimationFrame"];window.requestAnimationFrame||(window.requestAnimationFrame=function(n,e){var i=(new Date).getTime(),t=Math.max(0,16-(i-r)),o=window.setTimeout(function(){n(i+t)},t);return r=i+t,o}),window.cancelAnimationFrame||(window.cancelAnimationFrame=function(n){clearTimeout(n)})}()},{jquery:"jquery"}]},{},["sphinx-rtd-theme"]);

View File

@ -8,7 +8,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>composer-cli &mdash; Lorax 29.1 documentation</title> <title>composer-cli &mdash; Lorax 29.6 documentation</title>
@ -59,7 +59,7 @@
<div class="version"> <div class="version">
29.1 29.6
</div> </div>
@ -299,6 +299,16 @@ TO-COMMIT can be a commit hash, NEWEST, or WORKSPACE</dd>
<dd>List the available projects.</dd> <dd>List the available projects.</dd>
<dt>projects info &lt;PROJECT,…&gt;</dt> <dt>projects info &lt;PROJECT,…&gt;</dt>
<dd>Show details about the listed projects.</dd> <dd>Show details about the listed projects.</dd>
<dt>sources list</dt>
<dd>List the available sources</dd>
<dt>sources info &lt;SOURCE-NAME,…&gt;</dt>
<dd>Details about the source.</dd>
<dt>sources add &lt;SOURCE.TOML&gt;</dt>
<dd>Add a package source to the server.</dd>
<dt>sources change &lt;SOURCE.TOML&gt;</dt>
<dd>Change an existing source</dd>
<dt>sources delete &lt;SOURCE-NAME&gt;</dt>
<dd>Delete a package source.</dd>
</dl> </dl>
</p> </p>
</div> </div>
@ -382,7 +392,7 @@ save the qcow2 image as <code class="docutils literal notranslate"><span class="
<script type="text/javascript"> <script type="text/javascript">
var DOCUMENTATION_OPTIONS = { var DOCUMENTATION_OPTIONS = {
URL_ROOT:'./', URL_ROOT:'./',
VERSION:'29.1', VERSION:'29.6',
LANGUAGE:'None', LANGUAGE:'None',
COLLAPSE_INDEX:false, COLLAPSE_INDEX:false,
FILE_SUFFIX:'.html', FILE_SUFFIX:'.html',
@ -403,9 +413,7 @@ save the qcow2 image as <code class="docutils literal notranslate"><span class="
<script type="text/javascript"> <script type="text/javascript">
jQuery(function () { jQuery(function () {
SphinxRtdTheme.Navigation.enable(true);
SphinxRtdTheme.Navigation.enableSticky();
}); });
</script> </script>

View File

@ -8,7 +8,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>composer.cli package &mdash; Lorax 29.1 documentation</title> <title>composer.cli package &mdash; Lorax 29.6 documentation</title>
@ -59,7 +59,7 @@
<div class="version"> <div class="version">
29.1 29.6
</div> </div>
@ -906,6 +906,111 @@ include this extra information.</p>
<p>projects list</p> <p>projects list</p>
</dd></dl> </dd></dl>
</div>
<div class="section" id="module-composer.cli.sources">
<span id="composer-cli-sources-module"></span><h2>composer.cli.sources module<a class="headerlink" href="#module-composer.cli.sources" title="Permalink to this headline"></a></h2>
<dl class="function">
<dt id="composer.cli.sources.sources_add">
<code class="descclassname">composer.cli.sources.</code><code class="descname">sources_add</code><span class="sig-paren">(</span><em>socket_path</em>, <em>api_version</em>, <em>args</em>, <em>show_json=False</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/composer/cli/sources.html#sources_add"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#composer.cli.sources.sources_add" title="Permalink to this definition"></a></dt>
<dd><p>Add or change a source</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
<li><strong>socket_path</strong> (<a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.6)"><em>str</em></a>) Path to the Unix socket to use for API communication</li>
<li><strong>api_version</strong> (<a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.6)"><em>str</em></a>) Version of the API to talk to. eg. “0”</li>
<li><strong>args</strong> (<em>list of str</em>) List of remaining arguments from the cmdline</li>
<li><strong>show_json</strong> (<a class="reference external" href="https://docs.python.org/3/library/functions.html#bool" title="(in Python v3.6)"><em>bool</em></a>) Set to True to show the JSON output instead of the human readable output</li>
</ul>
</td>
</tr>
</tbody>
</table>
<p>sources add &lt;source.toml&gt;</p>
</dd></dl>
<dl class="function">
<dt id="composer.cli.sources.sources_cmd">
<code class="descclassname">composer.cli.sources.</code><code class="descname">sources_cmd</code><span class="sig-paren">(</span><em>opts</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/composer/cli/sources.html#sources_cmd"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#composer.cli.sources.sources_cmd" title="Permalink to this definition"></a></dt>
<dd><p>Process sources commands</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>opts</strong> (<a class="reference external" href="https://docs.python.org/3/library/argparse.html#argparse.Namespace" title="(in Python v3.6)"><em>argparse.Namespace</em></a>) Cmdline arguments</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">Value to return from sys.exit()</td>
</tr>
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><a class="reference external" href="https://docs.python.org/3/library/functions.html#int" title="(in Python v3.6)">int</a></td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="function">
<dt id="composer.cli.sources.sources_delete">
<code class="descclassname">composer.cli.sources.</code><code class="descname">sources_delete</code><span class="sig-paren">(</span><em>socket_path</em>, <em>api_version</em>, <em>args</em>, <em>show_json=False</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/composer/cli/sources.html#sources_delete"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#composer.cli.sources.sources_delete" title="Permalink to this definition"></a></dt>
<dd><p>Delete a source</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
<li><strong>socket_path</strong> (<a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.6)"><em>str</em></a>) Path to the Unix socket to use for API communication</li>
<li><strong>api_version</strong> (<a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.6)"><em>str</em></a>) Version of the API to talk to. eg. “0”</li>
<li><strong>args</strong> (<em>list of str</em>) List of remaining arguments from the cmdline</li>
<li><strong>show_json</strong> (<a class="reference external" href="https://docs.python.org/3/library/functions.html#bool" title="(in Python v3.6)"><em>bool</em></a>) Set to True to show the JSON output instead of the human readable output</li>
</ul>
</td>
</tr>
</tbody>
</table>
<p>sources delete &lt;source-name&gt;</p>
</dd></dl>
<dl class="function">
<dt id="composer.cli.sources.sources_info">
<code class="descclassname">composer.cli.sources.</code><code class="descname">sources_info</code><span class="sig-paren">(</span><em>socket_path</em>, <em>api_version</em>, <em>args</em>, <em>show_json=False</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/composer/cli/sources.html#sources_info"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#composer.cli.sources.sources_info" title="Permalink to this definition"></a></dt>
<dd><p>Output info on a list of projects</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
<li><strong>socket_path</strong> (<a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.6)"><em>str</em></a>) Path to the Unix socket to use for API communication</li>
<li><strong>api_version</strong> (<a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.6)"><em>str</em></a>) Version of the API to talk to. eg. “0”</li>
<li><strong>args</strong> (<em>list of str</em>) List of remaining arguments from the cmdline</li>
<li><strong>show_json</strong> (<a class="reference external" href="https://docs.python.org/3/library/functions.html#bool" title="(in Python v3.6)"><em>bool</em></a>) Set to True to show the JSON output instead of the human readable output</li>
</ul>
</td>
</tr>
</tbody>
</table>
<p>sources info &lt;source-name&gt;</p>
</dd></dl>
<dl class="function">
<dt id="composer.cli.sources.sources_list">
<code class="descclassname">composer.cli.sources.</code><code class="descname">sources_list</code><span class="sig-paren">(</span><em>socket_path</em>, <em>api_version</em>, <em>args</em>, <em>show_json=False</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/composer/cli/sources.html#sources_list"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#composer.cli.sources.sources_list" title="Permalink to this definition"></a></dt>
<dd><p>Output the list of available sources</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
<li><strong>socket_path</strong> (<a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.6)"><em>str</em></a>) Path to the Unix socket to use for API communication</li>
<li><strong>api_version</strong> (<a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.6)"><em>str</em></a>) Version of the API to talk to. eg. “0”</li>
<li><strong>args</strong> (<em>list of str</em>) List of remaining arguments from the cmdline</li>
<li><strong>show_json</strong> (<a class="reference external" href="https://docs.python.org/3/library/functions.html#bool" title="(in Python v3.6)"><em>bool</em></a>) Set to True to show the JSON output instead of the human readable output</li>
</ul>
</td>
</tr>
</tbody>
</table>
<p>sources list</p>
</dd></dl>
</div> </div>
<div class="section" id="module-composer.cli.utilities"> <div class="section" id="module-composer.cli.utilities">
<span id="composer-cli-utilities-module"></span><h2>composer.cli.utilities module<a class="headerlink" href="#module-composer.cli.utilities" title="Permalink to this headline"></a></h2> <span id="composer-cli-utilities-module"></span><h2>composer.cli.utilities module<a class="headerlink" href="#module-composer.cli.utilities" title="Permalink to this headline"></a></h2>
@ -1059,7 +1164,7 @@ include this extra information.</p>
<script type="text/javascript"> <script type="text/javascript">
var DOCUMENTATION_OPTIONS = { var DOCUMENTATION_OPTIONS = {
URL_ROOT:'./', URL_ROOT:'./',
VERSION:'29.1', VERSION:'29.6',
LANGUAGE:'None', LANGUAGE:'None',
COLLAPSE_INDEX:false, COLLAPSE_INDEX:false,
FILE_SUFFIX:'.html', FILE_SUFFIX:'.html',
@ -1080,9 +1185,7 @@ include this extra information.</p>
<script type="text/javascript"> <script type="text/javascript">
jQuery(function () { jQuery(function () {
SphinxRtdTheme.Navigation.enable(true);
SphinxRtdTheme.Navigation.enableSticky();
}); });
</script> </script>

View File

@ -8,7 +8,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>composer package &mdash; Lorax 29.1 documentation</title> <title>composer package &mdash; Lorax 29.6 documentation</title>
@ -59,7 +59,7 @@
<div class="version"> <div class="version">
29.1 29.6
</div> </div>
@ -185,6 +185,7 @@
<li class="toctree-l2"><a class="reference internal" href="composer.cli.html#module-composer.cli.compose">composer.cli.compose module</a></li> <li class="toctree-l2"><a class="reference internal" href="composer.cli.html#module-composer.cli.compose">composer.cli.compose module</a></li>
<li class="toctree-l2"><a class="reference internal" href="composer.cli.html#module-composer.cli.modules">composer.cli.modules module</a></li> <li class="toctree-l2"><a class="reference internal" href="composer.cli.html#module-composer.cli.modules">composer.cli.modules module</a></li>
<li class="toctree-l2"><a class="reference internal" href="composer.cli.html#module-composer.cli.projects">composer.cli.projects module</a></li> <li class="toctree-l2"><a class="reference internal" href="composer.cli.html#module-composer.cli.projects">composer.cli.projects module</a></li>
<li class="toctree-l2"><a class="reference internal" href="composer.cli.html#module-composer.cli.sources">composer.cli.sources module</a></li>
<li class="toctree-l2"><a class="reference internal" href="composer.cli.html#module-composer.cli.utilities">composer.cli.utilities module</a></li> <li class="toctree-l2"><a class="reference internal" href="composer.cli.html#module-composer.cli.utilities">composer.cli.utilities module</a></li>
<li class="toctree-l2"><a class="reference internal" href="composer.cli.html#module-composer.cli">Module contents</a></li> <li class="toctree-l2"><a class="reference internal" href="composer.cli.html#module-composer.cli">Module contents</a></li>
</ul> </ul>
@ -475,7 +476,7 @@
<script type="text/javascript"> <script type="text/javascript">
var DOCUMENTATION_OPTIONS = { var DOCUMENTATION_OPTIONS = {
URL_ROOT:'./', URL_ROOT:'./',
VERSION:'29.1', VERSION:'29.6',
LANGUAGE:'None', LANGUAGE:'None',
COLLAPSE_INDEX:false, COLLAPSE_INDEX:false,
FILE_SUFFIX:'.html', FILE_SUFFIX:'.html',
@ -496,9 +497,7 @@
<script type="text/javascript"> <script type="text/javascript">
jQuery(function () { jQuery(function () {
SphinxRtdTheme.Navigation.enable(true);
SphinxRtdTheme.Navigation.enableSticky();
}); });
</script> </script>

View File

@ -9,7 +9,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Index &mdash; Lorax 29.1 documentation</title> <title>Index &mdash; Lorax 29.6 documentation</title>
@ -58,7 +58,7 @@
<div class="version"> <div class="version">
29.1 29.6
</div> </div>
@ -319,10 +319,10 @@
<li><a href="pylorax.api.html#pylorax.api.compose.compose_types">(in module pylorax.api.compose)</a> <li><a href="pylorax.api.html#pylorax.api.compose.compose_types">(in module pylorax.api.compose)</a>
</li> </li>
</ul></li> </ul></li>
</ul></td>
<td style="width: 33%; vertical-align: top;"><ul>
<li><a href="composer.html#module-composer">composer (module)</a> <li><a href="composer.html#module-composer">composer (module)</a>
</li> </li>
</ul></td>
<td style="width: 33%; vertical-align: top;"><ul>
<li><a href="composer.cli.html#module-composer.cli">composer.cli (module)</a> <li><a href="composer.cli.html#module-composer.cli">composer.cli (module)</a>
</li> </li>
<li><a href="composer.cli.html#module-composer.cli.blueprints">composer.cli.blueprints (module)</a> <li><a href="composer.cli.html#module-composer.cli.blueprints">composer.cli.blueprints (module)</a>
@ -334,6 +334,8 @@
<li><a href="composer.cli.html#module-composer.cli.modules">composer.cli.modules (module)</a> <li><a href="composer.cli.html#module-composer.cli.modules">composer.cli.modules (module)</a>
</li> </li>
<li><a href="composer.cli.html#module-composer.cli.projects">composer.cli.projects (module)</a> <li><a href="composer.cli.html#module-composer.cli.projects">composer.cli.projects (module)</a>
</li>
<li><a href="composer.cli.html#module-composer.cli.sources">composer.cli.sources (module)</a>
</li> </li>
<li><a href="composer.cli.html#module-composer.cli.utilities">composer.cli.utilities (module)</a> <li><a href="composer.cli.html#module-composer.cli.utilities">composer.cli.utilities (module)</a>
</li> </li>
@ -392,6 +394,8 @@
<li><a href="pylorax.api.html#pylorax.api.recipes.delete_file">delete_file() (in module pylorax.api.recipes)</a> <li><a href="pylorax.api.html#pylorax.api.recipes.delete_file">delete_file() (in module pylorax.api.recipes)</a>
</li> </li>
<li><a href="pylorax.api.html#pylorax.api.recipes.delete_recipe">delete_recipe() (in module pylorax.api.recipes)</a> <li><a href="pylorax.api.html#pylorax.api.recipes.delete_recipe">delete_recipe() (in module pylorax.api.recipes)</a>
</li>
<li><a href="pylorax.api.html#pylorax.api.projects.delete_repo_source">delete_repo_source() (in module pylorax.api.projects)</a>
</li> </li>
<li><a href="composer.html#composer.http_client.delete_url_json">delete_url_json() (in module composer.http_client)</a> <li><a href="composer.html#composer.http_client.delete_url_json">delete_url_json() (in module composer.http_client)</a>
</li> </li>
@ -412,6 +416,8 @@
<li><a href="pylorax.html#pylorax.imgutils.dm_detach">dm_detach() (in module pylorax.imgutils)</a> <li><a href="pylorax.html#pylorax.imgutils.dm_detach">dm_detach() (in module pylorax.imgutils)</a>
</li> </li>
<li><a href="pylorax.html#pylorax.imgutils.DMDev">DMDev (class in pylorax.imgutils)</a> <li><a href="pylorax.html#pylorax.imgutils.DMDev">DMDev (class in pylorax.imgutils)</a>
</li>
<li><a href="pylorax.api.html#pylorax.api.projects.dnf_repo_to_file_repo">dnf_repo_to_file_repo() (in module pylorax.api.projects)</a>
</li> </li>
<li><a href="pylorax.html#pylorax.imgutils.do_grafts">do_grafts() (in module pylorax.imgutils)</a> <li><a href="pylorax.html#pylorax.imgutils.do_grafts">do_grafts() (in module pylorax.imgutils)</a>
</li> </li>
@ -483,8 +489,6 @@
<h2 id="G">G</h2> <h2 id="G">G</h2>
<table style="width: 100%" class="indextable genindextable"><tr> <table style="width: 100%" class="indextable genindextable"><tr>
<td style="width: 33%; vertical-align: top;"><ul> <td style="width: 33%; vertical-align: top;"><ul>
<li><a href="pylorax.html#pylorax.ltmpl.LoraxTemplateRunner.gconfset">gconfset() (pylorax.ltmpl.LoraxTemplateRunner method)</a>
</li>
<li><a href="pylorax.html#pylorax.treebuilder.RuntimeBuilder.generate_module_data">generate_module_data() (pylorax.treebuilder.RuntimeBuilder method)</a> <li><a href="pylorax.html#pylorax.treebuilder.RuntimeBuilder.generate_module_data">generate_module_data() (pylorax.treebuilder.RuntimeBuilder method)</a>
</li> </li>
<li><a href="pylorax.html#pylorax.treebuilder.generate_module_info">generate_module_info() (in module pylorax.treebuilder)</a> <li><a href="pylorax.html#pylorax.treebuilder.generate_module_info">generate_module_info() (in module pylorax.treebuilder)</a>
@ -499,17 +503,21 @@
</li> </li>
<li><a href="pylorax.api.html#pylorax.api.config.ComposerConfig.get_default">get_default() (pylorax.api.config.ComposerConfig method)</a> <li><a href="pylorax.api.html#pylorax.api.config.ComposerConfig.get_default">get_default() (pylorax.api.config.ComposerConfig method)</a>
</li> </li>
</ul></td>
<td style="width: 33%; vertical-align: top;"><ul>
<li><a href="composer.html#composer.http_client.get_filename">get_filename() (in module composer.http_client)</a> <li><a href="composer.html#composer.http_client.get_filename">get_filename() (in module composer.http_client)</a>
</li> </li>
<li><a href="pylorax.api.html#pylorax.api.queue.get_image_name">get_image_name() (in module pylorax.api.queue)</a> <li><a href="pylorax.api.html#pylorax.api.queue.get_image_name">get_image_name() (in module pylorax.api.queue)</a>
</li> </li>
</ul></td>
<td style="width: 33%; vertical-align: top;"><ul>
<li><a href="pylorax.html#pylorax.mount.IsoMountpoint.get_iso_label">get_iso_label() (pylorax.mount.IsoMountpoint method)</a> <li><a href="pylorax.html#pylorax.mount.IsoMountpoint.get_iso_label">get_iso_label() (pylorax.mount.IsoMountpoint method)</a>
</li> </li>
<li><a href="pylorax.html#pylorax.imgutils.get_loop_name">get_loop_name() (in module pylorax.imgutils)</a> <li><a href="pylorax.html#pylorax.imgutils.get_loop_name">get_loop_name() (in module pylorax.imgutils)</a>
</li>
<li><a href="pylorax.api.html#pylorax.api.projects.get_repo_sources">get_repo_sources() (in module pylorax.api.projects)</a>
</li> </li>
<li><a href="pylorax.api.html#pylorax.api.recipes.get_revision_from_tag">get_revision_from_tag() (in module pylorax.api.recipes)</a> <li><a href="pylorax.api.html#pylorax.api.recipes.get_revision_from_tag">get_revision_from_tag() (in module pylorax.api.recipes)</a>
</li>
<li><a href="pylorax.api.html#pylorax.api.projects.get_source_ids">get_source_ids() (in module pylorax.api.projects)</a>
</li> </li>
<li><a href="composer.html#composer.http_client.get_url_json">get_url_json() (in module composer.http_client)</a> <li><a href="composer.html#composer.http_client.get_url_json">get_url_json() (in module composer.http_client)</a>
</li> </li>
@ -704,6 +712,8 @@
<li><a href="pylorax.html#pylorax.imgutils.mktar">mktar() (in module pylorax.imgutils)</a> <li><a href="pylorax.html#pylorax.imgutils.mktar">mktar() (in module pylorax.imgutils)</a>
</li> </li>
<li><a href="pylorax.api.html#pylorax.api.recipes.Recipe.module_names">module_names (pylorax.api.recipes.Recipe attribute)</a> <li><a href="pylorax.api.html#pylorax.api.recipes.Recipe.module_names">module_names (pylorax.api.recipes.Recipe attribute)</a>
</li>
<li><a href="pylorax.api.html#pylorax.api.recipes.Recipe.module_nver">module_nver (pylorax.api.recipes.Recipe attribute)</a>
</li> </li>
<li><a href="composer.cli.html#composer.cli.modules.modules_cmd">modules_cmd() (in module composer.cli.modules)</a> <li><a href="composer.cli.html#composer.cli.modules.modules_cmd">modules_cmd() (in module composer.cli.modules)</a>
</li> </li>
@ -750,6 +760,8 @@
<table style="width: 100%" class="indextable genindextable"><tr> <table style="width: 100%" class="indextable genindextable"><tr>
<td style="width: 33%; vertical-align: top;"><ul> <td style="width: 33%; vertical-align: top;"><ul>
<li><a href="pylorax.api.html#pylorax.api.recipes.Recipe.package_names">package_names (pylorax.api.recipes.Recipe attribute)</a> <li><a href="pylorax.api.html#pylorax.api.recipes.Recipe.package_names">package_names (pylorax.api.recipes.Recipe attribute)</a>
</li>
<li><a href="pylorax.api.html#pylorax.api.recipes.Recipe.package_nver">package_nver (pylorax.api.recipes.Recipe attribute)</a>
</li> </li>
<li><a href="composer.cli.html#composer.cli.utilities.packageNEVRA">packageNEVRA() (in module composer.cli.utilities)</a> <li><a href="composer.cli.html#composer.cli.utilities.packageNEVRA">packageNEVRA() (in module composer.cli.utilities)</a>
</li> </li>
@ -935,10 +947,10 @@
</ul></li> </ul></li>
<li><a href="pylorax.html#pylorax.ltmpl.LoraxTemplateRunner.removefrom">removefrom() (pylorax.ltmpl.LoraxTemplateRunner method)</a> <li><a href="pylorax.html#pylorax.ltmpl.LoraxTemplateRunner.removefrom">removefrom() (pylorax.ltmpl.LoraxTemplateRunner method)</a>
</li> </li>
</ul></td>
<td style="width: 33%; vertical-align: top;"><ul>
<li><a href="pylorax.html#pylorax.ltmpl.LoraxTemplateRunner.removekmod">removekmod() (pylorax.ltmpl.LoraxTemplateRunner method)</a> <li><a href="pylorax.html#pylorax.ltmpl.LoraxTemplateRunner.removekmod">removekmod() (pylorax.ltmpl.LoraxTemplateRunner method)</a>
</li> </li>
</ul></td>
<td style="width: 33%; vertical-align: top;"><ul>
<li><a href="pylorax.html#pylorax.ltmpl.LoraxTemplateRunner.removepkg">removepkg() (pylorax.ltmpl.LoraxTemplateRunner method)</a> <li><a href="pylorax.html#pylorax.ltmpl.LoraxTemplateRunner.removepkg">removepkg() (pylorax.ltmpl.LoraxTemplateRunner method)</a>
</li> </li>
<li><a href="pylorax.html#pylorax.sysutils.replace">replace() (in module pylorax.sysutils)</a> <li><a href="pylorax.html#pylorax.sysutils.replace">replace() (in module pylorax.sysutils)</a>
@ -950,6 +962,8 @@
<li><a href="pylorax.api.html#pylorax.api.server.GitLock.repo">repo (pylorax.api.server.GitLock attribute)</a> <li><a href="pylorax.api.html#pylorax.api.server.GitLock.repo">repo (pylorax.api.server.GitLock attribute)</a>
</li> </li>
<li><a href="pylorax.api.html#pylorax.api.compose.repo_to_ks">repo_to_ks() (in module pylorax.api.compose)</a> <li><a href="pylorax.api.html#pylorax.api.compose.repo_to_ks">repo_to_ks() (in module pylorax.api.compose)</a>
</li>
<li><a href="pylorax.api.html#pylorax.api.projects.repo_to_source">repo_to_source() (in module pylorax.api.projects)</a>
</li> </li>
<li><a href="pylorax.html#pylorax.creator.FakeDNF.reset">reset() (pylorax.creator.FakeDNF method)</a> <li><a href="pylorax.html#pylorax.creator.FakeDNF.reset">reset() (pylorax.creator.FakeDNF method)</a>
</li> </li>
@ -998,13 +1012,25 @@
<li><a href="pylorax.html#pylorax.monitor.LogMonitor.shutdown">shutdown() (pylorax.monitor.LogMonitor method)</a> <li><a href="pylorax.html#pylorax.monitor.LogMonitor.shutdown">shutdown() (pylorax.monitor.LogMonitor method)</a>
</li> </li>
<li><a href="pylorax.html#pylorax.decorators.singleton">singleton() (in module pylorax.decorators)</a> <li><a href="pylorax.html#pylorax.decorators.singleton">singleton() (in module pylorax.decorators)</a>
</li>
<li><a href="pylorax.api.html#pylorax.api.projects.source_to_repo">source_to_repo() (in module pylorax.api.projects)</a>
</li>
<li><a href="composer.cli.html#composer.cli.sources.sources_add">sources_add() (in module composer.cli.sources)</a>
</li>
<li><a href="composer.cli.html#composer.cli.sources.sources_cmd">sources_cmd() (in module composer.cli.sources)</a>
</li>
<li><a href="composer.cli.html#composer.cli.sources.sources_delete">sources_delete() (in module composer.cli.sources)</a>
</li>
<li><a href="composer.cli.html#composer.cli.sources.sources_info">sources_info() (in module composer.cli.sources)</a>
</li>
</ul></td>
<td style="width: 33%; vertical-align: top;"><ul>
<li><a href="composer.cli.html#composer.cli.sources.sources_list">sources_list() (in module composer.cli.sources)</a>
</li> </li>
<li><a href="pylorax.html#pylorax.ltmpl.split_and_expand">split_and_expand() (in module pylorax.ltmpl)</a> <li><a href="pylorax.html#pylorax.ltmpl.split_and_expand">split_and_expand() (in module pylorax.ltmpl)</a>
</li> </li>
<li><a href="pylorax.html#pylorax.creator.squashfs_args">squashfs_args() (in module pylorax.creator)</a> <li><a href="pylorax.html#pylorax.creator.squashfs_args">squashfs_args() (in module pylorax.creator)</a>
</li> </li>
</ul></td>
<td style="width: 33%; vertical-align: top;"><ul>
<li><a href="pylorax.html#pylorax.dnfhelper.LoraxDownloadCallback.start">start() (pylorax.dnfhelper.LoraxDownloadCallback method)</a> <li><a href="pylorax.html#pylorax.dnfhelper.LoraxDownloadCallback.start">start() (pylorax.dnfhelper.LoraxDownloadCallback method)</a>
</li> </li>
<li><a href="pylorax.api.html#pylorax.api.compose.start_build">start_build() (in module pylorax.api.compose)</a> <li><a href="pylorax.api.html#pylorax.api.compose.start_build">start_build() (in module pylorax.api.compose)</a>
@ -1170,7 +1196,7 @@
<script type="text/javascript"> <script type="text/javascript">
var DOCUMENTATION_OPTIONS = { var DOCUMENTATION_OPTIONS = {
URL_ROOT:'./', URL_ROOT:'./',
VERSION:'29.1', VERSION:'29.6',
LANGUAGE:'None', LANGUAGE:'None',
COLLAPSE_INDEX:false, COLLAPSE_INDEX:false,
FILE_SUFFIX:'.html', FILE_SUFFIX:'.html',
@ -1191,9 +1217,7 @@
<script type="text/javascript"> <script type="text/javascript">
jQuery(function () { jQuery(function () {
SphinxRtdTheme.Navigation.enable(true);
SphinxRtdTheme.Navigation.enableSticky();
}); });
</script> </script>

View File

@ -8,7 +8,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Welcome to Loraxs documentation! &mdash; Lorax 29.1 documentation</title> <title>Welcome to Loraxs documentation! &mdash; Lorax 29.6 documentation</title>
@ -58,7 +58,7 @@
<div class="version"> <div class="version">
29.1 29.6
</div> </div>
@ -175,7 +175,7 @@
<h1>Documentation for other Lorax Branches<a class="headerlink" href="#documentation-for-other-lorax-branches" title="Permalink to this headline"></a></h1> <h1>Documentation for other Lorax Branches<a class="headerlink" href="#documentation-for-other-lorax-branches" title="Permalink to this headline"></a></h1>
<ul class="simple"> <ul class="simple">
<li><a class="reference external" href="f28-branch/">Fedora 28</a></li> <li><a class="reference external" href="f28-branch/">Fedora 28</a></li>
<li><a class="reference external" href="lorax-composer/">lorax-composer</a></li> <li><a class="reference external" href="lorax-composer/">RHEL7 lorax-composer</a></li>
</ul> </ul>
</div> </div>
<div class="section" id="indices-and-tables"> <div class="section" id="indices-and-tables">
@ -227,7 +227,7 @@
<script type="text/javascript"> <script type="text/javascript">
var DOCUMENTATION_OPTIONS = { var DOCUMENTATION_OPTIONS = {
URL_ROOT:'./', URL_ROOT:'./',
VERSION:'29.1', VERSION:'29.6',
LANGUAGE:'None', LANGUAGE:'None',
COLLAPSE_INDEX:false, COLLAPSE_INDEX:false,
FILE_SUFFIX:'.html', FILE_SUFFIX:'.html',
@ -248,9 +248,7 @@
<script type="text/javascript"> <script type="text/javascript">
jQuery(function () { jQuery(function () {
SphinxRtdTheme.Navigation.enable(true);
SphinxRtdTheme.Navigation.enableSticky();
}); });
</script> </script>

View File

@ -8,7 +8,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Introduction to Lorax &mdash; Lorax 29.1 documentation</title> <title>Introduction to Lorax &mdash; Lorax 29.6 documentation</title>
@ -59,7 +59,7 @@
<div class="version"> <div class="version">
29.1 29.6
</div> </div>
@ -250,7 +250,7 @@ upd-instroot and mk-images* scripts.</p>
<script type="text/javascript"> <script type="text/javascript">
var DOCUMENTATION_OPTIONS = { var DOCUMENTATION_OPTIONS = {
URL_ROOT:'./', URL_ROOT:'./',
VERSION:'29.1', VERSION:'29.6',
LANGUAGE:'None', LANGUAGE:'None',
COLLAPSE_INDEX:false, COLLAPSE_INDEX:false,
FILE_SUFFIX:'.html', FILE_SUFFIX:'.html',
@ -271,9 +271,7 @@ upd-instroot and mk-images* scripts.</p>
<script type="text/javascript"> <script type="text/javascript">
jQuery(function () { jQuery(function () {
SphinxRtdTheme.Navigation.enable(true);
SphinxRtdTheme.Navigation.enableSticky();
}); });
</script> </script>

View File

@ -8,7 +8,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>livemedia-creator &mdash; Lorax 29.1 documentation</title> <title>livemedia-creator &mdash; Lorax 29.6 documentation</title>
@ -59,7 +59,7 @@
<div class="version"> <div class="version">
29.1 29.6
</div> </div>
@ -101,7 +101,11 @@
</li> </li>
<li class="toctree-l2"><a class="reference internal" href="#quickstart">Quickstart</a></li> <li class="toctree-l2"><a class="reference internal" href="#quickstart">Quickstart</a></li>
<li class="toctree-l2"><a class="reference internal" href="#how-iso-creation-works">How ISO creation works</a></li> <li class="toctree-l2"><a class="reference internal" href="#how-iso-creation-works">How ISO creation works</a></li>
<li class="toctree-l2"><a class="reference internal" href="#kickstarts">Kickstarts</a></li> <li class="toctree-l2"><a class="reference internal" href="#kickstarts">Kickstarts</a><ul>
<li class="toctree-l3"><a class="reference internal" href="#user-created-repositories">User created repositories</a></li>
<li class="toctree-l3"><a class="reference internal" href="#using-a-proxy-with-repos">Using a Proxy with repos</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="#anaconda-image-install-no-virt">Anaconda image install (no-virt)</a></li> <li class="toctree-l2"><a class="reference internal" href="#anaconda-image-install-no-virt">Anaconda image install (no-virt)</a></li>
<li class="toctree-l2"><a class="reference internal" href="#ami-images">AMI Images</a></li> <li class="toctree-l2"><a class="reference internal" href="#ami-images">AMI Images</a></li>
<li class="toctree-l2"><a class="reference internal" href="#appliance-creation">Appliance Creation</a></li> <li class="toctree-l2"><a class="reference internal" href="#appliance-creation">Appliance Creation</a></li>
@ -698,11 +702,19 @@ there is no /etc/fstab</p>
dracut-config-generic dracut-config-generic
dracut-live dracut-live
-dracut-config-rescue -dracut-config-rescue
grub-efi grub2-efi
memtest86+ memtest86+
syslinux</p> syslinux</p>
</li> </li>
</ol> </ol>
<div class="section" id="user-created-repositories">
<h3>User created repositories<a class="headerlink" href="#user-created-repositories" title="Permalink to this headline"></a></h3>
<p>If you are using your own repositories and installing groups (eg. &#64;core) make
sure you create the repodata with groups like this <code class="docutils literal notranslate"><span class="pre">createrepo</span> <span class="pre">-g</span>
<span class="pre">/path/to/groups.xml</span> <span class="pre">/path/to/rpms</span></code></p>
</div>
<div class="section" id="using-a-proxy-with-repos">
<h3>Using a Proxy with repos<a class="headerlink" href="#using-a-proxy-with-repos" title="Permalink to this headline"></a></h3>
<p>One drawback to using qemu is that it pulls the packages from the repo each <p>One drawback to using qemu is that it pulls the packages from the repo each
time you run it. To speed things up you either need a local mirror of the time you run it. To speed things up you either need a local mirror of the
packages, or you can use a caching proxy. When using a proxy you pass it to packages, or you can use a caching proxy. When using a proxy you pass it to
@ -714,7 +726,15 @@ packages will get cached, so your kickstart url would look like:</p>
<blockquote> <blockquote>
<div><code class="docutils literal notranslate"><span class="pre">url</span> <span class="pre">--url=&quot;http://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/x86_64/os/&quot;</span></code></div></blockquote> <div><code class="docutils literal notranslate"><span class="pre">url</span> <span class="pre">--url=&quot;http://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/x86_64/os/&quot;</span></code></div></blockquote>
<p>You can also add an update repo, but dont name it updates. Add proxy to it <p>You can also add an update repo, but dont name it updates. Add proxy to it
as well.</p> as well. You can use all of the <a class="reference external" href="https://pykickstart.readthedocs.io/en/latest/kickstart-docs.html#chapter-2-kickstart-commands-in-fedora">kickstart commands</a> in your kickstart. Make sure there
is only one <code class="docutils literal notranslate"><span class="pre">url</span></code> command, other repos have to use the <code class="docutils literal notranslate"><span class="pre">repo</span></code> command and cannot be
named <code class="docutils literal notranslate"><span class="pre">updates</span></code> which is reserved for Anacondas use. eg.:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">url</span> <span class="o">--</span><span class="n">url</span><span class="o">=</span><span class="n">PRIMARY</span><span class="o">-</span><span class="n">REPO</span><span class="o">-</span><span class="n">URL</span> <span class="o">--</span><span class="n">proxy</span><span class="o">=</span><span class="n">PROXY</span><span class="o">-</span><span class="n">URL</span>
<span class="n">repo</span> <span class="o">--</span><span class="n">name</span><span class="o">=</span><span class="s2">&quot;repo1&quot;</span> <span class="o">--</span><span class="n">baseurl</span><span class="o">=</span><span class="n">FIRST</span><span class="o">-</span><span class="n">REPO</span><span class="o">-</span><span class="n">URL</span> <span class="o">--</span><span class="n">proxy</span><span class="o">=</span><span class="n">PROXY</span><span class="o">-</span><span class="n">URL</span>
<span class="n">repo</span> <span class="o">--</span><span class="n">name</span><span class="o">=</span><span class="s2">&quot;repo2&quot;</span> <span class="o">--</span><span class="n">baseurl</span><span class="o">=</span><span class="n">SECOND</span><span class="o">-</span><span class="n">REPO_URL</span> <span class="o">--</span><span class="n">proxy</span><span class="o">=</span><span class="n">PROXY</span><span class="o">-</span><span class="n">URL</span>
</pre></div>
</div>
</div>
</div> </div>
<div class="section" id="anaconda-image-install-no-virt"> <div class="section" id="anaconda-image-install-no-virt">
<h2>Anaconda image install (no-virt)<a class="headerlink" href="#anaconda-image-install-no-virt" title="Permalink to this headline"></a></h2> <h2>Anaconda image install (no-virt)<a class="headerlink" href="#anaconda-image-install-no-virt" title="Permalink to this headline"></a></h2>
@ -1078,6 +1098,16 @@ cancel the installation when they happen. But not everything can be caught.
When creating a new kickstart it is helpful to use vnc so that you can monitor When creating a new kickstart it is helpful to use vnc so that you can monitor
the installation as it happens, and if it gets stuck without lmc detecting the the installation as it happens, and if it gets stuck without lmc detecting the
problem you can switch to tty1 and examine the system directly.</p> problem you can switch to tty1 and examine the system directly.</p>
<p>If you suspect problems with %pre or %post sections you can redirect the output
to the terminal and examine it by logging into the VM. eg.:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="o">%</span><span class="n">pre</span>
<span class="n">chvt</span>
<span class="n">exec</span> <span class="o">&lt;</span> <span class="o">/</span><span class="n">dev</span><span class="o">/</span><span class="n">tty3</span> <span class="o">&gt;</span> <span class="o">/</span><span class="n">dev</span><span class="o">/</span><span class="n">tty3</span> <span class="mi">2</span><span class="o">&gt;/</span><span class="n">dev</span><span class="o">/</span><span class="n">tty3</span>
<span class="c1">#do stuff</span>
<span class="n">echo</span> <span class="n">hello</span> <span class="n">world</span>
<span class="o">%</span><span class="n">end</span>
</pre></div>
</div>
<p>If it does get stuck the best way to cancel is to use kill -9 on the qemu pid, <p>If it does get stuck the best way to cancel is to use kill -9 on the qemu pid,
lmc will detect that the process died and cleanup.</p> lmc will detect that the process died and cleanup.</p>
<p>If lmc didnt handle the cleanup for some reason you can do this: <p>If lmc didnt handle the cleanup for some reason you can do this:
@ -1148,7 +1178,7 @@ report bugs against the lorax component.</p>
<script type="text/javascript"> <script type="text/javascript">
var DOCUMENTATION_OPTIONS = { var DOCUMENTATION_OPTIONS = {
URL_ROOT:'./', URL_ROOT:'./',
VERSION:'29.1', VERSION:'29.6',
LANGUAGE:'None', LANGUAGE:'None',
COLLAPSE_INDEX:false, COLLAPSE_INDEX:false,
FILE_SUFFIX:'.html', FILE_SUFFIX:'.html',
@ -1169,9 +1199,7 @@ report bugs against the lorax component.</p>
<script type="text/javascript"> <script type="text/javascript">
jQuery(function () { jQuery(function () {
SphinxRtdTheme.Navigation.enable(true);
SphinxRtdTheme.Navigation.enableSticky();
}); });
</script> </script>

View File

@ -8,7 +8,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>lorax-composer &mdash; Lorax 29.1 documentation</title> <title>lorax-composer &mdash; Lorax 29.6 documentation</title>
@ -59,7 +59,7 @@
<div class="version"> <div class="version">
29.1 29.6
</div> </div>
@ -114,6 +114,7 @@
<li class="toctree-l3"><a class="reference internal" href="#example-add-partitioned-disk-support">Example: Add partitioned disk support</a></li> <li class="toctree-l3"><a class="reference internal" href="#example-add-partitioned-disk-support">Example: Add partitioned disk support</a></li>
</ul> </ul>
</li> </li>
<li class="toctree-l2"><a class="reference internal" href="#package-sources">Package Sources</a></li>
</ul> </ul>
</li> </li>
<li class="toctree-l1"><a class="reference internal" href="composer-cli.html">composer-cli</a></li> <li class="toctree-l1"><a class="reference internal" href="composer-cli.html">composer-cli</a></li>
@ -205,11 +206,10 @@ installation and configuration of the images.</p>
<p>The best way to install <code class="docutils literal notranslate"><span class="pre">lorax-composer</span></code> is to use <code class="docutils literal notranslate"><span class="pre">sudo</span> <span class="pre">dnf</span> <span class="pre">install</span> <p>The best way to install <code class="docutils literal notranslate"><span class="pre">lorax-composer</span></code> is to use <code class="docutils literal notranslate"><span class="pre">sudo</span> <span class="pre">dnf</span> <span class="pre">install</span>
<span class="pre">lorax-composer</span> <span class="pre">composer-cli</span></code>, this will setup the weldr user and install the <span class="pre">lorax-composer</span> <span class="pre">composer-cli</span></code>, this will setup the weldr user and install the
systemd socket activation service. You will then need to enable it with <code class="docutils literal notranslate"><span class="pre">sudo</span> systemd socket activation service. You will then need to enable it with <code class="docutils literal notranslate"><span class="pre">sudo</span>
<span class="pre">systemctl</span> <span class="pre">enable</span> <span class="pre">lorax-composer.socket</span> <span class="pre">systemctl</span> <span class="pre">enable</span> <span class="pre">lorax-composer.socket</span> <span class="pre">&amp;&amp;</span> <span class="pre">sudo</span> <span class="pre">systemctl</span> <span class="pre">start</span>
<span class="pre">&&</span> <span class="pre">sudo</span> <span class="pre">lorax-composer.socket</span></code>. This will leave the server off until the first request
<span class="pre">systemctl</span> <span class="pre">start</span> <span class="pre">lorax-composer.socket</span></code>. This will leave the server off until is made. Systemd will then launch the server and it will remain running until
the first request is made. Systemd will then launch the server and it will the system is rebooted.</p>
remain running until the system is rebooted.</p>
</div> </div>
<div class="section" id="quickstart"> <div class="section" id="quickstart">
<h2>Quickstart<a class="headerlink" href="#quickstart" title="Permalink to this headline"></a></h2> <h2>Quickstart<a class="headerlink" href="#quickstart" title="Permalink to this headline"></a></h2>
@ -218,9 +218,8 @@ remain running until the system is rebooted.</p>
<li>Remove any pre-existing socket directory with <code class="docutils literal notranslate"><span class="pre">rm</span> <span class="pre">-rf</span> <span class="pre">/run/weldr/</span></code> <li>Remove any pre-existing socket directory with <code class="docutils literal notranslate"><span class="pre">rm</span> <span class="pre">-rf</span> <span class="pre">/run/weldr/</span></code>
A new directory with correct permissions will be created the first time the server runs.</li> A new directory with correct permissions will be created the first time the server runs.</li>
<li>Enable the socket activation with <code class="docutils literal notranslate"><span class="pre">systemctl</span> <span class="pre">enable</span> <span class="pre">lorax-composer.socket</span> <li>Enable the socket activation with <code class="docutils literal notranslate"><span class="pre">systemctl</span> <span class="pre">enable</span> <span class="pre">lorax-composer.socket</span>
<span class="pre">&&</span> <span class="pre">sudo</span> <span class="pre">&amp;&amp;</span> <span class="pre">sudo</span> <span class="pre">systemctl</span> <span class="pre">start</span> <span class="pre">lorax-composer.socket</span></code> or run it directly with
<span class="pre">systemctl</span> <span class="pre">start</span> <span class="pre">lorax-composer.socket</span></code> or <code class="docutils literal notranslate"><span class="pre">lorax-composer</span> <span class="pre">/path/to/blueprints/</span></code></li>
run it directly with <code class="docutils literal notranslate"><span class="pre">lorax-composer</span> <span class="pre">/path/to/blueprints/</span></code></li>
</ol> </ol>
<p>The <code class="docutils literal notranslate"><span class="pre">/path/to/blueprints/</span></code> directory is where the blueprints git repo will <p>The <code class="docutils literal notranslate"><span class="pre">/path/to/blueprints/</span></code> directory is where the blueprints git repo will
be created, and all the blueprints created with the <code class="docutils literal notranslate"><span class="pre">/api/v0/blueprints/new</span></code> be created, and all the blueprints created with the <code class="docutils literal notranslate"><span class="pre">/api/v0/blueprints/new</span></code>
@ -471,6 +470,50 @@ unneeded extra files. This is especially true for the <code class="docutils lite
the contents of the iso as well as the boot.iso itself.</p> the contents of the iso as well as the boot.iso itself.</p>
</div> </div>
</div> </div>
<div class="section" id="package-sources">
<h2>Package Sources<a class="headerlink" href="#package-sources" title="Permalink to this headline"></a></h2>
<p>By default lorax-composer uses the hosts configured repositories. It copies
the <code class="docutils literal notranslate"><span class="pre">*.repo</span></code> files from <code class="docutils literal notranslate"><span class="pre">/etc/yum.repos.d/</span></code> into
<code class="docutils literal notranslate"><span class="pre">/var/lib/lorax/composer/repos.d/</span></code> at startup, these are immutable system
repositories and cannot be deleted or changed. If you want to add additional
repos you can put them into <code class="docutils literal notranslate"><span class="pre">/var/lib/lorax/composer/repos.d/</span></code> or use the
<code class="docutils literal notranslate"><span class="pre">/api/v0/projects/source/*</span></code> API routes to create them.</p>
<p>The new source can be added by doing a POST to the <code class="docutils literal notranslate"><span class="pre">/api/v0/projects/source/new</span></code>
route using JSON (with <cite>Content-Type</cite> header set to <cite>application/json</cite>) or TOML
(with it set to <cite>text/x-toml</cite>). The format of the source looks like this (in
TOML):</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">name</span> <span class="o">=</span> <span class="s2">&quot;custom-source-1&quot;</span>
<span class="n">url</span> <span class="o">=</span> <span class="s2">&quot;https://url/path/to/repository/&quot;</span>
<span class="nb">type</span> <span class="o">=</span> <span class="s2">&quot;yum-baseurl&quot;</span>
<span class="n">proxy</span> <span class="o">=</span> <span class="s2">&quot;https://proxy-url/&quot;</span>
<span class="n">check_ssl</span> <span class="o">=</span> <span class="n">true</span>
<span class="n">check_gpg</span> <span class="o">=</span> <span class="n">true</span>
<span class="n">gpgkey_urls</span> <span class="o">=</span> <span class="p">[</span><span class="s2">&quot;https://url/path/to/gpg-key&quot;</span><span class="p">]</span>
</pre></div>
</div>
<p>The <code class="docutils literal notranslate"><span class="pre">proxy</span></code> and <code class="docutils literal notranslate"><span class="pre">gpgkey_urls</span></code> entries are optional. All of the others are required. The supported
types for the urls are:</p>
<ul class="simple">
<li><code class="docutils literal notranslate"><span class="pre">yum-baseurl</span></code> is a URL to a yum repository.</li>
<li><code class="docutils literal notranslate"><span class="pre">yum-mirrorlist</span></code> is a URL for a mirrorlist.</li>
<li><code class="docutils literal notranslate"><span class="pre">yum-metalink</span></code> is a URL for a metalink.</li>
</ul>
<p>If <code class="docutils literal notranslate"><span class="pre">check_ssl</span></code> is true the https certificates must be valid. If they are self-signed you can either set
this to false, or add your Certificate Authority to the host system.</p>
<p>If <code class="docutils literal notranslate"><span class="pre">check_gpg</span></code> is true the GPG key must either be installed on the host system, or <code class="docutils literal notranslate"><span class="pre">gpgkey_urls</span></code>
should point to it.</p>
<p>You can edit an existing source (other than system sources), by doing a POST to the <code class="docutils literal notranslate"><span class="pre">new</span></code> route
with the new version of the source. It will overwrite the previous one.</p>
<p>A list of existing sources is available from <code class="docutils literal notranslate"><span class="pre">/api/v0/projects/source/list</span></code>, and detailed info
on a source can be retrieved with the <code class="docutils literal notranslate"><span class="pre">/api/v0/projects/source/info/&lt;source-name&gt;</span></code> route. By default
it returns JSON but it can also return TOML if <code class="docutils literal notranslate"><span class="pre">?format=toml</span></code> is added to the request.</p>
<p>Non-system sources can be deleted by doing a <code class="docutils literal notranslate"><span class="pre">DELETE</span></code> request to the
<code class="docutils literal notranslate"><span class="pre">/api/v0/projects/source/delete/&lt;source-name&gt;</span></code> route.</p>
<p>The documentation for the source API routes can be <a class="reference external" href="pylorax.api.html#api-v0-projects-source-list">found here</a></p>
<p>The configured sources are used for all blueprint depsolve operations, and for composing images.
When adding additional sources you must make sure that the packages in the source do not
conflict with any other package sources, otherwise depsolving will fail.</p>
</div>
</div> </div>
@ -515,7 +558,7 @@ the contents of the iso as well as the boot.iso itself.</p>
<script type="text/javascript"> <script type="text/javascript">
var DOCUMENTATION_OPTIONS = { var DOCUMENTATION_OPTIONS = {
URL_ROOT:'./', URL_ROOT:'./',
VERSION:'29.1', VERSION:'29.6',
LANGUAGE:'None', LANGUAGE:'None',
COLLAPSE_INDEX:false, COLLAPSE_INDEX:false,
FILE_SUFFIX:'.html', FILE_SUFFIX:'.html',
@ -536,9 +579,7 @@ the contents of the iso as well as the boot.iso itself.</p>
<script type="text/javascript"> <script type="text/javascript">
jQuery(function () { jQuery(function () {
SphinxRtdTheme.Navigation.enable(true);
SphinxRtdTheme.Navigation.enableSticky();
}); });
</script> </script>

View File

@ -8,7 +8,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Lorax &mdash; Lorax 29.1 documentation</title> <title>Lorax &mdash; Lorax 29.6 documentation</title>
@ -59,7 +59,7 @@
<div class="version"> <div class="version">
29.1 29.6
</div> </div>
@ -458,7 +458,6 @@ installation. A number of template commands are used here:</p>
<ul class="simple"> <ul class="simple">
<li><a class="reference internal" href="pylorax.html#pylorax.ltmpl.LoraxTemplateRunner.append" title="pylorax.ltmpl.LoraxTemplateRunner.append"><code class="xref py py-func docutils literal notranslate"><span class="pre">append</span></code></a> to add text to a file.</li> <li><a class="reference internal" href="pylorax.html#pylorax.ltmpl.LoraxTemplateRunner.append" title="pylorax.ltmpl.LoraxTemplateRunner.append"><code class="xref py py-func docutils literal notranslate"><span class="pre">append</span></code></a> to add text to a file.</li>
<li><a class="reference internal" href="pylorax.html#pylorax.ltmpl.LoraxTemplateRunner.chmod" title="pylorax.ltmpl.LoraxTemplateRunner.chmod"><code class="xref py py-func docutils literal notranslate"><span class="pre">chmod</span></code></a> changes the files mode.</li> <li><a class="reference internal" href="pylorax.html#pylorax.ltmpl.LoraxTemplateRunner.chmod" title="pylorax.ltmpl.LoraxTemplateRunner.chmod"><code class="xref py py-func docutils literal notranslate"><span class="pre">chmod</span></code></a> changes the files mode.</li>
<li><a class="reference internal" href="pylorax.html#pylorax.ltmpl.LoraxTemplateRunner.gconfset" title="pylorax.ltmpl.LoraxTemplateRunner.gconfset"><code class="xref py py-func docutils literal notranslate"><span class="pre">gconfset</span></code></a> runs gconfset.</li>
<li><a class="reference internal" href="pylorax.html#pylorax.ltmpl.LoraxTemplateRunner.install" title="pylorax.ltmpl.LoraxTemplateRunner.install"><code class="xref py py-func docutils literal notranslate"><span class="pre">install</span></code></a> to install a file into the installroot.</li> <li><a class="reference internal" href="pylorax.html#pylorax.ltmpl.LoraxTemplateRunner.install" title="pylorax.ltmpl.LoraxTemplateRunner.install"><code class="xref py py-func docutils literal notranslate"><span class="pre">install</span></code></a> to install a file into the installroot.</li>
<li><a class="reference internal" href="pylorax.html#pylorax.ltmpl.LoraxTemplateRunner.mkdir" title="pylorax.ltmpl.LoraxTemplateRunner.mkdir"><code class="xref py py-func docutils literal notranslate"><span class="pre">mkdir</span></code></a> makes a new directory.</li> <li><a class="reference internal" href="pylorax.html#pylorax.ltmpl.LoraxTemplateRunner.mkdir" title="pylorax.ltmpl.LoraxTemplateRunner.mkdir"><code class="xref py py-func docutils literal notranslate"><span class="pre">mkdir</span></code></a> makes a new directory.</li>
<li><a class="reference internal" href="pylorax.html#pylorax.ltmpl.LoraxTemplateRunner.move" title="pylorax.ltmpl.LoraxTemplateRunner.move"><code class="xref py py-func docutils literal notranslate"><span class="pre">move</span></code></a> to move a file into the installroot</li> <li><a class="reference internal" href="pylorax.html#pylorax.ltmpl.LoraxTemplateRunner.move" title="pylorax.ltmpl.LoraxTemplateRunner.move"><code class="xref py py-func docutils literal notranslate"><span class="pre">move</span></code></a> to move a file into the installroot</li>
@ -556,7 +555,7 @@ should) select the specific template directory by passing <code class="docutils
<script type="text/javascript"> <script type="text/javascript">
var DOCUMENTATION_OPTIONS = { var DOCUMENTATION_OPTIONS = {
URL_ROOT:'./', URL_ROOT:'./',
VERSION:'29.1', VERSION:'29.6',
LANGUAGE:'None', LANGUAGE:'None',
COLLAPSE_INDEX:false, COLLAPSE_INDEX:false,
FILE_SUFFIX:'.html', FILE_SUFFIX:'.html',
@ -577,9 +576,7 @@ should) select the specific template directory by passing <code class="docutils
<script type="text/javascript"> <script type="text/javascript">
jQuery(function () { jQuery(function () {
SphinxRtdTheme.Navigation.enable(true);
SphinxRtdTheme.Navigation.enableSticky();
}); });
</script> </script>

View File

@ -8,7 +8,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>src &mdash; Lorax 29.1 documentation</title> <title>src &mdash; Lorax 29.6 documentation</title>
@ -59,7 +59,7 @@
<div class="version"> <div class="version">
29.1 29.6
</div> </div>
@ -173,6 +173,7 @@
<li class="toctree-l4"><a class="reference internal" href="composer.cli.html#module-composer.cli.compose">composer.cli.compose module</a></li> <li class="toctree-l4"><a class="reference internal" href="composer.cli.html#module-composer.cli.compose">composer.cli.compose module</a></li>
<li class="toctree-l4"><a class="reference internal" href="composer.cli.html#module-composer.cli.modules">composer.cli.modules module</a></li> <li class="toctree-l4"><a class="reference internal" href="composer.cli.html#module-composer.cli.modules">composer.cli.modules module</a></li>
<li class="toctree-l4"><a class="reference internal" href="composer.cli.html#module-composer.cli.projects">composer.cli.projects module</a></li> <li class="toctree-l4"><a class="reference internal" href="composer.cli.html#module-composer.cli.projects">composer.cli.projects module</a></li>
<li class="toctree-l4"><a class="reference internal" href="composer.cli.html#module-composer.cli.sources">composer.cli.sources module</a></li>
<li class="toctree-l4"><a class="reference internal" href="composer.cli.html#module-composer.cli.utilities">composer.cli.utilities module</a></li> <li class="toctree-l4"><a class="reference internal" href="composer.cli.html#module-composer.cli.utilities">composer.cli.utilities module</a></li>
<li class="toctree-l4"><a class="reference internal" href="composer.cli.html#module-composer.cli">Module contents</a></li> <li class="toctree-l4"><a class="reference internal" href="composer.cli.html#module-composer.cli">Module contents</a></li>
</ul> </ul>
@ -272,7 +273,7 @@
<script type="text/javascript"> <script type="text/javascript">
var DOCUMENTATION_OPTIONS = { var DOCUMENTATION_OPTIONS = {
URL_ROOT:'./', URL_ROOT:'./',
VERSION:'29.1', VERSION:'29.6',
LANGUAGE:'None', LANGUAGE:'None',
COLLAPSE_INDEX:false, COLLAPSE_INDEX:false,
FILE_SUFFIX:'.html', FILE_SUFFIX:'.html',
@ -293,9 +294,7 @@
<script type="text/javascript"> <script type="text/javascript">
jQuery(function () { jQuery(function () {
SphinxRtdTheme.Navigation.enable(true);
SphinxRtdTheme.Navigation.enableSticky();
}); });
</script> </script>

Binary file not shown.

View File

@ -8,7 +8,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Product and Updates Images &mdash; Lorax 29.1 documentation</title> <title>Product and Updates Images &mdash; Lorax 29.6 documentation</title>
@ -59,7 +59,7 @@
<div class="version"> <div class="version">
29.1 29.6
</div> </div>
@ -222,7 +222,7 @@ command or the installpkgs paramater of <a class="reference internal" href="pylo
<script type="text/javascript"> <script type="text/javascript">
var DOCUMENTATION_OPTIONS = { var DOCUMENTATION_OPTIONS = {
URL_ROOT:'./', URL_ROOT:'./',
VERSION:'29.1', VERSION:'29.6',
LANGUAGE:'None', LANGUAGE:'None',
COLLAPSE_INDEX:false, COLLAPSE_INDEX:false,
FILE_SUFFIX:'.html', FILE_SUFFIX:'.html',
@ -243,9 +243,7 @@ command or the installpkgs paramater of <a class="reference internal" href="pylo
<script type="text/javascript"> <script type="text/javascript">
jQuery(function () { jQuery(function () {
SphinxRtdTheme.Navigation.enable(true);
SphinxRtdTheme.Navigation.enableSticky();
}); });
</script> </script>

View File

@ -8,7 +8,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Python Module Index &mdash; Lorax 29.1 documentation</title> <title>Python Module Index &mdash; Lorax 29.6 documentation</title>
@ -60,7 +60,7 @@
<div class="version"> <div class="version">
29.1 29.6
</div> </div>
@ -201,6 +201,11 @@
<td>&#160;&#160;&#160; <td>&#160;&#160;&#160;
<a href="composer.cli.html#module-composer.cli.projects"><code class="xref">composer.cli.projects</code></a></td><td> <a href="composer.cli.html#module-composer.cli.projects"><code class="xref">composer.cli.projects</code></a></td><td>
<em></em></td></tr> <em></em></td></tr>
<tr class="cg-1">
<td></td>
<td>&#160;&#160;&#160;
<a href="composer.cli.html#module-composer.cli.sources"><code class="xref">composer.cli.sources</code></a></td><td>
<em></em></td></tr>
<tr class="cg-1"> <tr class="cg-1">
<td></td> <td></td>
<td>&#160;&#160;&#160; <td>&#160;&#160;&#160;
@ -400,7 +405,7 @@
<script type="text/javascript"> <script type="text/javascript">
var DOCUMENTATION_OPTIONS = { var DOCUMENTATION_OPTIONS = {
URL_ROOT:'./', URL_ROOT:'./',
VERSION:'29.1', VERSION:'29.6',
LANGUAGE:'None', LANGUAGE:'None',
COLLAPSE_INDEX:false, COLLAPSE_INDEX:false,
FILE_SUFFIX:'.html', FILE_SUFFIX:'.html',
@ -421,9 +426,7 @@
<script type="text/javascript"> <script type="text/javascript">
jQuery(function () { jQuery(function () {
SphinxRtdTheme.Navigation.enable(true);
SphinxRtdTheme.Navigation.enableSticky();
}); });
</script> </script>

View File

@ -8,7 +8,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>pylorax.api package &mdash; Lorax 29.1 documentation</title> <title>pylorax.api package &mdash; Lorax 29.6 documentation</title>
@ -58,7 +58,7 @@
<div class="version"> <div class="version">
29.1 29.6
</div> </div>
@ -491,6 +491,28 @@ with whatever options are relevant.</p>
</table> </table>
</dd></dl> </dd></dl>
<dl class="function">
<dt id="pylorax.api.projects.delete_repo_source">
<code class="descclassname">pylorax.api.projects.</code><code class="descname">delete_repo_source</code><span class="sig-paren">(</span><em>source_glob</em>, <em>source_name</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pylorax/api/projects.html#delete_repo_source"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pylorax.api.projects.delete_repo_source" title="Permalink to this definition"></a></dt>
<dd><p>Delete a source from a repo file</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>source_glob</strong> (<a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.6)"><em>str</em></a>) A glob of the repo sources to search</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">None</td>
</tr>
<tr class="field-odd field"><th class="field-name">Raises:</th><td class="field-body">ProjectsError if there was a problem</td>
</tr>
</tbody>
</table>
<p>A repo file may have multiple sources in it, delete only the selected source.
If it is the last one in the file, delete the file.</p>
<p>WARNING: This will delete ANY source, the caller needs to ensure that a system
source_name isnt passed to it.</p>
</dd></dl>
<dl class="function"> <dl class="function">
<dt id="pylorax.api.projects.dep_evra"> <dt id="pylorax.api.projects.dep_evra">
<code class="descclassname">pylorax.api.projects.</code><code class="descname">dep_evra</code><span class="sig-paren">(</span><em>dep</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pylorax/api/projects.html#dep_evra"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pylorax.api.projects.dep_evra" title="Permalink to this definition"></a></dt> <code class="descclassname">pylorax.api.projects.</code><code class="descname">dep_evra</code><span class="sig-paren">(</span><em>dep</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pylorax/api/projects.html#dep_evra"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pylorax.api.projects.dep_evra" title="Permalink to this definition"></a></dt>
@ -515,6 +537,27 @@ with whatever options are relevant.</p>
<dd><p>Return the name-epoch:version-release.arch</p> <dd><p>Return the name-epoch:version-release.arch</p>
</dd></dl> </dd></dl>
<dl class="function">
<dt id="pylorax.api.projects.dnf_repo_to_file_repo">
<code class="descclassname">pylorax.api.projects.</code><code class="descname">dnf_repo_to_file_repo</code><span class="sig-paren">(</span><em>repo</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pylorax/api/projects.html#dnf_repo_to_file_repo"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pylorax.api.projects.dnf_repo_to_file_repo" title="Permalink to this definition"></a></dt>
<dd><p>Return a string representation of a DNF Repo object suitable for writing to a .repo file</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>repo</strong> (<em>dnf.RepoDict</em>) DNF Repository</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">A string</td>
</tr>
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.6)">str</a></td>
</tr>
</tbody>
</table>
<p>The DNF Repo.dump() function does not produce a string that can be used as a dnf .repo file,
it ouputs baseurl and gpgkey as python lists which DNF cannot read. So do this manually with
only the attributes we care about.</p>
</dd></dl>
<dl class="function"> <dl class="function">
<dt id="pylorax.api.projects.estimate_size"> <dt id="pylorax.api.projects.estimate_size">
<code class="descclassname">pylorax.api.projects.</code><code class="descname">estimate_size</code><span class="sig-paren">(</span><em>packages</em>, <em>block_size=6144</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pylorax/api/projects.html#estimate_size"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pylorax.api.projects.estimate_size" title="Permalink to this definition"></a></dt> <code class="descclassname">pylorax.api.projects.</code><code class="descname">estimate_size</code><span class="sig-paren">(</span><em>packages</em>, <em>block_size=6144</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pylorax/api/projects.html#estimate_size"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pylorax.api.projects.estimate_size" title="Permalink to this definition"></a></dt>
@ -542,6 +585,42 @@ dnf doesnt provide access to. So use the file count and block size to estimat
a minimum size for each package.</p> a minimum size for each package.</p>
</dd></dl> </dd></dl>
<dl class="function">
<dt id="pylorax.api.projects.get_repo_sources">
<code class="descclassname">pylorax.api.projects.</code><code class="descname">get_repo_sources</code><span class="sig-paren">(</span><em>source_glob</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pylorax/api/projects.html#get_repo_sources"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pylorax.api.projects.get_repo_sources" title="Permalink to this definition"></a></dt>
<dd><p>Return a list of sources from a directory of yum repositories</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>source_glob</strong> (<a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.6)"><em>str</em></a>) A glob to use to match the source files, including full path</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">A list of the source ids in all of the matching files</td>
</tr>
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body">list of str</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="function">
<dt id="pylorax.api.projects.get_source_ids">
<code class="descclassname">pylorax.api.projects.</code><code class="descname">get_source_ids</code><span class="sig-paren">(</span><em>source_path</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pylorax/api/projects.html#get_source_ids"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pylorax.api.projects.get_source_ids" title="Permalink to this definition"></a></dt>
<dd><p>Return a list of the source ids in a file</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>source_path</strong> (<a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.6)"><em>str</em></a>) Full path and filename of the source (yum repo) file</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">A list of source id strings</td>
</tr>
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body">list of str</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="function"> <dl class="function">
<dt id="pylorax.api.projects.modules_info"> <dt id="pylorax.api.projects.modules_info">
<code class="descclassname">pylorax.api.projects.</code><code class="descname">modules_info</code><span class="sig-paren">(</span><em>dbo</em>, <em>module_names</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pylorax/api/projects.html#modules_info"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pylorax.api.projects.modules_info" title="Permalink to this definition"></a></dt> <code class="descclassname">pylorax.api.projects.</code><code class="descname">modules_info</code><span class="sig-paren">(</span><em>dbo</em>, <em>module_names</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pylorax/api/projects.html#modules_info"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pylorax.api.projects.modules_info" title="Permalink to this definition"></a></dt>
@ -670,7 +749,7 @@ and sets the type to “rpm”</p>
<dl class="function"> <dl class="function">
<dt id="pylorax.api.projects.projects_depsolve"> <dt id="pylorax.api.projects.projects_depsolve">
<code class="descclassname">pylorax.api.projects.</code><code class="descname">projects_depsolve</code><span class="sig-paren">(</span><em>dbo</em>, <em>project_names</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pylorax/api/projects.html#projects_depsolve"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pylorax.api.projects.projects_depsolve" title="Permalink to this definition"></a></dt> <code class="descclassname">pylorax.api.projects.</code><code class="descname">projects_depsolve</code><span class="sig-paren">(</span><em>dbo</em>, <em>projects</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pylorax/api/projects.html#projects_depsolve"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pylorax.api.projects.projects_depsolve" title="Permalink to this definition"></a></dt>
<dd><p>Return the dependencies for a list of projects</p> <dd><p>Return the dependencies for a list of projects</p>
<table class="docutils field-list" frame="void" rules="none"> <table class="docutils field-list" frame="void" rules="none">
<col class="field-name" /> <col class="field-name" />
@ -678,14 +757,17 @@ and sets the type to “rpm”</p>
<tbody valign="top"> <tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple"> <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>dbo</strong> (<em>dnf.Base</em>) dnf base object</li> <li><strong>dbo</strong> (<em>dnf.Base</em>) dnf base object</li>
<li><strong>project_names</strong> (<em>List of Strings</em>) The projects to find the dependencies for</li> <li><strong>projects</strong> (<em>List of Strings</em>) The projects to find the dependencies for</li>
</ul> </ul>
</td> </td>
</tr> </tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">NEVRAs of the project and its dependencies</p> <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">NEVRAs of the project and its dependencies</p>
</td> </td>
</tr> </tr>
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last">list of dicts</p> <tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first">list of dicts</p>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Raises:</th><td class="field-body"><p class="first last">ProjectsError if there was a problem installing something</p>
</td> </td>
</tr> </tr>
</tbody> </tbody>
@ -694,7 +776,7 @@ and sets the type to “rpm”</p>
<dl class="function"> <dl class="function">
<dt id="pylorax.api.projects.projects_depsolve_with_size"> <dt id="pylorax.api.projects.projects_depsolve_with_size">
<code class="descclassname">pylorax.api.projects.</code><code class="descname">projects_depsolve_with_size</code><span class="sig-paren">(</span><em>dbo</em>, <em>project_names</em>, <em>with_core=True</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pylorax/api/projects.html#projects_depsolve_with_size"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pylorax.api.projects.projects_depsolve_with_size" title="Permalink to this definition"></a></dt> <code class="descclassname">pylorax.api.projects.</code><code class="descname">projects_depsolve_with_size</code><span class="sig-paren">(</span><em>dbo</em>, <em>projects</em>, <em>with_core=True</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pylorax/api/projects.html#projects_depsolve_with_size"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pylorax.api.projects.projects_depsolve_with_size" title="Permalink to this definition"></a></dt>
<dd><p>Return the dependencies and installed size for a list of projects</p> <dd><p>Return the dependencies and installed size for a list of projects</p>
<table class="docutils field-list" frame="void" rules="none"> <table class="docutils field-list" frame="void" rules="none">
<col class="field-name" /> <col class="field-name" />
@ -709,7 +791,10 @@ and sets the type to “rpm”</p>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">installed size and a list of NEVRAs of the project and its dependencies</p> <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">installed size and a list of NEVRAs of the project and its dependencies</p>
</td> </td>
</tr> </tr>
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last">tuple of (<a class="reference external" href="https://docs.python.org/3/library/functions.html#int" title="(in Python v3.6)">int</a>, list of dicts)</p> <tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first">tuple of (<a class="reference external" href="https://docs.python.org/3/library/functions.html#int" title="(in Python v3.6)">int</a>, list of dicts)</p>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Raises:</th><td class="field-body"><p class="first last">ProjectsError if there was a problem installing something</p>
</td> </td>
</tr> </tr>
</tbody> </tbody>
@ -759,6 +844,78 @@ and sets the type to “rpm”</p>
</table> </table>
</dd></dl> </dd></dl>
<dl class="function">
<dt id="pylorax.api.projects.repo_to_source">
<code class="descclassname">pylorax.api.projects.</code><code class="descname">repo_to_source</code><span class="sig-paren">(</span><em>repo</em>, <em>system_source</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pylorax/api/projects.html#repo_to_source"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pylorax.api.projects.repo_to_source" title="Permalink to this definition"></a></dt>
<dd><p>Return a Weldr Source dict created from the DNF Repository</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>repo</strong> (<em>dnf.RepoDict</em>) DNF Repository</li>
<li><strong>system_source</strong> (<a class="reference external" href="https://docs.python.org/3/library/functions.html#bool" title="(in Python v3.6)"><em>bool</em></a>) True if this source is an immutable system source</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">A dict with Weldr Source fields filled in</p>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last"><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#dict" title="(in Python v3.6)">dict</a></p>
</td>
</tr>
</tbody>
</table>
<p>Example:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="p">{</span>
<span class="s2">&quot;check_gpg&quot;</span><span class="p">:</span> <span class="n">true</span><span class="p">,</span>
<span class="s2">&quot;check_ssl&quot;</span><span class="p">:</span> <span class="n">true</span><span class="p">,</span>
<span class="s2">&quot;gpgkey_url&quot;</span><span class="p">:</span> <span class="p">[</span>
<span class="s2">&quot;file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-28-x86_64&quot;</span>
<span class="p">],</span>
<span class="s2">&quot;name&quot;</span><span class="p">:</span> <span class="s2">&quot;fedora&quot;</span><span class="p">,</span>
<span class="s2">&quot;proxy&quot;</span><span class="p">:</span> <span class="s2">&quot;http://proxy.brianlane.com:8123&quot;</span><span class="p">,</span>
<span class="s2">&quot;system&quot;</span><span class="p">:</span> <span class="n">true</span>
<span class="s2">&quot;type&quot;</span><span class="p">:</span> <span class="s2">&quot;yum-metalink&quot;</span><span class="p">,</span>
<span class="s2">&quot;url&quot;</span><span class="p">:</span> <span class="s2">&quot;https://mirrors.fedoraproject.org/metalink?repo=fedora-28&amp;arch=x86_64&quot;</span>
<span class="p">}</span>
</pre></div>
</div>
</dd></dl>
<dl class="function">
<dt id="pylorax.api.projects.source_to_repo">
<code class="descclassname">pylorax.api.projects.</code><code class="descname">source_to_repo</code><span class="sig-paren">(</span><em>source</em>, <em>dnf_conf</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pylorax/api/projects.html#source_to_repo"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pylorax.api.projects.source_to_repo" title="Permalink to this definition"></a></dt>
<dd><p>Return a dnf Repo object created from a source dict</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>source</strong> (<a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#dict" title="(in Python v3.6)"><em>dict</em></a>) A Weldr source dict</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">A dnf Repo object</td>
</tr>
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body">dnf.Repo</td>
</tr>
</tbody>
</table>
<p>Example:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="p">{</span>
<span class="s2">&quot;check_gpg&quot;</span><span class="p">:</span> <span class="kc">True</span><span class="p">,</span>
<span class="s2">&quot;check_ssl&quot;</span><span class="p">:</span> <span class="kc">True</span><span class="p">,</span>
<span class="s2">&quot;gpgkey_urls&quot;</span><span class="p">:</span> <span class="p">[</span>
<span class="s2">&quot;file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-28-x86_64&quot;</span>
<span class="p">],</span>
<span class="s2">&quot;name&quot;</span><span class="p">:</span> <span class="s2">&quot;fedora&quot;</span><span class="p">,</span>
<span class="s2">&quot;proxy&quot;</span><span class="p">:</span> <span class="s2">&quot;http://proxy.brianlane.com:8123&quot;</span><span class="p">,</span>
<span class="s2">&quot;system&quot;</span><span class="p">:</span> <span class="kc">True</span>
<span class="s2">&quot;type&quot;</span><span class="p">:</span> <span class="s2">&quot;yum-metalink&quot;</span><span class="p">,</span>
<span class="s2">&quot;url&quot;</span><span class="p">:</span> <span class="s2">&quot;https://mirrors.fedoraproject.org/metalink?repo=fedora-28&amp;arch=x86_64&quot;</span>
<span class="p">}</span>
</pre></div>
</div>
</dd></dl>
</div> </div>
<div class="section" id="module-pylorax.api.queue"> <div class="section" id="module-pylorax.api.queue">
<span id="pylorax-api-queue-module"></span><h2>pylorax.api.queue module<a class="headerlink" href="#module-pylorax.api.queue" title="Permalink to this headline"></a></h2> <span id="pylorax-api-queue-module"></span><h2>pylorax.api.queue module<a class="headerlink" href="#module-pylorax.api.queue" title="Permalink to this headline"></a></h2>
@ -1238,12 +1395,24 @@ If they are different, check and return the new version</p>
<dd><p>Return the names of the modules</p> <dd><p>Return the names of the modules</p>
</dd></dl> </dd></dl>
<dl class="attribute">
<dt id="pylorax.api.recipes.Recipe.module_nver">
<code class="descname">module_nver</code><a class="headerlink" href="#pylorax.api.recipes.Recipe.module_nver" title="Permalink to this definition"></a></dt>
<dd><p>Return the names and version globs of the modules</p>
</dd></dl>
<dl class="attribute"> <dl class="attribute">
<dt id="pylorax.api.recipes.Recipe.package_names"> <dt id="pylorax.api.recipes.Recipe.package_names">
<code class="descname">package_names</code><a class="headerlink" href="#pylorax.api.recipes.Recipe.package_names" title="Permalink to this definition"></a></dt> <code class="descname">package_names</code><a class="headerlink" href="#pylorax.api.recipes.Recipe.package_names" title="Permalink to this definition"></a></dt>
<dd><p>Return the names of the packages</p> <dd><p>Return the names of the packages</p>
</dd></dl> </dd></dl>
<dl class="attribute">
<dt id="pylorax.api.recipes.Recipe.package_nver">
<code class="descname">package_nver</code><a class="headerlink" href="#pylorax.api.recipes.Recipe.package_nver" title="Permalink to this definition"></a></dt>
<dd><p>Return the names and version globs of the packages</p>
</dd></dl>
<dl class="method"> <dl class="method">
<dt id="pylorax.api.recipes.Recipe.toml"> <dt id="pylorax.api.recipes.Recipe.toml">
<code class="descname">toml</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/pylorax/api/recipes.html#Recipe.toml"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pylorax.api.recipes.Recipe.toml" title="Permalink to this definition"></a></dt> <code class="descname">toml</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/pylorax/api/recipes.html#Recipe.toml"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pylorax.api.recipes.Recipe.toml" title="Permalink to this definition"></a></dt>
@ -2635,6 +2804,93 @@ to satisfy the request.</p>
</div> </div>
</div></blockquote> </div></blockquote>
</div> </div>
<div class="section" id="api-v0-projects-source-list">
<h4><cite>/api/v0/projects/source/list</cite><a class="headerlink" href="#api-v0-projects-source-list" title="Permalink to this headline"></a></h4>
<blockquote>
<div><p>Return the list of repositories used for depsolving and installing packages.</p>
<p>Example:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="p">{</span>
<span class="s2">&quot;sources&quot;</span><span class="p">:</span> <span class="p">[</span>
<span class="s2">&quot;fedora&quot;</span><span class="p">,</span>
<span class="s2">&quot;fedora-cisco-openh264&quot;</span><span class="p">,</span>
<span class="s2">&quot;fedora-updates-testing&quot;</span><span class="p">,</span>
<span class="s2">&quot;fedora-updates&quot;</span>
<span class="p">]</span>
<span class="p">}</span>
</pre></div>
</div>
</div></blockquote>
</div>
<div class="section" id="api-v0-projects-source-info-source-names">
<h4><cite>/api/v0/projects/source/info/&lt;source-names&gt;</cite><a class="headerlink" href="#api-v0-projects-source-info-source-names" title="Permalink to this headline"></a></h4>
<blockquote>
<div><p>Return information about the comma-separated list of source names. Or all of the
sources if * is passed. Note that general globbing is not supported, only *.</p>
<p>immutable system sources will have the “system” field set to true. User added sources
will have it set to false. System sources cannot be changed or deleted.</p>
<p>Example:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="p">{</span>
<span class="s2">&quot;errors&quot;</span><span class="p">:</span> <span class="p">[],</span>
<span class="s2">&quot;sources&quot;</span><span class="p">:</span> <span class="p">{</span>
<span class="s2">&quot;fedora&quot;</span><span class="p">:</span> <span class="p">{</span>
<span class="s2">&quot;check_gpg&quot;</span><span class="p">:</span> <span class="n">true</span><span class="p">,</span>
<span class="s2">&quot;check_ssl&quot;</span><span class="p">:</span> <span class="n">true</span><span class="p">,</span>
<span class="s2">&quot;gpgkey_urls&quot;</span><span class="p">:</span> <span class="p">[</span>
<span class="s2">&quot;file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-28-x86_64&quot;</span>
<span class="p">],</span>
<span class="s2">&quot;name&quot;</span><span class="p">:</span> <span class="s2">&quot;fedora&quot;</span><span class="p">,</span>
<span class="s2">&quot;proxy&quot;</span><span class="p">:</span> <span class="s2">&quot;http://proxy.brianlane.com:8123&quot;</span><span class="p">,</span>
<span class="s2">&quot;system&quot;</span><span class="p">:</span> <span class="n">true</span><span class="p">,</span>
<span class="s2">&quot;type&quot;</span><span class="p">:</span> <span class="s2">&quot;yum-metalink&quot;</span><span class="p">,</span>
<span class="s2">&quot;url&quot;</span><span class="p">:</span> <span class="s2">&quot;https://mirrors.fedoraproject.org/metalink?repo=fedora-28&amp;arch=x86_64&quot;</span>
<span class="p">}</span>
<span class="p">}</span>
<span class="p">}</span>
</pre></div>
</div>
</div></blockquote>
</div>
<div class="section" id="post-api-v0-projects-source-new">
<h4>POST <cite>/api/v0/projects/source/new</cite><a class="headerlink" href="#post-api-v0-projects-source-new" title="Permalink to this headline"></a></h4>
<blockquote>
<div><p>Add (or change) a source for use when depsolving blueprints and composing images.</p>
<p>The <code class="docutils literal notranslate"><span class="pre">proxy</span></code> and <code class="docutils literal notranslate"><span class="pre">gpgkey_urls</span></code> entries are optional. All of the others are required. The supported
types for the urls are:</p>
<ul class="simple">
<li><code class="docutils literal notranslate"><span class="pre">yum-baseurl</span></code> is a URL to a yum repository.</li>
<li><code class="docutils literal notranslate"><span class="pre">yum-mirrorlist</span></code> is a URL for a mirrorlist.</li>
<li><code class="docutils literal notranslate"><span class="pre">yum-metalink</span></code> is a URL for a metalink.</li>
</ul>
<p>If <code class="docutils literal notranslate"><span class="pre">check_ssl</span></code> is true the https certificates must be valid. If they are self-signed you can either set
this to false, or add your Certificate Authority to the host system.</p>
<p>If <code class="docutils literal notranslate"><span class="pre">check_gpg</span></code> is true the GPG key must either be installed on the host system, or <code class="docutils literal notranslate"><span class="pre">gpgkey_urls</span></code>
should point to it.</p>
<p>You can edit an existing source (other than system sources), by doing a POST
of the new version of the source. It will overwrite the previous one.</p>
<p>Example:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="p">{</span>
<span class="s2">&quot;name&quot;</span><span class="p">:</span> <span class="s2">&quot;custom-source-1&quot;</span><span class="p">,</span>
<span class="s2">&quot;url&quot;</span><span class="p">:</span> <span class="s2">&quot;https://url/path/to/repository/&quot;</span><span class="p">,</span>
<span class="s2">&quot;type&quot;</span><span class="p">:</span> <span class="s2">&quot;yum-baseurl&quot;</span><span class="p">,</span>
<span class="s2">&quot;check_ssl&quot;</span><span class="p">:</span> <span class="n">true</span><span class="p">,</span>
<span class="s2">&quot;check_gpg&quot;</span><span class="p">:</span> <span class="n">true</span><span class="p">,</span>
<span class="s2">&quot;gpgkey_urls&quot;</span><span class="p">:</span> <span class="p">[</span>
<span class="s2">&quot;https://url/path/to/gpg-key&quot;</span>
<span class="p">]</span>
<span class="p">}</span>
</pre></div>
</div>
</div></blockquote>
</div>
<div class="section" id="delete-api-v0-projects-source-delete-source-name">
<h4>DELETE <cite>/api/v0/projects/source/delete/&lt;source-name&gt;</cite><a class="headerlink" href="#delete-api-v0-projects-source-delete-source-name" title="Permalink to this headline"></a></h4>
<blockquote>
<div><p>Delete a user added source. This will fail if a system source is passed to
it.</p>
<p>The response will be a status response with <cite>status</cite> set to true, or an
error response with it set to false and an error message included.</p>
</div></blockquote>
</div>
<div class="section" id="api-v0-modules-list-offset-0-limit-20"> <div class="section" id="api-v0-modules-list-offset-0-limit-20">
<h4><cite>/api/v0/modules/list[?offset=0&amp;limit=20]</cite><a class="headerlink" href="#api-v0-modules-list-offset-0-limit-20" title="Permalink to this headline"></a></h4> <h4><cite>/api/v0/modules/list[?offset=0&amp;limit=20]</cite><a class="headerlink" href="#api-v0-modules-list-offset-0-limit-20" title="Permalink to this headline"></a></h4>
<blockquote> <blockquote>
@ -3214,7 +3470,7 @@ a line boundry.</p>
<script type="text/javascript"> <script type="text/javascript">
var DOCUMENTATION_OPTIONS = { var DOCUMENTATION_OPTIONS = {
URL_ROOT:'./', URL_ROOT:'./',
VERSION:'29.1', VERSION:'29.6',
LANGUAGE:'None', LANGUAGE:'None',
COLLAPSE_INDEX:false, COLLAPSE_INDEX:false,
FILE_SUFFIX:'.html', FILE_SUFFIX:'.html',
@ -3235,9 +3491,7 @@ a line boundry.</p>
<script type="text/javascript"> <script type="text/javascript">
jQuery(function () { jQuery(function () {
SphinxRtdTheme.Navigation.enable(true);
SphinxRtdTheme.Navigation.enableSticky();
}); });
</script> </script>

View File

@ -8,7 +8,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>pylorax package &mdash; Lorax 29.1 documentation</title> <title>pylorax package &mdash; Lorax 29.6 documentation</title>
@ -59,7 +59,7 @@
<div class="version"> <div class="version">
29.1 29.6
</div> </div>
@ -225,6 +225,10 @@
<li class="toctree-l4"><a class="reference internal" href="pylorax.api.html#api-v0-projects-list-offset-0-limit-20"><cite>/api/v0/projects/list[?offset=0&amp;limit=20]</cite></a></li> <li class="toctree-l4"><a class="reference internal" href="pylorax.api.html#api-v0-projects-list-offset-0-limit-20"><cite>/api/v0/projects/list[?offset=0&amp;limit=20]</cite></a></li>
<li class="toctree-l4"><a class="reference internal" href="pylorax.api.html#api-v0-projects-info-project-names"><cite>/api/v0/projects/info/&lt;project_names&gt;</cite></a></li> <li class="toctree-l4"><a class="reference internal" href="pylorax.api.html#api-v0-projects-info-project-names"><cite>/api/v0/projects/info/&lt;project_names&gt;</cite></a></li>
<li class="toctree-l4"><a class="reference internal" href="pylorax.api.html#api-v0-projects-depsolve-project-names"><cite>/api/v0/projects/depsolve/&lt;project_names&gt;</cite></a></li> <li class="toctree-l4"><a class="reference internal" href="pylorax.api.html#api-v0-projects-depsolve-project-names"><cite>/api/v0/projects/depsolve/&lt;project_names&gt;</cite></a></li>
<li class="toctree-l4"><a class="reference internal" href="pylorax.api.html#api-v0-projects-source-list"><cite>/api/v0/projects/source/list</cite></a></li>
<li class="toctree-l4"><a class="reference internal" href="pylorax.api.html#api-v0-projects-source-info-source-names"><cite>/api/v0/projects/source/info/&lt;source-names&gt;</cite></a></li>
<li class="toctree-l4"><a class="reference internal" href="pylorax.api.html#post-api-v0-projects-source-new">POST <cite>/api/v0/projects/source/new</cite></a></li>
<li class="toctree-l4"><a class="reference internal" href="pylorax.api.html#delete-api-v0-projects-source-delete-source-name">DELETE <cite>/api/v0/projects/source/delete/&lt;source-name&gt;</cite></a></li>
<li class="toctree-l4"><a class="reference internal" href="pylorax.api.html#api-v0-modules-list-offset-0-limit-20"><cite>/api/v0/modules/list[?offset=0&amp;limit=20]</cite></a></li> <li class="toctree-l4"><a class="reference internal" href="pylorax.api.html#api-v0-modules-list-offset-0-limit-20"><cite>/api/v0/modules/list[?offset=0&amp;limit=20]</cite></a></li>
<li class="toctree-l4"><a class="reference internal" href="pylorax.api.html#api-v0-modules-list-module-names-offset-0-limit-20"><cite>/api/v0/modules/list/&lt;module_names&gt;[?offset=0&amp;limit=20]</cite></a></li> <li class="toctree-l4"><a class="reference internal" href="pylorax.api.html#api-v0-modules-list-module-names-offset-0-limit-20"><cite>/api/v0/modules/list/&lt;module_names&gt;[?offset=0&amp;limit=20]</cite></a></li>
<li class="toctree-l4"><a class="reference internal" href="pylorax.api.html#api-v0-modules-info-module-names"><cite>/api/v0/modules/info/&lt;module_names&gt;</cite></a></li> <li class="toctree-l4"><a class="reference internal" href="pylorax.api.html#api-v0-modules-info-module-names"><cite>/api/v0/modules/info/&lt;module_names&gt;</cite></a></li>
@ -1418,7 +1422,7 @@ with the rest of the line as arguments</li>
<li><p class="first">Parsing and execution are <em>separate</em> passes - so you cant use the result <li><p class="first">Parsing and execution are <em>separate</em> passes - so you cant use the result
of a command in an %if statement (or any other control statements)!</p> of a command in an %if statement (or any other control statements)!</p>
</li> </li>
<li><p class="first">Commands that run external programs (systemctl, gconfset) currently use <li><p class="first">Commands that run external programs (e.g. systemctl) currently use
the <em>host</em>s copy of that program, which may cause problems if theres a the <em>host</em>s copy of that program, which may cause problems if theres a
big enough difference between the host and the image youre modifying.</p> big enough difference between the host and the image youre modifying.</p>
</li> </li>
@ -1484,20 +1488,6 @@ Examples:</p>
</dl> </dl>
</dd></dl> </dd></dl>
<dl class="method">
<dt id="pylorax.ltmpl.LoraxTemplateRunner.gconfset">
<code class="descname">gconfset</code><span class="sig-paren">(</span><em>path</em>, <em>keytype</em>, <em>value</em>, <em>outfile=None</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pylorax/ltmpl.html#LoraxTemplateRunner.gconfset"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pylorax.ltmpl.LoraxTemplateRunner.gconfset" title="Permalink to this definition"></a></dt>
<dd><dl class="docutils">
<dt>gconfset PATH KEYTYPE VALUE [OUTFILE]</dt>
<dd><p class="first">Set the given gconf PATH, with type KEYTYPE, to the given value.
OUTFILE defaults to /etc/gconf/gconf.xml.defaults if not given.
Example:</p>
<blockquote class="last">
<div>gconfset /apps/metacity/general/num_workspaces int 1</div></blockquote>
</dd>
</dl>
</dd></dl>
<dl class="method"> <dl class="method">
<dt id="pylorax.ltmpl.LoraxTemplateRunner.hardlink"> <dt id="pylorax.ltmpl.LoraxTemplateRunner.hardlink">
<code class="descname">hardlink</code><span class="sig-paren">(</span><em>src</em>, <em>dest</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pylorax/ltmpl.html#LoraxTemplateRunner.hardlink"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pylorax.ltmpl.LoraxTemplateRunner.hardlink" title="Permalink to this definition"></a></dt> <code class="descname">hardlink</code><span class="sig-paren">(</span><em>src</em>, <em>dest</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pylorax/ltmpl.html#LoraxTemplateRunner.hardlink"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pylorax.ltmpl.LoraxTemplateRunner.hardlink" title="Permalink to this definition"></a></dt>
@ -2271,7 +2261,7 @@ lowest numbered directory entry is returned.</p>
<script type="text/javascript"> <script type="text/javascript">
var DOCUMENTATION_OPTIONS = { var DOCUMENTATION_OPTIONS = {
URL_ROOT:'./', URL_ROOT:'./',
VERSION:'29.1', VERSION:'29.6',
LANGUAGE:'None', LANGUAGE:'None',
COLLAPSE_INDEX:false, COLLAPSE_INDEX:false,
FILE_SUFFIX:'.html', FILE_SUFFIX:'.html',
@ -2292,9 +2282,7 @@ lowest numbered directory entry is returned.</p>
<script type="text/javascript"> <script type="text/javascript">
jQuery(function () { jQuery(function () {
SphinxRtdTheme.Navigation.enable(true);
SphinxRtdTheme.Navigation.enableSticky();
}); });
</script> </script>

View File

@ -8,7 +8,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Search &mdash; Lorax 29.1 documentation</title> <title>Search &mdash; Lorax 29.6 documentation</title>
@ -57,7 +57,7 @@
<div class="version"> <div class="version">
29.1 29.6
</div> </div>
@ -198,7 +198,7 @@
<script type="text/javascript"> <script type="text/javascript">
var DOCUMENTATION_OPTIONS = { var DOCUMENTATION_OPTIONS = {
URL_ROOT:'./', URL_ROOT:'./',
VERSION:'29.1', VERSION:'29.6',
LANGUAGE:'None', LANGUAGE:'None',
COLLAPSE_INDEX:false, COLLAPSE_INDEX:false,
FILE_SUFFIX:'.html', FILE_SUFFIX:'.html',
@ -220,9 +220,7 @@
<script type="text/javascript"> <script type="text/javascript">
jQuery(function () { jQuery(function () {
SphinxRtdTheme.Navigation.enable(true);
SphinxRtdTheme.Navigation.enableSticky();
}); });
</script> </script>
<script type="text/javascript"> <script type="text/javascript">

File diff suppressed because one or more lines are too long