Add lorax 29.6 documentation
This commit is contained in:
parent
90168a74b9
commit
62a4487750
@ -1,4 +1,4 @@
|
||||
# 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.
|
||||
config: 05d2025242aa5b20580579fa62643e7f
|
||||
config: 4c6f9af3e5a5bd9313fae6f1efffedc1
|
||||
tags: 645f666f9bcd5a90fca523b33c5a78b7
|
||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -8,7 +8,7 @@
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<title>composer.cli — Lorax 29.1 documentation</title>
|
||||
<title>composer.cli — Lorax 29.6 documentation</title>
|
||||
|
||||
|
||||
|
||||
@ -57,7 +57,7 @@
|
||||
|
||||
|
||||
<div class="version">
|
||||
29.1
|
||||
29.6
|
||||
</div>
|
||||
|
||||
|
||||
@ -153,8 +153,7 @@
|
||||
<div itemprop="articleBody">
|
||||
|
||||
<h1>Source code for composer.cli</h1><div class="highlight"><pre>
|
||||
<span></span><span class="ch">#!/usr/bin/python</span>
|
||||
<span class="c1">#</span>
|
||||
<span></span><span class="c1">#</span>
|
||||
<span class="c1"># composer-cli</span>
|
||||
<span class="c1">#</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.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.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="s2">"blueprints"</span><span class="p">:</span> <span class="n">blueprints_cmd</span><span class="p">,</span>
|
||||
<span class="s2">"modules"</span><span class="p">:</span> <span class="n">modules_cmd</span><span class="p">,</span>
|
||||
<span class="s2">"projects"</span><span class="p">:</span> <span class="n">projects_cmd</span><span class="p">,</span>
|
||||
<span class="s2">"compose"</span><span class="p">:</span> <span class="n">compose_cmd</span>
|
||||
<span class="s2">"compose"</span><span class="p">:</span> <span class="n">compose_cmd</span><span class="p">,</span>
|
||||
<span class="s2">"sources"</span><span class="p">:</span> <span class="n">sources_cmd</span>
|
||||
<span class="p">}</span>
|
||||
|
||||
|
||||
@ -243,7 +244,7 @@
|
||||
<script type="text/javascript">
|
||||
var DOCUMENTATION_OPTIONS = {
|
||||
URL_ROOT:'../../',
|
||||
VERSION:'29.1',
|
||||
VERSION:'29.6',
|
||||
LANGUAGE:'None',
|
||||
COLLAPSE_INDEX:false,
|
||||
FILE_SUFFIX:'.html',
|
||||
@ -264,9 +265,7 @@
|
||||
|
||||
<script type="text/javascript">
|
||||
jQuery(function () {
|
||||
|
||||
SphinxRtdTheme.Navigation.enableSticky();
|
||||
|
||||
SphinxRtdTheme.Navigation.enable(true);
|
||||
});
|
||||
</script>
|
||||
|
||||
|
@ -8,7 +8,7 @@
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<title>composer.cli.blueprints — Lorax 29.1 documentation</title>
|
||||
<title>composer.cli.blueprints — Lorax 29.6 documentation</title>
|
||||
|
||||
|
||||
|
||||
@ -57,7 +57,7 @@
|
||||
|
||||
|
||||
<div class="version">
|
||||
29.1
|
||||
29.6
|
||||
</div>
|
||||
|
||||
|
||||
@ -709,7 +709,7 @@
|
||||
<script type="text/javascript">
|
||||
var DOCUMENTATION_OPTIONS = {
|
||||
URL_ROOT:'../../../',
|
||||
VERSION:'29.1',
|
||||
VERSION:'29.6',
|
||||
LANGUAGE:'None',
|
||||
COLLAPSE_INDEX:false,
|
||||
FILE_SUFFIX:'.html',
|
||||
@ -730,9 +730,7 @@
|
||||
|
||||
<script type="text/javascript">
|
||||
jQuery(function () {
|
||||
|
||||
SphinxRtdTheme.Navigation.enableSticky();
|
||||
|
||||
SphinxRtdTheme.Navigation.enable(true);
|
||||
});
|
||||
</script>
|
||||
|
||||
|
@ -8,7 +8,7 @@
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<title>composer.cli.cmdline — Lorax 29.1 documentation</title>
|
||||
<title>composer.cli.cmdline — Lorax 29.6 documentation</title>
|
||||
|
||||
|
||||
|
||||
@ -57,7 +57,7 @@
|
||||
|
||||
|
||||
<div class="version">
|
||||
29.1
|
||||
29.6
|
||||
</div>
|
||||
|
||||
|
||||
@ -267,6 +267,20 @@
|
||||
<span class="s2">projects info <PROJECT,...></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 <SOURCE-NAME,...></span>
|
||||
<span class="s2"> Details about the source.</span>
|
||||
|
||||
<span class="s2">sources add <SOURCE.TOML></span>
|
||||
<span class="s2"> Add a package source to the server.</span>
|
||||
|
||||
<span class="s2">sources change <SOURCE.TOML></span>
|
||||
<span class="s2"> Change an existing source</span>
|
||||
|
||||
<span class="s2">sources delete <SOURCE-NAME></span>
|
||||
<span class="s2"> Delete a package source.</span>
|
||||
<span class="s2">"""</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">
|
||||
var DOCUMENTATION_OPTIONS = {
|
||||
URL_ROOT:'../../../',
|
||||
VERSION:'29.1',
|
||||
VERSION:'29.6',
|
||||
LANGUAGE:'None',
|
||||
COLLAPSE_INDEX:false,
|
||||
FILE_SUFFIX:'.html',
|
||||
@ -349,9 +363,7 @@
|
||||
|
||||
<script type="text/javascript">
|
||||
jQuery(function () {
|
||||
|
||||
SphinxRtdTheme.Navigation.enableSticky();
|
||||
|
||||
SphinxRtdTheme.Navigation.enable(true);
|
||||
});
|
||||
</script>
|
||||
|
||||
|
@ -8,7 +8,7 @@
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<title>composer.cli.compose — Lorax 29.1 documentation</title>
|
||||
<title>composer.cli.compose — Lorax 29.6 documentation</title>
|
||||
|
||||
|
||||
|
||||
@ -57,7 +57,7 @@
|
||||
|
||||
|
||||
<div class="version">
|
||||
29.1
|
||||
29.6
|
||||
</div>
|
||||
|
||||
|
||||
@ -646,7 +646,7 @@
|
||||
<script type="text/javascript">
|
||||
var DOCUMENTATION_OPTIONS = {
|
||||
URL_ROOT:'../../../',
|
||||
VERSION:'29.1',
|
||||
VERSION:'29.6',
|
||||
LANGUAGE:'None',
|
||||
COLLAPSE_INDEX:false,
|
||||
FILE_SUFFIX:'.html',
|
||||
@ -667,9 +667,7 @@
|
||||
|
||||
<script type="text/javascript">
|
||||
jQuery(function () {
|
||||
|
||||
SphinxRtdTheme.Navigation.enableSticky();
|
||||
|
||||
SphinxRtdTheme.Navigation.enable(true);
|
||||
});
|
||||
</script>
|
||||
|
||||
|
@ -8,7 +8,7 @@
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<title>composer.cli.modules — Lorax 29.1 documentation</title>
|
||||
<title>composer.cli.modules — Lorax 29.6 documentation</title>
|
||||
|
||||
|
||||
|
||||
@ -57,7 +57,7 @@
|
||||
|
||||
|
||||
<div class="version">
|
||||
29.1
|
||||
29.6
|
||||
</div>
|
||||
|
||||
|
||||
@ -233,7 +233,7 @@
|
||||
<script type="text/javascript">
|
||||
var DOCUMENTATION_OPTIONS = {
|
||||
URL_ROOT:'../../../',
|
||||
VERSION:'29.1',
|
||||
VERSION:'29.6',
|
||||
LANGUAGE:'None',
|
||||
COLLAPSE_INDEX:false,
|
||||
FILE_SUFFIX:'.html',
|
||||
@ -254,9 +254,7 @@
|
||||
|
||||
<script type="text/javascript">
|
||||
jQuery(function () {
|
||||
|
||||
SphinxRtdTheme.Navigation.enableSticky();
|
||||
|
||||
SphinxRtdTheme.Navigation.enable(true);
|
||||
});
|
||||
</script>
|
||||
|
||||
|
@ -8,7 +8,7 @@
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<title>composer.cli.projects — Lorax 29.1 documentation</title>
|
||||
<title>composer.cli.projects — Lorax 29.6 documentation</title>
|
||||
|
||||
|
||||
|
||||
@ -57,7 +57,7 @@
|
||||
|
||||
|
||||
<div class="version">
|
||||
29.1
|
||||
29.6
|
||||
</div>
|
||||
|
||||
|
||||
@ -295,7 +295,7 @@
|
||||
<script type="text/javascript">
|
||||
var DOCUMENTATION_OPTIONS = {
|
||||
URL_ROOT:'../../../',
|
||||
VERSION:'29.1',
|
||||
VERSION:'29.6',
|
||||
LANGUAGE:'None',
|
||||
COLLAPSE_INDEX:false,
|
||||
FILE_SUFFIX:'.html',
|
||||
@ -316,9 +316,7 @@
|
||||
|
||||
<script type="text/javascript">
|
||||
jQuery(function () {
|
||||
|
||||
SphinxRtdTheme.Navigation.enableSticky();
|
||||
|
||||
SphinxRtdTheme.Navigation.enable(true);
|
||||
});
|
||||
</script>
|
||||
|
||||
|
361
_modules/composer/cli/sources.html
Normal file
361
_modules/composer/cli/sources.html
Normal 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 — 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> »</li>
|
||||
|
||||
<li><a href="../../index.html">Module code</a> »</li>
|
||||
|
||||
<li><a href="../cli.html">composer.cli</a> »</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 <http://www.gnu.org/licenses/>.</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">"composer-cli"</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">"""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"> """</span>
|
||||
<span class="n">cmd_map</span> <span class="o">=</span> <span class="p">{</span>
|
||||
<span class="s2">"list"</span><span class="p">:</span> <span class="n">sources_list</span><span class="p">,</span>
|
||||
<span class="s2">"info"</span><span class="p">:</span> <span class="n">sources_info</span><span class="p">,</span>
|
||||
<span class="s2">"add"</span><span class="p">:</span> <span class="n">sources_add</span><span class="p">,</span>
|
||||
<span class="s2">"change"</span><span class="p">:</span> <span class="n">sources_add</span><span class="p">,</span>
|
||||
<span class="s2">"delete"</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">"Unknown sources command: </span><span class="si">%s</span><span class="s2">"</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">"""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. "0"</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"> """</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">"/projects/source/list"</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">"Sources: </span><span class="si">%s</span><span class="s2">"</span> <span class="o">%</span> <span class="s2">", "</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">"sources"</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">"""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. "0"</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 <source-name></span>
|
||||
<span class="sd"> """</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">"sources info is missing the name of the source"</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">"/projects/source/info/</span><span class="si">%s</span><span class="s2">"</span> <span class="o">%</span> <span class="s2">","</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">"/projects/source/info/</span><span class="si">%s</span><span class="s2">?format=toml"</span> <span class="o">%</span> <span class="s2">","</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">"""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. "0"</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 <source.toml></span>
|
||||
<span class="sd"> """</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">"/projects/source/new"</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">"Missing source file: </span><span class="si">%s</span><span class="s2">"</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">"r"</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">"""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. "0"</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 <source-name></span>
|
||||
<span class="sd"> """</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">"/projects/source/delete/</span><span class="si">%s</span><span class="s2">"</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>
|
||||
© 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>
|
@ -8,7 +8,7 @@
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<title>composer.cli.utilities — Lorax 29.1 documentation</title>
|
||||
<title>composer.cli.utilities — Lorax 29.6 documentation</title>
|
||||
|
||||
|
||||
|
||||
@ -57,7 +57,7 @@
|
||||
|
||||
|
||||
<div class="version">
|
||||
29.1
|
||||
29.6
|
||||
</div>
|
||||
|
||||
|
||||
@ -273,7 +273,7 @@
|
||||
<script type="text/javascript">
|
||||
var DOCUMENTATION_OPTIONS = {
|
||||
URL_ROOT:'../../../',
|
||||
VERSION:'29.1',
|
||||
VERSION:'29.6',
|
||||
LANGUAGE:'None',
|
||||
COLLAPSE_INDEX:false,
|
||||
FILE_SUFFIX:'.html',
|
||||
@ -294,9 +294,7 @@
|
||||
|
||||
<script type="text/javascript">
|
||||
jQuery(function () {
|
||||
|
||||
SphinxRtdTheme.Navigation.enableSticky();
|
||||
|
||||
SphinxRtdTheme.Navigation.enable(true);
|
||||
});
|
||||
</script>
|
||||
|
||||
|
@ -8,7 +8,7 @@
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<title>composer.http_client — Lorax 29.1 documentation</title>
|
||||
<title>composer.http_client — Lorax 29.6 documentation</title>
|
||||
|
||||
|
||||
|
||||
@ -57,7 +57,7 @@
|
||||
|
||||
|
||||
<div class="version">
|
||||
29.1
|
||||
29.6
|
||||
</div>
|
||||
|
||||
|
||||
@ -388,7 +388,7 @@
|
||||
<script type="text/javascript">
|
||||
var DOCUMENTATION_OPTIONS = {
|
||||
URL_ROOT:'../../',
|
||||
VERSION:'29.1',
|
||||
VERSION:'29.6',
|
||||
LANGUAGE:'None',
|
||||
COLLAPSE_INDEX:false,
|
||||
FILE_SUFFIX:'.html',
|
||||
@ -409,9 +409,7 @@
|
||||
|
||||
<script type="text/javascript">
|
||||
jQuery(function () {
|
||||
|
||||
SphinxRtdTheme.Navigation.enableSticky();
|
||||
|
||||
SphinxRtdTheme.Navigation.enable(true);
|
||||
});
|
||||
</script>
|
||||
|
||||
|
@ -8,7 +8,7 @@
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<title>composer.unix_socket — Lorax 29.1 documentation</title>
|
||||
<title>composer.unix_socket — Lorax 29.6 documentation</title>
|
||||
|
||||
|
||||
|
||||
@ -57,7 +57,7 @@
|
||||
|
||||
|
||||
<div class="version">
|
||||
29.1
|
||||
29.6
|
||||
</div>
|
||||
|
||||
|
||||
@ -248,7 +248,7 @@
|
||||
<script type="text/javascript">
|
||||
var DOCUMENTATION_OPTIONS = {
|
||||
URL_ROOT:'../../',
|
||||
VERSION:'29.1',
|
||||
VERSION:'29.6',
|
||||
LANGUAGE:'None',
|
||||
COLLAPSE_INDEX:false,
|
||||
FILE_SUFFIX:'.html',
|
||||
@ -269,9 +269,7 @@
|
||||
|
||||
<script type="text/javascript">
|
||||
jQuery(function () {
|
||||
|
||||
SphinxRtdTheme.Navigation.enableSticky();
|
||||
|
||||
SphinxRtdTheme.Navigation.enable(true);
|
||||
});
|
||||
</script>
|
||||
|
||||
|
@ -8,7 +8,7 @@
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<title>Overview: module code — Lorax 29.1 documentation</title>
|
||||
<title>Overview: module code — Lorax 29.6 documentation</title>
|
||||
|
||||
|
||||
|
||||
@ -57,7 +57,7 @@
|
||||
|
||||
|
||||
<div class="version">
|
||||
29.1
|
||||
29.6
|
||||
</div>
|
||||
|
||||
|
||||
@ -157,6 +157,7 @@
|
||||
<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/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>
|
||||
</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>
|
||||
@ -221,7 +222,7 @@
|
||||
<script type="text/javascript">
|
||||
var DOCUMENTATION_OPTIONS = {
|
||||
URL_ROOT:'../',
|
||||
VERSION:'29.1',
|
||||
VERSION:'29.6',
|
||||
LANGUAGE:'None',
|
||||
COLLAPSE_INDEX:false,
|
||||
FILE_SUFFIX:'.html',
|
||||
@ -242,9 +243,7 @@
|
||||
|
||||
<script type="text/javascript">
|
||||
jQuery(function () {
|
||||
|
||||
SphinxRtdTheme.Navigation.enableSticky();
|
||||
|
||||
SphinxRtdTheme.Navigation.enable(true);
|
||||
});
|
||||
</script>
|
||||
|
||||
|
@ -8,7 +8,7 @@
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<title>pylorax — Lorax 29.1 documentation</title>
|
||||
<title>pylorax — Lorax 29.6 documentation</title>
|
||||
|
||||
|
||||
|
||||
@ -57,7 +57,7 @@
|
||||
|
||||
|
||||
<div class="version">
|
||||
29.1
|
||||
29.6
|
||||
</div>
|
||||
|
||||
|
||||
@ -631,7 +631,7 @@
|
||||
<script type="text/javascript">
|
||||
var DOCUMENTATION_OPTIONS = {
|
||||
URL_ROOT:'../',
|
||||
VERSION:'29.1',
|
||||
VERSION:'29.6',
|
||||
LANGUAGE:'None',
|
||||
COLLAPSE_INDEX:false,
|
||||
FILE_SUFFIX:'.html',
|
||||
@ -652,9 +652,7 @@
|
||||
|
||||
<script type="text/javascript">
|
||||
jQuery(function () {
|
||||
|
||||
SphinxRtdTheme.Navigation.enableSticky();
|
||||
|
||||
SphinxRtdTheme.Navigation.enable(true);
|
||||
});
|
||||
</script>
|
||||
|
||||
|
@ -8,7 +8,7 @@
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<title>pylorax.api.cmdline — Lorax 29.1 documentation</title>
|
||||
<title>pylorax.api.cmdline — Lorax 29.6 documentation</title>
|
||||
|
||||
|
||||
|
||||
@ -57,7 +57,7 @@
|
||||
|
||||
|
||||
<div class="version">
|
||||
29.1
|
||||
29.6
|
||||
</div>
|
||||
|
||||
|
||||
@ -247,7 +247,7 @@
|
||||
<script type="text/javascript">
|
||||
var DOCUMENTATION_OPTIONS = {
|
||||
URL_ROOT:'../../../',
|
||||
VERSION:'29.1',
|
||||
VERSION:'29.6',
|
||||
LANGUAGE:'None',
|
||||
COLLAPSE_INDEX:false,
|
||||
FILE_SUFFIX:'.html',
|
||||
@ -268,9 +268,7 @@
|
||||
|
||||
<script type="text/javascript">
|
||||
jQuery(function () {
|
||||
|
||||
SphinxRtdTheme.Navigation.enableSticky();
|
||||
|
||||
SphinxRtdTheme.Navigation.enable(true);
|
||||
});
|
||||
</script>
|
||||
|
||||
|
@ -8,7 +8,7 @@
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<title>pylorax.api.compose — Lorax 29.1 documentation</title>
|
||||
<title>pylorax.api.compose — Lorax 29.6 documentation</title>
|
||||
|
||||
|
||||
|
||||
@ -57,7 +57,7 @@
|
||||
|
||||
|
||||
<div class="version">
|
||||
29.1
|
||||
29.6
|
||||
</div>
|
||||
|
||||
|
||||
@ -380,9 +380,9 @@
|
||||
|
||||
<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="n">module_names</span> <span class="o">=</span> <span class="p">[</span><span class="n">m</span><span class="p">[</span><span class="s2">"name"</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">"modules"</span><span class="p">]</span> <span class="ow">or</span> <span class="p">[]]</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">"name"</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">"packages"</span><span class="p">]</span> <span class="ow">or</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_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">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_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_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="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>
|
||||
@ -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</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">"</span><span class="se">\n</span><span class="si">%e</span><span class="s2">nd</span><span class="se">\n</span><span class="s2">"</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">"*"</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">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="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">"start_build depsolve: </span><span class="si">%s</span><span class="s2">"</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">
|
||||
var DOCUMENTATION_OPTIONS = {
|
||||
URL_ROOT:'../../../',
|
||||
VERSION:'29.1',
|
||||
VERSION:'29.6',
|
||||
LANGUAGE:'None',
|
||||
COLLAPSE_INDEX:false,
|
||||
FILE_SUFFIX:'.html',
|
||||
@ -718,9 +719,7 @@
|
||||
|
||||
<script type="text/javascript">
|
||||
jQuery(function () {
|
||||
|
||||
SphinxRtdTheme.Navigation.enableSticky();
|
||||
|
||||
SphinxRtdTheme.Navigation.enable(true);
|
||||
});
|
||||
</script>
|
||||
|
||||
|
@ -8,7 +8,7 @@
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<title>pylorax.api.config — Lorax 29.1 documentation</title>
|
||||
<title>pylorax.api.config — Lorax 29.6 documentation</title>
|
||||
|
||||
|
||||
|
||||
@ -57,7 +57,7 @@
|
||||
|
||||
|
||||
<div class="version">
|
||||
29.1
|
||||
29.6
|
||||
</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">"composer"</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">"composer"</span><span class="p">,</span> <span class="s2">"share_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">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">"/usr/share/lorax/"</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">"composer"</span><span class="p">,</span> <span class="s2">"lib_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">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">"/var/lib/lorax/composer/"</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">"composer"</span><span class="p">,</span> <span class="s2">"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">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">"/var/lib/lorax/composer/repos.d/"</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">"composer"</span><span class="p">,</span> <span class="s2">"dnf_conf"</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">"/var/tmp/composer/dnf.conf"</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">"composer"</span><span class="p">,</span> <span class="s2">"dnf_root"</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">"/var/tmp/composer/dnf/root/"</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">"composer"</span><span class="p">,</span> <span class="s2">"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">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">"/var/tmp/composer/repos.d/"</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">"composer"</span><span class="p">,</span> <span class="s2">"cache_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">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">"/var/tmp/composer/cache/"</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">"composer"</span><span class="p">,</span> <span class="s2">"tmp"</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">"/var/tmp/"</span><span class="p">)))</span>
|
||||
|
||||
@ -232,8 +232,11 @@
|
||||
<span class="sd"> :returns: None</span>
|
||||
<span class="sd"> """</span>
|
||||
<span class="k">for</span> <span class="n">p</span> <span class="ow">in</span> <span class="p">[</span><span class="s2">"dnf_conf"</span><span class="p">,</span> <span class="s2">"repo_dir"</span><span class="p">,</span> <span class="s2">"cache_dir"</span><span class="p">,</span> <span class="s2">"dnf_root"</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">"composer"</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="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">"composer"</span><span class="p">,</span> <span class="n">p</span><span class="p">))</span>
|
||||
<span class="k">if</span> <span class="n">p</span> <span class="o">==</span> <span class="s2">"dnf_conf"</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>
|
||||
|
||||
<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">
|
||||
var DOCUMENTATION_OPTIONS = {
|
||||
URL_ROOT:'../../../',
|
||||
VERSION:'29.1',
|
||||
VERSION:'29.6',
|
||||
LANGUAGE:'None',
|
||||
COLLAPSE_INDEX:false,
|
||||
FILE_SUFFIX:'.html',
|
||||
@ -320,9 +323,7 @@
|
||||
|
||||
<script type="text/javascript">
|
||||
jQuery(function () {
|
||||
|
||||
SphinxRtdTheme.Navigation.enableSticky();
|
||||
|
||||
SphinxRtdTheme.Navigation.enable(true);
|
||||
});
|
||||
</script>
|
||||
|
||||
|
@ -8,7 +8,7 @@
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<title>pylorax.api.crossdomain — Lorax 29.1 documentation</title>
|
||||
<title>pylorax.api.crossdomain — Lorax 29.6 documentation</title>
|
||||
|
||||
|
||||
|
||||
@ -57,7 +57,7 @@
|
||||
|
||||
|
||||
<div class="version">
|
||||
29.1
|
||||
29.6
|
||||
</div>
|
||||
|
||||
|
||||
@ -253,7 +253,7 @@
|
||||
<script type="text/javascript">
|
||||
var DOCUMENTATION_OPTIONS = {
|
||||
URL_ROOT:'../../../',
|
||||
VERSION:'29.1',
|
||||
VERSION:'29.6',
|
||||
LANGUAGE:'None',
|
||||
COLLAPSE_INDEX:false,
|
||||
FILE_SUFFIX:'.html',
|
||||
@ -274,9 +274,7 @@
|
||||
|
||||
<script type="text/javascript">
|
||||
jQuery(function () {
|
||||
|
||||
SphinxRtdTheme.Navigation.enableSticky();
|
||||
|
||||
SphinxRtdTheme.Navigation.enable(true);
|
||||
});
|
||||
</script>
|
||||
|
||||
|
@ -8,7 +8,7 @@
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<title>pylorax.api.projects — Lorax 29.1 documentation</title>
|
||||
<title>pylorax.api.projects — Lorax 29.6 documentation</title>
|
||||
|
||||
|
||||
|
||||
@ -57,7 +57,7 @@
|
||||
|
||||
|
||||
<div class="version">
|
||||
29.1
|
||||
29.6
|
||||
</div>
|
||||
|
||||
|
||||
@ -174,7 +174,10 @@
|
||||
<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">"lorax-composer"</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">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="n">TIME_FORMAT</span> <span class="o">=</span> <span class="s2">"%Y-%m-</span><span class="si">%d</span><span class="s2">T%H:%M:%S"</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="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">"name"</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">"""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"> """</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">"*"</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">"No match for </span><span class="si">%s</span><span class="s2">-</span><span class="si">%s</span><span class="s2">"</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">"No match for </span><span class="si">%s</span><span class="s2">-</span><span class="si">%s</span><span class="s2">"</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">"""Return the dependencies for a list of projects</span>
|
||||
|
||||
<span class="sd"> :param dbo: dnf base object</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"> :type project_names: List of Strings</span>
|
||||
<span class="sd"> :param projects: The projects to find the dependencies for</span>
|
||||
<span class="sd"> :type projects: List of Strings</span>
|
||||
<span class="sd"> :returns: NEVRA's of the project and its dependencies</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"> """</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">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">"No match for </span><span class="si">%s</span><span class="s2">"</span> <span class="o">%</span> <span class="n">p</span><span class="p">)</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="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="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">"There was a problem depsolving </span><span class="si">%s</span><span class="s2">: </span><span class="si">%s</span><span class="s2">"</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">"There was a problem depsolving </span><span class="si">%s</span><span class="s2">: </span><span class="si">%s</span><span class="s2">"</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">return</span> <span class="p">[]</span>
|
||||
@ -387,7 +411,7 @@
|
||||
<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">"""Return the dependencies and installed size for a list of projects</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"> :returns: installed size and a list of NEVRA's of the project and its dependencies</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"> """</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">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">"No match for </span><span class="si">%s</span><span class="s2">"</span> <span class="o">%</span> <span class="n">p</span><span class="p">)</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="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">"core"</span><span class="p">,</span> <span class="p">[</span><span class="s1">'mandatory'</span><span class="p">,</span> <span class="s1">'default'</span><span class="p">,</span> <span class="s1">'optional'</span><span class="p">])</span>
|
||||
@ -411,7 +430,7 @@
|
||||
<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="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">"There was a problem depsolving </span><span class="si">%s</span><span class="s2">: </span><span class="si">%s</span><span class="s2">"</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">"There was a problem depsolving </span><span class="si">%s</span><span class="s2">: </span><span class="si">%s</span><span class="s2">"</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">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="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">"dependencies"</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">"name"</span><span class="p">]])</span>
|
||||
<span class="n">module</span><span class="p">[</span><span class="s2">"dependencies"</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">"name"</span><span class="p">],</span> <span class="s2">"*.*"</span><span class="p">)])</span>
|
||||
|
||||
<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">"""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"> """</span>
|
||||
<span class="n">repo_str</span> <span class="o">=</span> <span class="s2">"[</span><span class="si">%s</span><span class="s2">]</span><span class="se">\n</span><span class="s2">"</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">"metalink = </span><span class="si">%s</span><span class="se">\n</span><span class="s2">"</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">"mirrorlist = </span><span class="si">%s</span><span class="se">\n</span><span class="s2">"</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">"baseurl = </span><span class="si">%s</span><span class="se">\n</span><span class="s2">"</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">"Repo has no baseurl, metalink, or mirrorlist"</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">"proxy = </span><span class="si">%s</span><span class="se">\n</span><span class="s2">"</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">"sslverify = </span><span class="si">%s</span><span class="se">\n</span><span class="s2">"</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">"gpgcheck = </span><span class="si">%s</span><span class="se">\n</span><span class="s2">"</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">"gpgkey = </span><span class="si">%s</span><span class="se">\n</span><span class="s2">"</span> <span class="o">%</span> <span class="s2">","</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">"""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"> "check_gpg": true,</span>
|
||||
<span class="sd"> "check_ssl": true,</span>
|
||||
<span class="sd"> "gpgkey_url": [</span>
|
||||
<span class="sd"> "file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-28-x86_64"</span>
|
||||
<span class="sd"> ],</span>
|
||||
<span class="sd"> "name": "fedora",</span>
|
||||
<span class="sd"> "proxy": "http://proxy.brianlane.com:8123",</span>
|
||||
<span class="sd"> "system": true</span>
|
||||
<span class="sd"> "type": "yum-metalink",</span>
|
||||
<span class="sd"> "url": "https://mirrors.fedoraproject.org/metalink?repo=fedora-28&arch=x86_64"</span>
|
||||
<span class="sd"> }</span>
|
||||
|
||||
<span class="sd"> """</span>
|
||||
<span class="n">source</span> <span class="o">=</span> <span class="p">{</span><span class="s2">"name"</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">"system"</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">"url"</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">"type"</span><span class="p">]</span> <span class="o">=</span> <span class="s2">"yum-baseurl"</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">"url"</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">"type"</span><span class="p">]</span> <span class="o">=</span> <span class="s2">"yum-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">source</span><span class="p">[</span><span class="s2">"url"</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">"type"</span><span class="p">]</span> <span class="o">=</span> <span class="s2">"yum-mirrorlist"</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">"Repo has no baseurl, metalink, or mirrorlist"</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">"proxy"</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">"check_ssl"</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">"check_ssl"</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">"check_gpg"</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">"check_gpg"</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">"gpgkey_urls"</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">"""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"> "check_gpg": True,</span>
|
||||
<span class="sd"> "check_ssl": True,</span>
|
||||
<span class="sd"> "gpgkey_urls": [</span>
|
||||
<span class="sd"> "file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-28-x86_64"</span>
|
||||
<span class="sd"> ],</span>
|
||||
<span class="sd"> "name": "fedora",</span>
|
||||
<span class="sd"> "proxy": "http://proxy.brianlane.com:8123",</span>
|
||||
<span class="sd"> "system": True</span>
|
||||
<span class="sd"> "type": "yum-metalink",</span>
|
||||
<span class="sd"> "url": "https://mirrors.fedoraproject.org/metalink?repo=fedora-28&arch=x86_64"</span>
|
||||
<span class="sd"> }</span>
|
||||
|
||||
<span class="sd"> """</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">"name"</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">"type"</span><span class="p">]</span> <span class="o">==</span> <span class="s2">"yum-baseurl"</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">"url"</span><span class="p">]</span>
|
||||
<span class="k">elif</span> <span class="n">source</span><span class="p">[</span><span class="s2">"type"</span><span class="p">]</span> <span class="o">==</span> <span class="s2">"yum-metalink"</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">"url"</span><span class="p">]</span>
|
||||
<span class="k">elif</span> <span class="n">source</span><span class="p">[</span><span class="s2">"type"</span><span class="p">]</span> <span class="o">==</span> <span class="s2">"yum-mirrorlist"</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">"url"</span><span class="p">]</span>
|
||||
|
||||
<span class="k">if</span> <span class="s2">"proxy"</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">"proxy"</span><span class="p">]</span>
|
||||
|
||||
<span class="k">if</span> <span class="n">source</span><span class="p">[</span><span class="s2">"check_ssl"</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">"check_gpg"</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">"gpgkey_urls"</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">","</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">"gpgkey_urls"</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">"""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"> """</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">"""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"> """</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">"""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't passed to it.</span>
|
||||
<span class="sd"> """</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">></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">"w"</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">"Problem deleting repo source </span><span class="si">%s</span><span class="s2">: </span><span class="si">%s</span><span class="s2">"</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">"source </span><span class="si">%s</span><span class="s2"> not found"</span> <span class="o">%</span> <span class="n">source_name</span><span class="p">)</span></div>
|
||||
</pre></div>
|
||||
|
||||
</div>
|
||||
@ -493,7 +721,7 @@
|
||||
<script type="text/javascript">
|
||||
var DOCUMENTATION_OPTIONS = {
|
||||
URL_ROOT:'../../../',
|
||||
VERSION:'29.1',
|
||||
VERSION:'29.6',
|
||||
LANGUAGE:'None',
|
||||
COLLAPSE_INDEX:false,
|
||||
FILE_SUFFIX:'.html',
|
||||
@ -514,9 +742,7 @@
|
||||
|
||||
<script type="text/javascript">
|
||||
jQuery(function () {
|
||||
|
||||
SphinxRtdTheme.Navigation.enableSticky();
|
||||
|
||||
SphinxRtdTheme.Navigation.enable(true);
|
||||
});
|
||||
</script>
|
||||
|
||||
|
@ -8,7 +8,7 @@
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<title>pylorax.api.queue — Lorax 29.1 documentation</title>
|
||||
<title>pylorax.api.queue — Lorax 29.6 documentation</title>
|
||||
|
||||
|
||||
|
||||
@ -57,7 +57,7 @@
|
||||
|
||||
|
||||
<div class="version">
|
||||
29.1
|
||||
29.6
|
||||
</div>
|
||||
|
||||
|
||||
@ -247,7 +247,7 @@
|
||||
<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="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="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">"queue/new"</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">"queue/run"</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">"TEST"</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="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="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">"r"</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>
|
||||
@ -805,7 +805,7 @@
|
||||
<script type="text/javascript">
|
||||
var DOCUMENTATION_OPTIONS = {
|
||||
URL_ROOT:'../../../',
|
||||
VERSION:'29.1',
|
||||
VERSION:'29.6',
|
||||
LANGUAGE:'None',
|
||||
COLLAPSE_INDEX:false,
|
||||
FILE_SUFFIX:'.html',
|
||||
@ -826,9 +826,7 @@
|
||||
|
||||
<script type="text/javascript">
|
||||
jQuery(function () {
|
||||
|
||||
SphinxRtdTheme.Navigation.enableSticky();
|
||||
|
||||
SphinxRtdTheme.Navigation.enable(true);
|
||||
});
|
||||
</script>
|
||||
|
||||
|
@ -8,7 +8,7 @@
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<title>pylorax.api.recipes — Lorax 29.1 documentation</title>
|
||||
<title>pylorax.api.recipes — Lorax 29.6 documentation</title>
|
||||
|
||||
|
||||
|
||||
@ -57,7 +57,7 @@
|
||||
|
||||
|
||||
<div class="version">
|
||||
29.1
|
||||
29.6
|
||||
</div>
|
||||
|
||||
|
||||
@ -230,11 +230,21 @@
|
||||
<span class="sd">"""Return the names of the packages"""</span>
|
||||
<span class="k">return</span> <span class="p">[</span><span class="n">p</span><span class="p">[</span><span class="s2">"name"</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">"packages"</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">"""Return the names and version globs of the packages"""</span>
|
||||
<span class="k">return</span> <span class="p">[(</span><span class="n">p</span><span class="p">[</span><span class="s2">"name"</span><span class="p">],</span> <span class="n">p</span><span class="p">[</span><span class="s2">"version"</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">"packages"</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_names</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
|
||||
<span class="sd">"""Return the names of the modules"""</span>
|
||||
<span class="k">return</span> <span class="p">[</span><span class="n">m</span><span class="p">[</span><span class="s2">"name"</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">"modules"</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">"""Return the names and version globs of the modules"""</span>
|
||||
<span class="k">return</span> <span class="p">[(</span><span class="n">m</span><span class="p">[</span><span class="s2">"name"</span><span class="p">],</span> <span class="n">m</span><span class="p">[</span><span class="s2">"version"</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">"modules"</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">filename</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
|
||||
<span class="sd">"""Return the Recipe's filename</span>
|
||||
@ -1080,7 +1090,7 @@
|
||||
<script type="text/javascript">
|
||||
var DOCUMENTATION_OPTIONS = {
|
||||
URL_ROOT:'../../../',
|
||||
VERSION:'29.1',
|
||||
VERSION:'29.6',
|
||||
LANGUAGE:'None',
|
||||
COLLAPSE_INDEX:false,
|
||||
FILE_SUFFIX:'.html',
|
||||
@ -1101,9 +1111,7 @@
|
||||
|
||||
<script type="text/javascript">
|
||||
jQuery(function () {
|
||||
|
||||
SphinxRtdTheme.Navigation.enableSticky();
|
||||
|
||||
SphinxRtdTheme.Navigation.enable(true);
|
||||
});
|
||||
</script>
|
||||
|
||||
|
@ -8,7 +8,7 @@
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<title>pylorax.api.server — Lorax 29.1 documentation</title>
|
||||
<title>pylorax.api.server — Lorax 29.6 documentation</title>
|
||||
|
||||
|
||||
|
||||
@ -57,7 +57,7 @@
|
||||
|
||||
|
||||
<div class="version">
|
||||
29.1
|
||||
29.6
|
||||
</div>
|
||||
|
||||
|
||||
@ -266,7 +266,7 @@
|
||||
<script type="text/javascript">
|
||||
var DOCUMENTATION_OPTIONS = {
|
||||
URL_ROOT:'../../../',
|
||||
VERSION:'29.1',
|
||||
VERSION:'29.6',
|
||||
LANGUAGE:'None',
|
||||
COLLAPSE_INDEX:false,
|
||||
FILE_SUFFIX:'.html',
|
||||
@ -287,9 +287,7 @@
|
||||
|
||||
<script type="text/javascript">
|
||||
jQuery(function () {
|
||||
|
||||
SphinxRtdTheme.Navigation.enableSticky();
|
||||
|
||||
SphinxRtdTheme.Navigation.enable(true);
|
||||
});
|
||||
</script>
|
||||
|
||||
|
@ -8,7 +8,7 @@
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<title>pylorax.api.v0 — Lorax 29.1 documentation</title>
|
||||
<title>pylorax.api.v0 — Lorax 29.6 documentation</title>
|
||||
|
||||
|
||||
|
||||
@ -57,7 +57,7 @@
|
||||
|
||||
|
||||
<div class="version">
|
||||
29.1
|
||||
29.6
|
||||
</div>
|
||||
|
||||
|
||||
@ -658,6 +658,94 @@
|
||||
<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"> "sources": [</span>
|
||||
<span class="sd"> "fedora",</span>
|
||||
<span class="sd"> "fedora-cisco-openh264",</span>
|
||||
<span class="sd"> "fedora-updates-testing",</span>
|
||||
<span class="sd"> "fedora-updates"</span>
|
||||
<span class="sd"> ]</span>
|
||||
<span class="sd"> }</span>
|
||||
|
||||
<span class="sd">`/api/v0/projects/source/info/<source-names>`</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 '*' is passed. Note that general globbing is not supported, only '*'.</span>
|
||||
|
||||
<span class="sd"> immutable system sources will have the "system" 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"> "errors": [],</span>
|
||||
<span class="sd"> "sources": {</span>
|
||||
<span class="sd"> "fedora": {</span>
|
||||
<span class="sd"> "check_gpg": true,</span>
|
||||
<span class="sd"> "check_ssl": true,</span>
|
||||
<span class="sd"> "gpgkey_urls": [</span>
|
||||
<span class="sd"> "file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-28-x86_64"</span>
|
||||
<span class="sd"> ],</span>
|
||||
<span class="sd"> "name": "fedora",</span>
|
||||
<span class="sd"> "proxy": "http://proxy.brianlane.com:8123",</span>
|
||||
<span class="sd"> "system": true,</span>
|
||||
<span class="sd"> "type": "yum-metalink",</span>
|
||||
<span class="sd"> "url": "https://mirrors.fedoraproject.org/metalink?repo=fedora-28&arch=x86_64"</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"> "name": "custom-source-1",</span>
|
||||
<span class="sd"> "url": "https://url/path/to/repository/",</span>
|
||||
<span class="sd"> "type": "yum-baseurl",</span>
|
||||
<span class="sd"> "check_ssl": true,</span>
|
||||
<span class="sd"> "check_gpg": true,</span>
|
||||
<span class="sd"> "gpgkey_urls": [</span>
|
||||
<span class="sd"> "https://url/path/to/gpg-key"</span>
|
||||
<span class="sd"> ]</span>
|
||||
<span class="sd"> }</span>
|
||||
|
||||
<span class="sd">DELETE `/api/v0/projects/source/delete/<source-name>`</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&limit=20]`</span>
|
||||
<span class="sd">^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^</span>
|
||||
|
||||
@ -1035,11 +1123,14 @@
|
||||
|
||||
<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">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.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">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">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>
|
||||
@ -1338,9 +1429,9 @@
|
||||
|
||||
<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="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">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">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">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_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_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="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">"DNFLOCK"</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"># 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">"name"</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">"modules"</span><span class="p">]</span> <span class="ow">or</span> <span class="p">[]]</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">"name"</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">"packages"</span><span class="p">]</span> <span class="ow">or</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_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">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_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_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="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">"DNFLOCK"</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">"""Return detailed information about the listed projects"""</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">"DNFLOCK"</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">"DNFLOCK"</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">","</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">"DNFLOCK"</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">"*"</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">","</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">"(v0_projects_depsolve) </span><span class="si">%s</span><span class="s2">"</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">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">"/api/v0/projects/source/list"</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">"*"</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">"""Return the list of source names"""</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">"DNFLOCK"</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">"DNFLOCK"</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">"/api/v0/projects/source/info/<source_names>"</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">"*"</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">"""Return detailed info about the list of sources"""</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">"format"</span><span class="p">,</span> <span class="s2">"json"</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">"*"</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">"DNFLOCK"</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">","</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">"DNFLOCK"</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">"/etc/yum.repos.d/*.repo"</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">","</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">"DNFLOCK"</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">"DNFLOCK"</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">"</span><span class="si">%s</span><span class="s2"> is not a valid source"</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">"toml"</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">"toml"</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">"/api/v0/projects/source/new"</span><span class="p">,</span> <span class="n">methods</span><span class="o">=</span><span class="p">[</span><span class="s2">"POST"</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">"*"</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">"""Add a new package source. Or change an existing one"""</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">'Content-Type'</span><span class="p">]</span> <span class="o">==</span> <span class="s2">"text/x-toml"</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">"/etc/yum.repos.d/*.repo"</span><span class="p">)</span>
|
||||
<span class="k">if</span> <span class="n">source</span><span class="p">[</span><span class="s2">"name"</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">"</span><span class="si">%s</span><span class="s2"> is a system source, it cannot be deleted."</span> <span class="o">%</span> <span class="n">source</span><span class="p">[</span><span class="s2">"name"</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'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">"DNFLOCK"</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">"DNFLOCK"</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">"name"</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">"name"</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">"Updating repository metadata after adding </span><span class="si">%s</span><span class="s2">"</span><span class="p">,</span> <span class="n">source</span><span class="p">[</span><span class="s2">"name"</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">"COMPOSER_CFG"</span><span class="p">]</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="s2">"composer"</span><span class="p">,</span> <span class="s2">"repo_dir"</span><span class="p">)</span>
|
||||
|
||||
<span class="c1"># Remove any previous sources with this name, ignore it if it isn'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">"*.repo"</span><span class="p">),</span> <span class="n">source</span><span class="p">[</span><span class="s2">"name"</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'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">"</span><span class="si">%s</span><span class="s2">.repo"</span> <span class="o">%</span> <span class="n">source</span><span class="p">[</span><span class="s2">"name"</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">"w"</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">"(v0_projects_source_add) adding </span><span class="si">%s</span><span class="s2"> failed: </span><span class="si">%s</span><span class="s2">"</span><span class="p">,</span> <span class="n">source</span><span class="p">[</span><span class="s2">"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="c1"># Cleanup the mess, if loading it failed we don'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">"name"</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">"DNFLOCK"</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">"DNFLOCK"</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">"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">"Updating repository metadata after adding </span><span class="si">%s</span><span class="s2"> failed"</span><span class="p">,</span> <span class="n">source</span><span class="p">[</span><span class="s2">"name"</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">"/api/v0/projects/source/delete/<source_name>"</span><span class="p">,</span> <span class="n">methods</span><span class="o">=</span><span class="p">[</span><span class="s2">"DELETE"</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">"*"</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">"""Delete the named source and return a status response"""</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">"/etc/yum.repos.d/*.repo"</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">"</span><span class="si">%s</span><span class="s2"> is a system source, it cannot be deleted."</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">"COMPOSER_CFG"</span><span class="p">]</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="s2">"composer"</span><span class="p">,</span> <span class="s2">"repo_dir"</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">"*.repo"</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'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">"DNFLOCK"</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">"DNFLOCK"</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">"DNFLOCK"</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">"Updating repository metadata after removing </span><span class="si">%s</span><span class="s2">"</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">"DNFLOCK"</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">"DNFLOCK"</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">"(v0_projects_source_delete) </span><span class="si">%s</span><span class="s2">"</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">"/api/v0/modules/list"</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">"/api/v0/modules/list/<module_names>"</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">"*"</span><span class="p">)</span>
|
||||
@ -1752,7 +1969,7 @@
|
||||
<script type="text/javascript">
|
||||
var DOCUMENTATION_OPTIONS = {
|
||||
URL_ROOT:'../../../',
|
||||
VERSION:'29.1',
|
||||
VERSION:'29.6',
|
||||
LANGUAGE:'None',
|
||||
COLLAPSE_INDEX:false,
|
||||
FILE_SUFFIX:'.html',
|
||||
@ -1773,9 +1990,7 @@
|
||||
|
||||
<script type="text/javascript">
|
||||
jQuery(function () {
|
||||
|
||||
SphinxRtdTheme.Navigation.enableSticky();
|
||||
|
||||
SphinxRtdTheme.Navigation.enable(true);
|
||||
});
|
||||
</script>
|
||||
|
||||
|
@ -8,7 +8,7 @@
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<title>pylorax.api.workspace — Lorax 29.1 documentation</title>
|
||||
<title>pylorax.api.workspace — Lorax 29.6 documentation</title>
|
||||
|
||||
|
||||
|
||||
@ -57,7 +57,7 @@
|
||||
|
||||
|
||||
<div class="version">
|
||||
29.1
|
||||
29.6
|
||||
</div>
|
||||
|
||||
|
||||
@ -288,7 +288,7 @@
|
||||
<script type="text/javascript">
|
||||
var DOCUMENTATION_OPTIONS = {
|
||||
URL_ROOT:'../../../',
|
||||
VERSION:'29.1',
|
||||
VERSION:'29.6',
|
||||
LANGUAGE:'None',
|
||||
COLLAPSE_INDEX:false,
|
||||
FILE_SUFFIX:'.html',
|
||||
@ -309,9 +309,7 @@
|
||||
|
||||
<script type="text/javascript">
|
||||
jQuery(function () {
|
||||
|
||||
SphinxRtdTheme.Navigation.enableSticky();
|
||||
|
||||
SphinxRtdTheme.Navigation.enable(true);
|
||||
});
|
||||
</script>
|
||||
|
||||
|
@ -8,7 +8,7 @@
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<title>pylorax.base — Lorax 29.1 documentation</title>
|
||||
<title>pylorax.base — Lorax 29.6 documentation</title>
|
||||
|
||||
|
||||
|
||||
@ -57,7 +57,7 @@
|
||||
|
||||
|
||||
<div class="version">
|
||||
29.1
|
||||
29.6
|
||||
</div>
|
||||
|
||||
|
||||
@ -256,7 +256,7 @@
|
||||
<script type="text/javascript">
|
||||
var DOCUMENTATION_OPTIONS = {
|
||||
URL_ROOT:'../../',
|
||||
VERSION:'29.1',
|
||||
VERSION:'29.6',
|
||||
LANGUAGE:'None',
|
||||
COLLAPSE_INDEX:false,
|
||||
FILE_SUFFIX:'.html',
|
||||
@ -277,9 +277,7 @@
|
||||
|
||||
<script type="text/javascript">
|
||||
jQuery(function () {
|
||||
|
||||
SphinxRtdTheme.Navigation.enableSticky();
|
||||
|
||||
SphinxRtdTheme.Navigation.enable(true);
|
||||
});
|
||||
</script>
|
||||
|
||||
|
@ -8,7 +8,7 @@
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<title>pylorax.buildstamp — Lorax 29.1 documentation</title>
|
||||
<title>pylorax.buildstamp — Lorax 29.6 documentation</title>
|
||||
|
||||
|
||||
|
||||
@ -57,7 +57,7 @@
|
||||
|
||||
|
||||
<div class="version">
|
||||
29.1
|
||||
29.6
|
||||
</div>
|
||||
|
||||
|
||||
@ -250,7 +250,7 @@
|
||||
<script type="text/javascript">
|
||||
var DOCUMENTATION_OPTIONS = {
|
||||
URL_ROOT:'../../',
|
||||
VERSION:'29.1',
|
||||
VERSION:'29.6',
|
||||
LANGUAGE:'None',
|
||||
COLLAPSE_INDEX:false,
|
||||
FILE_SUFFIX:'.html',
|
||||
@ -271,9 +271,7 @@
|
||||
|
||||
<script type="text/javascript">
|
||||
jQuery(function () {
|
||||
|
||||
SphinxRtdTheme.Navigation.enableSticky();
|
||||
|
||||
SphinxRtdTheme.Navigation.enable(true);
|
||||
});
|
||||
</script>
|
||||
|
||||
|
@ -8,7 +8,7 @@
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<title>pylorax.cmdline — Lorax 29.1 documentation</title>
|
||||
<title>pylorax.cmdline — Lorax 29.6 documentation</title>
|
||||
|
||||
|
||||
|
||||
@ -57,7 +57,7 @@
|
||||
|
||||
|
||||
<div class="version">
|
||||
29.1
|
||||
29.6
|
||||
</div>
|
||||
|
||||
|
||||
@ -483,7 +483,7 @@
|
||||
<script type="text/javascript">
|
||||
var DOCUMENTATION_OPTIONS = {
|
||||
URL_ROOT:'../../',
|
||||
VERSION:'29.1',
|
||||
VERSION:'29.6',
|
||||
LANGUAGE:'None',
|
||||
COLLAPSE_INDEX:false,
|
||||
FILE_SUFFIX:'.html',
|
||||
@ -504,9 +504,7 @@
|
||||
|
||||
<script type="text/javascript">
|
||||
jQuery(function () {
|
||||
|
||||
SphinxRtdTheme.Navigation.enableSticky();
|
||||
|
||||
SphinxRtdTheme.Navigation.enable(true);
|
||||
});
|
||||
</script>
|
||||
|
||||
|
@ -8,7 +8,7 @@
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<title>pylorax.creator — Lorax 29.1 documentation</title>
|
||||
<title>pylorax.creator — Lorax 29.6 documentation</title>
|
||||
|
||||
|
||||
|
||||
@ -57,7 +57,7 @@
|
||||
|
||||
|
||||
<div class="version">
|
||||
29.1
|
||||
29.6
|
||||
</div>
|
||||
|
||||
|
||||
@ -903,7 +903,7 @@
|
||||
<script type="text/javascript">
|
||||
var DOCUMENTATION_OPTIONS = {
|
||||
URL_ROOT:'../../',
|
||||
VERSION:'29.1',
|
||||
VERSION:'29.6',
|
||||
LANGUAGE:'None',
|
||||
COLLAPSE_INDEX:false,
|
||||
FILE_SUFFIX:'.html',
|
||||
@ -924,9 +924,7 @@
|
||||
|
||||
<script type="text/javascript">
|
||||
jQuery(function () {
|
||||
|
||||
SphinxRtdTheme.Navigation.enableSticky();
|
||||
|
||||
SphinxRtdTheme.Navigation.enable(true);
|
||||
});
|
||||
</script>
|
||||
|
||||
|
@ -8,7 +8,7 @@
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<title>pylorax.decorators — Lorax 29.1 documentation</title>
|
||||
<title>pylorax.decorators — Lorax 29.6 documentation</title>
|
||||
|
||||
|
||||
|
||||
@ -57,7 +57,7 @@
|
||||
|
||||
|
||||
<div class="version">
|
||||
29.1
|
||||
29.6
|
||||
</div>
|
||||
|
||||
|
||||
@ -219,7 +219,7 @@
|
||||
<script type="text/javascript">
|
||||
var DOCUMENTATION_OPTIONS = {
|
||||
URL_ROOT:'../../',
|
||||
VERSION:'29.1',
|
||||
VERSION:'29.6',
|
||||
LANGUAGE:'None',
|
||||
COLLAPSE_INDEX:false,
|
||||
FILE_SUFFIX:'.html',
|
||||
@ -240,9 +240,7 @@
|
||||
|
||||
<script type="text/javascript">
|
||||
jQuery(function () {
|
||||
|
||||
SphinxRtdTheme.Navigation.enableSticky();
|
||||
|
||||
SphinxRtdTheme.Navigation.enable(true);
|
||||
});
|
||||
</script>
|
||||
|
||||
|
@ -8,7 +8,7 @@
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<title>pylorax.discinfo — Lorax 29.1 documentation</title>
|
||||
<title>pylorax.discinfo — Lorax 29.6 documentation</title>
|
||||
|
||||
|
||||
|
||||
@ -57,7 +57,7 @@
|
||||
|
||||
|
||||
<div class="version">
|
||||
29.1
|
||||
29.6
|
||||
</div>
|
||||
|
||||
|
||||
@ -228,7 +228,7 @@
|
||||
<script type="text/javascript">
|
||||
var DOCUMENTATION_OPTIONS = {
|
||||
URL_ROOT:'../../',
|
||||
VERSION:'29.1',
|
||||
VERSION:'29.6',
|
||||
LANGUAGE:'None',
|
||||
COLLAPSE_INDEX:false,
|
||||
FILE_SUFFIX:'.html',
|
||||
@ -249,9 +249,7 @@
|
||||
|
||||
<script type="text/javascript">
|
||||
jQuery(function () {
|
||||
|
||||
SphinxRtdTheme.Navigation.enableSticky();
|
||||
|
||||
SphinxRtdTheme.Navigation.enable(true);
|
||||
});
|
||||
</script>
|
||||
|
||||
|
@ -8,7 +8,7 @@
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<title>pylorax.dnfhelper — Lorax 29.1 documentation</title>
|
||||
<title>pylorax.dnfhelper — Lorax 29.6 documentation</title>
|
||||
|
||||
|
||||
|
||||
@ -57,7 +57,7 @@
|
||||
|
||||
|
||||
<div class="version">
|
||||
29.1
|
||||
29.6
|
||||
</div>
|
||||
|
||||
|
||||
@ -298,7 +298,7 @@
|
||||
<script type="text/javascript">
|
||||
var DOCUMENTATION_OPTIONS = {
|
||||
URL_ROOT:'../../',
|
||||
VERSION:'29.1',
|
||||
VERSION:'29.6',
|
||||
LANGUAGE:'None',
|
||||
COLLAPSE_INDEX:false,
|
||||
FILE_SUFFIX:'.html',
|
||||
@ -319,9 +319,7 @@
|
||||
|
||||
<script type="text/javascript">
|
||||
jQuery(function () {
|
||||
|
||||
SphinxRtdTheme.Navigation.enableSticky();
|
||||
|
||||
SphinxRtdTheme.Navigation.enable(true);
|
||||
});
|
||||
</script>
|
||||
|
||||
|
@ -8,7 +8,7 @@
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<title>pylorax.executils — Lorax 29.1 documentation</title>
|
||||
<title>pylorax.executils — Lorax 29.6 documentation</title>
|
||||
|
||||
|
||||
|
||||
@ -57,7 +57,7 @@
|
||||
|
||||
|
||||
<div class="version">
|
||||
29.1
|
||||
29.6
|
||||
</div>
|
||||
|
||||
|
||||
@ -536,7 +536,7 @@
|
||||
<script type="text/javascript">
|
||||
var DOCUMENTATION_OPTIONS = {
|
||||
URL_ROOT:'../../',
|
||||
VERSION:'29.1',
|
||||
VERSION:'29.6',
|
||||
LANGUAGE:'None',
|
||||
COLLAPSE_INDEX:false,
|
||||
FILE_SUFFIX:'.html',
|
||||
@ -557,9 +557,7 @@
|
||||
|
||||
<script type="text/javascript">
|
||||
jQuery(function () {
|
||||
|
||||
SphinxRtdTheme.Navigation.enableSticky();
|
||||
|
||||
SphinxRtdTheme.Navigation.enable(true);
|
||||
});
|
||||
</script>
|
||||
|
||||
|
@ -8,7 +8,7 @@
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<title>pylorax.imgutils — Lorax 29.1 documentation</title>
|
||||
<title>pylorax.imgutils — Lorax 29.6 documentation</title>
|
||||
|
||||
|
||||
|
||||
@ -57,7 +57,7 @@
|
||||
|
||||
|
||||
<div class="version">
|
||||
29.1
|
||||
29.6
|
||||
</div>
|
||||
|
||||
|
||||
@ -708,7 +708,7 @@
|
||||
<script type="text/javascript">
|
||||
var DOCUMENTATION_OPTIONS = {
|
||||
URL_ROOT:'../../',
|
||||
VERSION:'29.1',
|
||||
VERSION:'29.6',
|
||||
LANGUAGE:'None',
|
||||
COLLAPSE_INDEX:false,
|
||||
FILE_SUFFIX:'.html',
|
||||
@ -729,9 +729,7 @@
|
||||
|
||||
<script type="text/javascript">
|
||||
jQuery(function () {
|
||||
|
||||
SphinxRtdTheme.Navigation.enableSticky();
|
||||
|
||||
SphinxRtdTheme.Navigation.enable(true);
|
||||
});
|
||||
</script>
|
||||
|
||||
|
@ -8,7 +8,7 @@
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<title>pylorax.installer — Lorax 29.1 documentation</title>
|
||||
<title>pylorax.installer — Lorax 29.6 documentation</title>
|
||||
|
||||
|
||||
|
||||
@ -57,7 +57,7 @@
|
||||
|
||||
|
||||
<div class="version">
|
||||
29.1
|
||||
29.6
|
||||
</div>
|
||||
|
||||
|
||||
@ -792,7 +792,7 @@
|
||||
<script type="text/javascript">
|
||||
var DOCUMENTATION_OPTIONS = {
|
||||
URL_ROOT:'../../',
|
||||
VERSION:'29.1',
|
||||
VERSION:'29.6',
|
||||
LANGUAGE:'None',
|
||||
COLLAPSE_INDEX:false,
|
||||
FILE_SUFFIX:'.html',
|
||||
@ -813,9 +813,7 @@
|
||||
|
||||
<script type="text/javascript">
|
||||
jQuery(function () {
|
||||
|
||||
SphinxRtdTheme.Navigation.enableSticky();
|
||||
|
||||
SphinxRtdTheme.Navigation.enable(true);
|
||||
});
|
||||
</script>
|
||||
|
||||
|
@ -8,7 +8,7 @@
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<title>pylorax.ltmpl — Lorax 29.1 documentation</title>
|
||||
<title>pylorax.ltmpl — Lorax 29.6 documentation</title>
|
||||
|
||||
|
||||
|
||||
@ -57,7 +57,7 @@
|
||||
|
||||
|
||||
<div class="version">
|
||||
29.1
|
||||
29.6
|
||||
</div>
|
||||
|
||||
|
||||
@ -286,7 +286,7 @@
|
||||
<span class="sd"> * Parsing and execution are *separate* passes - so you can't use the result</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*'s copy of that program, which may cause problems if there's a</span>
|
||||
<span class="sd"> big enough difference between the host and the image you'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="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">'''</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"> '''</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">"etc/gconf/gconf.xml.defaults"</span><span class="p">)</span>
|
||||
<span class="n">cmd</span> <span class="o">=</span> <span class="p">[</span><span class="s2">"gconftool-2"</span><span class="p">,</span> <span class="s2">"--direct"</span><span class="p">,</span>
|
||||
<span class="s2">"--config-source=xml:readwrite:</span><span class="si">%s</span><span class="s2">"</span> <span class="o">%</span> <span class="n">outfile</span><span class="p">,</span>
|
||||
<span class="s2">"--set"</span><span class="p">,</span> <span class="s2">"--type"</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>
|
||||
<span class="sd">'''</span>
|
||||
<span class="sd"> log MESSAGE</span>
|
||||
@ -976,7 +960,7 @@
|
||||
<script type="text/javascript">
|
||||
var DOCUMENTATION_OPTIONS = {
|
||||
URL_ROOT:'../../',
|
||||
VERSION:'29.1',
|
||||
VERSION:'29.6',
|
||||
LANGUAGE:'None',
|
||||
COLLAPSE_INDEX:false,
|
||||
FILE_SUFFIX:'.html',
|
||||
@ -997,9 +981,7 @@
|
||||
|
||||
<script type="text/javascript">
|
||||
jQuery(function () {
|
||||
|
||||
SphinxRtdTheme.Navigation.enableSticky();
|
||||
|
||||
SphinxRtdTheme.Navigation.enable(true);
|
||||
});
|
||||
</script>
|
||||
|
||||
|
@ -8,7 +8,7 @@
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<title>pylorax.monitor — Lorax 29.1 documentation</title>
|
||||
<title>pylorax.monitor — Lorax 29.6 documentation</title>
|
||||
|
||||
|
||||
|
||||
@ -57,7 +57,7 @@
|
||||
|
||||
|
||||
<div class="version">
|
||||
29.1
|
||||
29.6
|
||||
</div>
|
||||
|
||||
|
||||
@ -384,7 +384,7 @@
|
||||
<script type="text/javascript">
|
||||
var DOCUMENTATION_OPTIONS = {
|
||||
URL_ROOT:'../../',
|
||||
VERSION:'29.1',
|
||||
VERSION:'29.6',
|
||||
LANGUAGE:'None',
|
||||
COLLAPSE_INDEX:false,
|
||||
FILE_SUFFIX:'.html',
|
||||
@ -405,9 +405,7 @@
|
||||
|
||||
<script type="text/javascript">
|
||||
jQuery(function () {
|
||||
|
||||
SphinxRtdTheme.Navigation.enableSticky();
|
||||
|
||||
SphinxRtdTheme.Navigation.enable(true);
|
||||
});
|
||||
</script>
|
||||
|
||||
|
@ -8,7 +8,7 @@
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<title>pylorax.mount — Lorax 29.1 documentation</title>
|
||||
<title>pylorax.mount — Lorax 29.6 documentation</title>
|
||||
|
||||
|
||||
|
||||
@ -57,7 +57,7 @@
|
||||
|
||||
|
||||
<div class="version">
|
||||
29.1
|
||||
29.6
|
||||
</div>
|
||||
|
||||
|
||||
@ -291,7 +291,7 @@
|
||||
<script type="text/javascript">
|
||||
var DOCUMENTATION_OPTIONS = {
|
||||
URL_ROOT:'../../',
|
||||
VERSION:'29.1',
|
||||
VERSION:'29.6',
|
||||
LANGUAGE:'None',
|
||||
COLLAPSE_INDEX:false,
|
||||
FILE_SUFFIX:'.html',
|
||||
@ -312,9 +312,7 @@
|
||||
|
||||
<script type="text/javascript">
|
||||
jQuery(function () {
|
||||
|
||||
SphinxRtdTheme.Navigation.enableSticky();
|
||||
|
||||
SphinxRtdTheme.Navigation.enable(true);
|
||||
});
|
||||
</script>
|
||||
|
||||
|
@ -8,7 +8,7 @@
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<title>pylorax.sysutils — Lorax 29.1 documentation</title>
|
||||
<title>pylorax.sysutils — Lorax 29.6 documentation</title>
|
||||
|
||||
|
||||
|
||||
@ -57,7 +57,7 @@
|
||||
|
||||
|
||||
<div class="version">
|
||||
29.1
|
||||
29.6
|
||||
</div>
|
||||
|
||||
|
||||
@ -297,7 +297,7 @@
|
||||
<script type="text/javascript">
|
||||
var DOCUMENTATION_OPTIONS = {
|
||||
URL_ROOT:'../../',
|
||||
VERSION:'29.1',
|
||||
VERSION:'29.6',
|
||||
LANGUAGE:'None',
|
||||
COLLAPSE_INDEX:false,
|
||||
FILE_SUFFIX:'.html',
|
||||
@ -318,9 +318,7 @@
|
||||
|
||||
<script type="text/javascript">
|
||||
jQuery(function () {
|
||||
|
||||
SphinxRtdTheme.Navigation.enableSticky();
|
||||
|
||||
SphinxRtdTheme.Navigation.enable(true);
|
||||
});
|
||||
</script>
|
||||
|
||||
|
@ -8,7 +8,7 @@
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<title>pylorax.treebuilder — Lorax 29.1 documentation</title>
|
||||
<title>pylorax.treebuilder — Lorax 29.6 documentation</title>
|
||||
|
||||
|
||||
|
||||
@ -57,7 +57,7 @@
|
||||
|
||||
|
||||
<div class="version">
|
||||
29.1
|
||||
29.6
|
||||
</div>
|
||||
|
||||
|
||||
@ -589,7 +589,7 @@
|
||||
<script type="text/javascript">
|
||||
var DOCUMENTATION_OPTIONS = {
|
||||
URL_ROOT:'../../',
|
||||
VERSION:'29.1',
|
||||
VERSION:'29.6',
|
||||
LANGUAGE:'None',
|
||||
COLLAPSE_INDEX:false,
|
||||
FILE_SUFFIX:'.html',
|
||||
@ -610,9 +610,7 @@
|
||||
|
||||
<script type="text/javascript">
|
||||
jQuery(function () {
|
||||
|
||||
SphinxRtdTheme.Navigation.enableSticky();
|
||||
|
||||
SphinxRtdTheme.Navigation.enable(true);
|
||||
});
|
||||
</script>
|
||||
|
||||
|
@ -8,7 +8,7 @@
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<title>pylorax.treeinfo — Lorax 29.1 documentation</title>
|
||||
<title>pylorax.treeinfo — Lorax 29.6 documentation</title>
|
||||
|
||||
|
||||
|
||||
@ -57,7 +57,7 @@
|
||||
|
||||
|
||||
<div class="version">
|
||||
29.1
|
||||
29.6
|
||||
</div>
|
||||
|
||||
|
||||
@ -246,7 +246,7 @@
|
||||
<script type="text/javascript">
|
||||
var DOCUMENTATION_OPTIONS = {
|
||||
URL_ROOT:'../../',
|
||||
VERSION:'29.1',
|
||||
VERSION:'29.6',
|
||||
LANGUAGE:'None',
|
||||
COLLAPSE_INDEX:false,
|
||||
FILE_SUFFIX:'.html',
|
||||
@ -267,9 +267,7 @@
|
||||
|
||||
<script type="text/javascript">
|
||||
jQuery(function () {
|
||||
|
||||
SphinxRtdTheme.Navigation.enableSticky();
|
||||
|
||||
SphinxRtdTheme.Navigation.enable(true);
|
||||
});
|
||||
</script>
|
||||
|
||||
|
@ -44,6 +44,14 @@ composer.cli.projects module
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
|
||||
composer.cli.sources module
|
||||
---------------------------
|
||||
|
||||
.. automodule:: composer.cli.sources
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
|
||||
composer.cli.utilities module
|
||||
-----------------------------
|
||||
|
||||
|
@ -23,7 +23,7 @@ Documentation for other Lorax Branches
|
||||
======================================
|
||||
|
||||
* `Fedora 28 <f28-branch/>`_
|
||||
* `lorax-composer <lorax-composer/>`_
|
||||
* `RHEL7 lorax-composer <lorax-composer/>`_
|
||||
|
||||
Indices and tables
|
||||
==================
|
||||
|
@ -160,10 +160,20 @@ changes. Here are the steps I used to convert the Fedora XFCE spin.
|
||||
dracut-config-generic
|
||||
dracut-live
|
||||
-dracut-config-rescue
|
||||
grub-efi
|
||||
grub2-efi
|
||||
memtest86+
|
||||
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
|
||||
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
|
||||
@ -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/"``
|
||||
|
||||
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)
|
||||
@ -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
|
||||
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,
|
||||
lmc will detect that the process died and cleanup.
|
||||
|
||||
|
@ -19,9 +19,10 @@ Installation
|
||||
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
|
||||
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
|
||||
the first request is made. Systemd will then launch the server and it will
|
||||
remain running until the system is rebooted.
|
||||
systemctl enable lorax-composer.socket && sudo systemctl start
|
||||
lorax-composer.socket``. This will leave the server off until the first request
|
||||
is made. Systemd will then launch the server and it will remain running until
|
||||
the system is rebooted.
|
||||
|
||||
Quickstart
|
||||
----------
|
||||
@ -29,8 +30,9 @@ Quickstart
|
||||
1. Create a ``weldr`` user and group by running ``useradd 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.
|
||||
3. Enable the socket activation with ``systemctl enable lorax-composer.socket`` or
|
||||
run it directly with ``lorax-composer /path/to/blueprints/``
|
||||
3. Enable the socket activation with ``systemctl enable lorax-composer.socket
|
||||
&& 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
|
||||
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
|
||||
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.
|
||||
|
||||
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.
|
||||
|
@ -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:`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:`mkdir <pylorax.ltmpl.LoraxTemplateRunner.mkdir>` makes a new directory.
|
||||
* :func:`move <pylorax.ltmpl.LoraxTemplateRunner.move>` to move a file into the installroot
|
||||
|
@ -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
@ -1,6 +1,6 @@
|
||||
var DOCUMENTATION_OPTIONS = {
|
||||
URL_ROOT: '',
|
||||
VERSION: '29.1',
|
||||
VERSION: '29.6',
|
||||
LANGUAGE: 'None',
|
||||
COLLAPSE_INDEX: false,
|
||||
FILE_SUFFIX: '.html',
|
||||
|
@ -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"]);
|
@ -8,7 +8,7 @@
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<title>composer-cli — Lorax 29.1 documentation</title>
|
||||
<title>composer-cli — Lorax 29.6 documentation</title>
|
||||
|
||||
|
||||
|
||||
@ -59,7 +59,7 @@
|
||||
|
||||
|
||||
<div class="version">
|
||||
29.1
|
||||
29.6
|
||||
</div>
|
||||
|
||||
|
||||
@ -299,6 +299,16 @@ TO-COMMIT can be a commit hash, NEWEST, or WORKSPACE</dd>
|
||||
<dd>List the available projects.</dd>
|
||||
<dt>projects info <PROJECT,…></dt>
|
||||
<dd>Show details about the listed projects.</dd>
|
||||
<dt>sources list</dt>
|
||||
<dd>List the available sources</dd>
|
||||
<dt>sources info <SOURCE-NAME,…></dt>
|
||||
<dd>Details about the source.</dd>
|
||||
<dt>sources add <SOURCE.TOML></dt>
|
||||
<dd>Add a package source to the server.</dd>
|
||||
<dt>sources change <SOURCE.TOML></dt>
|
||||
<dd>Change an existing source</dd>
|
||||
<dt>sources delete <SOURCE-NAME></dt>
|
||||
<dd>Delete a package source.</dd>
|
||||
</dl>
|
||||
</p>
|
||||
</div>
|
||||
@ -382,7 +392,7 @@ save the qcow2 image as <code class="docutils literal notranslate"><span class="
|
||||
<script type="text/javascript">
|
||||
var DOCUMENTATION_OPTIONS = {
|
||||
URL_ROOT:'./',
|
||||
VERSION:'29.1',
|
||||
VERSION:'29.6',
|
||||
LANGUAGE:'None',
|
||||
COLLAPSE_INDEX:false,
|
||||
FILE_SUFFIX:'.html',
|
||||
@ -403,9 +413,7 @@ save the qcow2 image as <code class="docutils literal notranslate"><span class="
|
||||
|
||||
<script type="text/javascript">
|
||||
jQuery(function () {
|
||||
|
||||
SphinxRtdTheme.Navigation.enableSticky();
|
||||
|
||||
SphinxRtdTheme.Navigation.enable(true);
|
||||
});
|
||||
</script>
|
||||
|
||||
|
@ -8,7 +8,7 @@
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<title>composer.cli package — Lorax 29.1 documentation</title>
|
||||
<title>composer.cli package — Lorax 29.6 documentation</title>
|
||||
|
||||
|
||||
|
||||
@ -59,7 +59,7 @@
|
||||
|
||||
|
||||
<div class="version">
|
||||
29.1
|
||||
29.6
|
||||
</div>
|
||||
|
||||
|
||||
@ -906,6 +906,111 @@ include this extra information.</p>
|
||||
<p>projects list</p>
|
||||
</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 <source.toml></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 <source-name></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 <source-name></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 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>
|
||||
@ -1059,7 +1164,7 @@ include this extra information.</p>
|
||||
<script type="text/javascript">
|
||||
var DOCUMENTATION_OPTIONS = {
|
||||
URL_ROOT:'./',
|
||||
VERSION:'29.1',
|
||||
VERSION:'29.6',
|
||||
LANGUAGE:'None',
|
||||
COLLAPSE_INDEX:false,
|
||||
FILE_SUFFIX:'.html',
|
||||
@ -1080,9 +1185,7 @@ include this extra information.</p>
|
||||
|
||||
<script type="text/javascript">
|
||||
jQuery(function () {
|
||||
|
||||
SphinxRtdTheme.Navigation.enableSticky();
|
||||
|
||||
SphinxRtdTheme.Navigation.enable(true);
|
||||
});
|
||||
</script>
|
||||
|
||||
|
@ -8,7 +8,7 @@
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<title>composer package — Lorax 29.1 documentation</title>
|
||||
<title>composer package — Lorax 29.6 documentation</title>
|
||||
|
||||
|
||||
|
||||
@ -59,7 +59,7 @@
|
||||
|
||||
|
||||
<div class="version">
|
||||
29.1
|
||||
29.6
|
||||
</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.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.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">Module contents</a></li>
|
||||
</ul>
|
||||
@ -475,7 +476,7 @@
|
||||
<script type="text/javascript">
|
||||
var DOCUMENTATION_OPTIONS = {
|
||||
URL_ROOT:'./',
|
||||
VERSION:'29.1',
|
||||
VERSION:'29.6',
|
||||
LANGUAGE:'None',
|
||||
COLLAPSE_INDEX:false,
|
||||
FILE_SUFFIX:'.html',
|
||||
@ -496,9 +497,7 @@
|
||||
|
||||
<script type="text/javascript">
|
||||
jQuery(function () {
|
||||
|
||||
SphinxRtdTheme.Navigation.enableSticky();
|
||||
|
||||
SphinxRtdTheme.Navigation.enable(true);
|
||||
});
|
||||
</script>
|
||||
|
||||
|
@ -9,7 +9,7 @@
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<title>Index — Lorax 29.1 documentation</title>
|
||||
<title>Index — Lorax 29.6 documentation</title>
|
||||
|
||||
|
||||
|
||||
@ -58,7 +58,7 @@
|
||||
|
||||
|
||||
<div class="version">
|
||||
29.1
|
||||
29.6
|
||||
</div>
|
||||
|
||||
|
||||
@ -319,10 +319,10 @@
|
||||
<li><a href="pylorax.api.html#pylorax.api.compose.compose_types">(in module pylorax.api.compose)</a>
|
||||
</li>
|
||||
</ul></li>
|
||||
</ul></td>
|
||||
<td style="width: 33%; vertical-align: top;"><ul>
|
||||
<li><a href="composer.html#module-composer">composer (module)</a>
|
||||
</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>
|
||||
<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>
|
||||
<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><a href="composer.cli.html#module-composer.cli.utilities">composer.cli.utilities (module)</a>
|
||||
</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>
|
||||
<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><a href="composer.html#composer.http_client.delete_url_json">delete_url_json() (in module composer.http_client)</a>
|
||||
</li>
|
||||
@ -412,6 +416,8 @@
|
||||
<li><a href="pylorax.html#pylorax.imgutils.dm_detach">dm_detach() (in module pylorax.imgutils)</a>
|
||||
</li>
|
||||
<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><a href="pylorax.html#pylorax.imgutils.do_grafts">do_grafts() (in module pylorax.imgutils)</a>
|
||||
</li>
|
||||
@ -483,8 +489,6 @@
|
||||
<h2 id="G">G</h2>
|
||||
<table style="width: 100%" class="indextable genindextable"><tr>
|
||||
<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>
|
||||
<li><a href="pylorax.html#pylorax.treebuilder.generate_module_info">generate_module_info() (in module pylorax.treebuilder)</a>
|
||||
@ -499,17 +503,21 @@
|
||||
</li>
|
||||
<li><a href="pylorax.api.html#pylorax.api.config.ComposerConfig.get_default">get_default() (pylorax.api.config.ComposerConfig method)</a>
|
||||
</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>
|
||||
<li><a href="pylorax.api.html#pylorax.api.queue.get_image_name">get_image_name() (in module pylorax.api.queue)</a>
|
||||
</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>
|
||||
<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><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><a href="composer.html#composer.http_client.get_url_json">get_url_json() (in module composer.http_client)</a>
|
||||
</li>
|
||||
@ -704,6 +712,8 @@
|
||||
<li><a href="pylorax.html#pylorax.imgutils.mktar">mktar() (in module pylorax.imgutils)</a>
|
||||
</li>
|
||||
<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><a href="composer.cli.html#composer.cli.modules.modules_cmd">modules_cmd() (in module composer.cli.modules)</a>
|
||||
</li>
|
||||
@ -750,6 +760,8 @@
|
||||
<table style="width: 100%" class="indextable genindextable"><tr>
|
||||
<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>
|
||||
<li><a href="pylorax.api.html#pylorax.api.recipes.Recipe.package_nver">package_nver (pylorax.api.recipes.Recipe attribute)</a>
|
||||
</li>
|
||||
<li><a href="composer.cli.html#composer.cli.utilities.packageNEVRA">packageNEVRA() (in module composer.cli.utilities)</a>
|
||||
</li>
|
||||
@ -935,10 +947,10 @@
|
||||
</ul></li>
|
||||
<li><a href="pylorax.html#pylorax.ltmpl.LoraxTemplateRunner.removefrom">removefrom() (pylorax.ltmpl.LoraxTemplateRunner method)</a>
|
||||
</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>
|
||||
</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>
|
||||
<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>
|
||||
<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><a href="pylorax.html#pylorax.creator.FakeDNF.reset">reset() (pylorax.creator.FakeDNF method)</a>
|
||||
</li>
|
||||
@ -998,13 +1012,25 @@
|
||||
<li><a href="pylorax.html#pylorax.monitor.LogMonitor.shutdown">shutdown() (pylorax.monitor.LogMonitor method)</a>
|
||||
</li>
|
||||
<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><a href="pylorax.html#pylorax.ltmpl.split_and_expand">split_and_expand() (in module pylorax.ltmpl)</a>
|
||||
</li>
|
||||
<li><a href="pylorax.html#pylorax.creator.squashfs_args">squashfs_args() (in module pylorax.creator)</a>
|
||||
</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>
|
||||
<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">
|
||||
var DOCUMENTATION_OPTIONS = {
|
||||
URL_ROOT:'./',
|
||||
VERSION:'29.1',
|
||||
VERSION:'29.6',
|
||||
LANGUAGE:'None',
|
||||
COLLAPSE_INDEX:false,
|
||||
FILE_SUFFIX:'.html',
|
||||
@ -1191,9 +1217,7 @@
|
||||
|
||||
<script type="text/javascript">
|
||||
jQuery(function () {
|
||||
|
||||
SphinxRtdTheme.Navigation.enableSticky();
|
||||
|
||||
SphinxRtdTheme.Navigation.enable(true);
|
||||
});
|
||||
</script>
|
||||
|
||||
|
12
index.html
12
index.html
@ -8,7 +8,7 @@
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<title>Welcome to Lorax’s documentation! — Lorax 29.1 documentation</title>
|
||||
<title>Welcome to Lorax’s documentation! — Lorax 29.6 documentation</title>
|
||||
|
||||
|
||||
|
||||
@ -58,7 +58,7 @@
|
||||
|
||||
|
||||
<div class="version">
|
||||
29.1
|
||||
29.6
|
||||
</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>
|
||||
<ul class="simple">
|
||||
<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>
|
||||
</div>
|
||||
<div class="section" id="indices-and-tables">
|
||||
@ -227,7 +227,7 @@
|
||||
<script type="text/javascript">
|
||||
var DOCUMENTATION_OPTIONS = {
|
||||
URL_ROOT:'./',
|
||||
VERSION:'29.1',
|
||||
VERSION:'29.6',
|
||||
LANGUAGE:'None',
|
||||
COLLAPSE_INDEX:false,
|
||||
FILE_SUFFIX:'.html',
|
||||
@ -248,9 +248,7 @@
|
||||
|
||||
<script type="text/javascript">
|
||||
jQuery(function () {
|
||||
|
||||
SphinxRtdTheme.Navigation.enableSticky();
|
||||
|
||||
SphinxRtdTheme.Navigation.enable(true);
|
||||
});
|
||||
</script>
|
||||
|
||||
|
10
intro.html
10
intro.html
@ -8,7 +8,7 @@
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<title>Introduction to Lorax — Lorax 29.1 documentation</title>
|
||||
<title>Introduction to Lorax — Lorax 29.6 documentation</title>
|
||||
|
||||
|
||||
|
||||
@ -59,7 +59,7 @@
|
||||
|
||||
|
||||
<div class="version">
|
||||
29.1
|
||||
29.6
|
||||
</div>
|
||||
|
||||
|
||||
@ -250,7 +250,7 @@ upd-instroot and mk-images* scripts.</p>
|
||||
<script type="text/javascript">
|
||||
var DOCUMENTATION_OPTIONS = {
|
||||
URL_ROOT:'./',
|
||||
VERSION:'29.1',
|
||||
VERSION:'29.6',
|
||||
LANGUAGE:'None',
|
||||
COLLAPSE_INDEX:false,
|
||||
FILE_SUFFIX:'.html',
|
||||
@ -271,9 +271,7 @@ upd-instroot and mk-images* scripts.</p>
|
||||
|
||||
<script type="text/javascript">
|
||||
jQuery(function () {
|
||||
|
||||
SphinxRtdTheme.Navigation.enableSticky();
|
||||
|
||||
SphinxRtdTheme.Navigation.enable(true);
|
||||
});
|
||||
</script>
|
||||
|
||||
|
@ -8,7 +8,7 @@
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<title>livemedia-creator — Lorax 29.1 documentation</title>
|
||||
<title>livemedia-creator — Lorax 29.6 documentation</title>
|
||||
|
||||
|
||||
|
||||
@ -59,7 +59,7 @@
|
||||
|
||||
|
||||
<div class="version">
|
||||
29.1
|
||||
29.6
|
||||
</div>
|
||||
|
||||
|
||||
@ -101,7 +101,11 @@
|
||||
</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="#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="#ami-images">AMI Images</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-live
|
||||
-dracut-config-rescue
|
||||
grub-efi
|
||||
grub2-efi
|
||||
memtest86+
|
||||
syslinux</p>
|
||||
</li>
|
||||
</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. @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
|
||||
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
|
||||
@ -714,7 +726,15 @@ packages will get cached, so your kickstart url would look like:</p>
|
||||
<blockquote>
|
||||
<div><code class="docutils literal notranslate"><span class="pre">url</span> <span class="pre">--url="http://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/x86_64/os/"</span></code></div></blockquote>
|
||||
<p>You can also add an update repo, but don’t 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 Anaconda’s 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">"repo1"</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">"repo2"</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 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>
|
||||
@ -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
|
||||
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>
|
||||
<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"><</span> <span class="o">/</span><span class="n">dev</span><span class="o">/</span><span class="n">tty3</span> <span class="o">></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">>/</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,
|
||||
lmc will detect that the process died and cleanup.</p>
|
||||
<p>If lmc didn’t 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">
|
||||
var DOCUMENTATION_OPTIONS = {
|
||||
URL_ROOT:'./',
|
||||
VERSION:'29.1',
|
||||
VERSION:'29.6',
|
||||
LANGUAGE:'None',
|
||||
COLLAPSE_INDEX:false,
|
||||
FILE_SUFFIX:'.html',
|
||||
@ -1169,9 +1199,7 @@ report bugs against the lorax component.</p>
|
||||
|
||||
<script type="text/javascript">
|
||||
jQuery(function () {
|
||||
|
||||
SphinxRtdTheme.Navigation.enableSticky();
|
||||
|
||||
SphinxRtdTheme.Navigation.enable(true);
|
||||
});
|
||||
</script>
|
||||
|
||||
|
@ -8,7 +8,7 @@
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<title>lorax-composer — Lorax 29.1 documentation</title>
|
||||
<title>lorax-composer — Lorax 29.6 documentation</title>
|
||||
|
||||
|
||||
|
||||
@ -59,7 +59,7 @@
|
||||
|
||||
|
||||
<div class="version">
|
||||
29.1
|
||||
29.6
|
||||
</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>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="#package-sources">Package Sources</a></li>
|
||||
</ul>
|
||||
</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>
|
||||
<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>
|
||||
<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">systemctl</span> <span class="pre">start</span> <span class="pre">lorax-composer.socket</span></code>. This will leave the server off until
|
||||
the first request is made. Systemd will then launch the server and it will
|
||||
remain running until the system is rebooted.</p>
|
||||
<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">systemctl</span> <span class="pre">start</span>
|
||||
<span class="pre">lorax-composer.socket</span></code>. This will leave the server off until the first request
|
||||
is made. Systemd will then launch the server and it will remain running until
|
||||
the system is rebooted.</p>
|
||||
</div>
|
||||
<div class="section" id="quickstart">
|
||||
<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>
|
||||
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>
|
||||
<span class="pre">&&</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 <code class="docutils literal notranslate"><span class="pre">lorax-composer</span> <span class="pre">/path/to/blueprints/</span></code></li>
|
||||
<span class="pre">&&</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
|
||||
<code class="docutils literal notranslate"><span class="pre">lorax-composer</span> <span class="pre">/path/to/blueprints/</span></code></li>
|
||||
</ol>
|
||||
<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>
|
||||
@ -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>
|
||||
</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 host’s 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">"custom-source-1"</span>
|
||||
<span class="n">url</span> <span class="o">=</span> <span class="s2">"https://url/path/to/repository/"</span>
|
||||
<span class="nb">type</span> <span class="o">=</span> <span class="s2">"yum-baseurl"</span>
|
||||
<span class="n">proxy</span> <span class="o">=</span> <span class="s2">"https://proxy-url/"</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">"https://url/path/to/gpg-key"</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/<source-name></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/<source-name></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>
|
||||
|
||||
|
||||
@ -515,7 +558,7 @@ the contents of the iso as well as the boot.iso itself.</p>
|
||||
<script type="text/javascript">
|
||||
var DOCUMENTATION_OPTIONS = {
|
||||
URL_ROOT:'./',
|
||||
VERSION:'29.1',
|
||||
VERSION:'29.6',
|
||||
LANGUAGE:'None',
|
||||
COLLAPSE_INDEX:false,
|
||||
FILE_SUFFIX:'.html',
|
||||
@ -536,9 +579,7 @@ the contents of the iso as well as the boot.iso itself.</p>
|
||||
|
||||
<script type="text/javascript">
|
||||
jQuery(function () {
|
||||
|
||||
SphinxRtdTheme.Navigation.enableSticky();
|
||||
|
||||
SphinxRtdTheme.Navigation.enable(true);
|
||||
});
|
||||
</script>
|
||||
|
||||
|
11
lorax.html
11
lorax.html
@ -8,7 +8,7 @@
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<title>Lorax — Lorax 29.1 documentation</title>
|
||||
<title>Lorax — Lorax 29.6 documentation</title>
|
||||
|
||||
|
||||
|
||||
@ -59,7 +59,7 @@
|
||||
|
||||
|
||||
<div class="version">
|
||||
29.1
|
||||
29.6
|
||||
</div>
|
||||
|
||||
|
||||
@ -458,7 +458,6 @@ installation. A number of template commands are used here:</p>
|
||||
<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.chmod" title="pylorax.ltmpl.LoraxTemplateRunner.chmod"><code class="xref py py-func docutils literal notranslate"><span class="pre">chmod</span></code></a> changes the file’s 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.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>
|
||||
@ -556,7 +555,7 @@ should) select the specific template directory by passing <code class="docutils
|
||||
<script type="text/javascript">
|
||||
var DOCUMENTATION_OPTIONS = {
|
||||
URL_ROOT:'./',
|
||||
VERSION:'29.1',
|
||||
VERSION:'29.6',
|
||||
LANGUAGE:'None',
|
||||
COLLAPSE_INDEX:false,
|
||||
FILE_SUFFIX:'.html',
|
||||
@ -577,9 +576,7 @@ should) select the specific template directory by passing <code class="docutils
|
||||
|
||||
<script type="text/javascript">
|
||||
jQuery(function () {
|
||||
|
||||
SphinxRtdTheme.Navigation.enableSticky();
|
||||
|
||||
SphinxRtdTheme.Navigation.enable(true);
|
||||
});
|
||||
</script>
|
||||
|
||||
|
11
modules.html
11
modules.html
@ -8,7 +8,7 @@
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<title>src — Lorax 29.1 documentation</title>
|
||||
<title>src — Lorax 29.6 documentation</title>
|
||||
|
||||
|
||||
|
||||
@ -59,7 +59,7 @@
|
||||
|
||||
|
||||
<div class="version">
|
||||
29.1
|
||||
29.6
|
||||
</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.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.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">Module contents</a></li>
|
||||
</ul>
|
||||
@ -272,7 +273,7 @@
|
||||
<script type="text/javascript">
|
||||
var DOCUMENTATION_OPTIONS = {
|
||||
URL_ROOT:'./',
|
||||
VERSION:'29.1',
|
||||
VERSION:'29.6',
|
||||
LANGUAGE:'None',
|
||||
COLLAPSE_INDEX:false,
|
||||
FILE_SUFFIX:'.html',
|
||||
@ -293,9 +294,7 @@
|
||||
|
||||
<script type="text/javascript">
|
||||
jQuery(function () {
|
||||
|
||||
SphinxRtdTheme.Navigation.enableSticky();
|
||||
|
||||
SphinxRtdTheme.Navigation.enable(true);
|
||||
});
|
||||
</script>
|
||||
|
||||
|
BIN
objects.inv
BIN
objects.inv
Binary file not shown.
@ -8,7 +8,7 @@
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<title>Product and Updates Images — Lorax 29.1 documentation</title>
|
||||
<title>Product and Updates Images — Lorax 29.6 documentation</title>
|
||||
|
||||
|
||||
|
||||
@ -59,7 +59,7 @@
|
||||
|
||||
|
||||
<div class="version">
|
||||
29.1
|
||||
29.6
|
||||
</div>
|
||||
|
||||
|
||||
@ -222,7 +222,7 @@ command or the installpkgs paramater of <a class="reference internal" href="pylo
|
||||
<script type="text/javascript">
|
||||
var DOCUMENTATION_OPTIONS = {
|
||||
URL_ROOT:'./',
|
||||
VERSION:'29.1',
|
||||
VERSION:'29.6',
|
||||
LANGUAGE:'None',
|
||||
COLLAPSE_INDEX:false,
|
||||
FILE_SUFFIX:'.html',
|
||||
@ -243,9 +243,7 @@ command or the installpkgs paramater of <a class="reference internal" href="pylo
|
||||
|
||||
<script type="text/javascript">
|
||||
jQuery(function () {
|
||||
|
||||
SphinxRtdTheme.Navigation.enableSticky();
|
||||
|
||||
SphinxRtdTheme.Navigation.enable(true);
|
||||
});
|
||||
</script>
|
||||
|
||||
|
@ -8,7 +8,7 @@
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<title>Python Module Index — Lorax 29.1 documentation</title>
|
||||
<title>Python Module Index — Lorax 29.6 documentation</title>
|
||||
|
||||
|
||||
|
||||
@ -60,7 +60,7 @@
|
||||
|
||||
|
||||
<div class="version">
|
||||
29.1
|
||||
29.6
|
||||
</div>
|
||||
|
||||
|
||||
@ -201,6 +201,11 @@
|
||||
<td>   
|
||||
<a href="composer.cli.html#module-composer.cli.projects"><code class="xref">composer.cli.projects</code></a></td><td>
|
||||
<em></em></td></tr>
|
||||
<tr class="cg-1">
|
||||
<td></td>
|
||||
<td>   
|
||||
<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">
|
||||
<td></td>
|
||||
<td>   
|
||||
@ -400,7 +405,7 @@
|
||||
<script type="text/javascript">
|
||||
var DOCUMENTATION_OPTIONS = {
|
||||
URL_ROOT:'./',
|
||||
VERSION:'29.1',
|
||||
VERSION:'29.6',
|
||||
LANGUAGE:'None',
|
||||
COLLAPSE_INDEX:false,
|
||||
FILE_SUFFIX:'.html',
|
||||
@ -421,9 +426,7 @@
|
||||
|
||||
<script type="text/javascript">
|
||||
jQuery(function () {
|
||||
|
||||
SphinxRtdTheme.Navigation.enableSticky();
|
||||
|
||||
SphinxRtdTheme.Navigation.enable(true);
|
||||
});
|
||||
</script>
|
||||
|
||||
|
276
pylorax.api.html
276
pylorax.api.html
@ -8,7 +8,7 @@
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<title>pylorax.api package — Lorax 29.1 documentation</title>
|
||||
<title>pylorax.api package — Lorax 29.6 documentation</title>
|
||||
|
||||
|
||||
|
||||
@ -58,7 +58,7 @@
|
||||
|
||||
|
||||
<div class="version">
|
||||
29.1
|
||||
29.6
|
||||
</div>
|
||||
|
||||
|
||||
@ -491,6 +491,28 @@ with whatever options are relevant.</p>
|
||||
</table>
|
||||
</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 isn’t passed to it.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="function">
|
||||
<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>
|
||||
@ -515,6 +537,27 @@ with whatever options are relevant.</p>
|
||||
<dd><p>Return the name-epoch:version-release.arch</p>
|
||||
</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">
|
||||
<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>
|
||||
@ -542,6 +585,42 @@ dnf doesn’t provide access to. So use the file count and block size to estimat
|
||||
a minimum size for each package.</p>
|
||||
</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">
|
||||
<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>
|
||||
@ -670,7 +749,7 @@ and sets the type to “rpm”</p>
|
||||
|
||||
<dl class="function">
|
||||
<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>
|
||||
<table class="docutils field-list" frame="void" rules="none">
|
||||
<col class="field-name" />
|
||||
@ -678,14 +757,17 @@ and sets the type to “rpm”</p>
|
||||
<tbody valign="top">
|
||||
<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>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>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">NEVRA’s of the project and its dependencies</p>
|
||||
</td>
|
||||
</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>
|
||||
</tr>
|
||||
</tbody>
|
||||
@ -694,7 +776,7 @@ and sets the type to “rpm”</p>
|
||||
|
||||
<dl class="function">
|
||||
<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>
|
||||
<table class="docutils field-list" frame="void" rules="none">
|
||||
<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 NEVRA’s of the project and its dependencies</p>
|
||||
</td>
|
||||
</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>
|
||||
</tr>
|
||||
</tbody>
|
||||
@ -759,6 +844,78 @@ and sets the type to “rpm”</p>
|
||||
</table>
|
||||
</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">"check_gpg"</span><span class="p">:</span> <span class="n">true</span><span class="p">,</span>
|
||||
<span class="s2">"check_ssl"</span><span class="p">:</span> <span class="n">true</span><span class="p">,</span>
|
||||
<span class="s2">"gpgkey_url"</span><span class="p">:</span> <span class="p">[</span>
|
||||
<span class="s2">"file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-28-x86_64"</span>
|
||||
<span class="p">],</span>
|
||||
<span class="s2">"name"</span><span class="p">:</span> <span class="s2">"fedora"</span><span class="p">,</span>
|
||||
<span class="s2">"proxy"</span><span class="p">:</span> <span class="s2">"http://proxy.brianlane.com:8123"</span><span class="p">,</span>
|
||||
<span class="s2">"system"</span><span class="p">:</span> <span class="n">true</span>
|
||||
<span class="s2">"type"</span><span class="p">:</span> <span class="s2">"yum-metalink"</span><span class="p">,</span>
|
||||
<span class="s2">"url"</span><span class="p">:</span> <span class="s2">"https://mirrors.fedoraproject.org/metalink?repo=fedora-28&arch=x86_64"</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">"check_gpg"</span><span class="p">:</span> <span class="kc">True</span><span class="p">,</span>
|
||||
<span class="s2">"check_ssl"</span><span class="p">:</span> <span class="kc">True</span><span class="p">,</span>
|
||||
<span class="s2">"gpgkey_urls"</span><span class="p">:</span> <span class="p">[</span>
|
||||
<span class="s2">"file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-28-x86_64"</span>
|
||||
<span class="p">],</span>
|
||||
<span class="s2">"name"</span><span class="p">:</span> <span class="s2">"fedora"</span><span class="p">,</span>
|
||||
<span class="s2">"proxy"</span><span class="p">:</span> <span class="s2">"http://proxy.brianlane.com:8123"</span><span class="p">,</span>
|
||||
<span class="s2">"system"</span><span class="p">:</span> <span class="kc">True</span>
|
||||
<span class="s2">"type"</span><span class="p">:</span> <span class="s2">"yum-metalink"</span><span class="p">,</span>
|
||||
<span class="s2">"url"</span><span class="p">:</span> <span class="s2">"https://mirrors.fedoraproject.org/metalink?repo=fedora-28&arch=x86_64"</span>
|
||||
<span class="p">}</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
</dd></dl>
|
||||
|
||||
</div>
|
||||
<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>
|
||||
@ -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></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">
|
||||
<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>
|
||||
<dd><p>Return the names of the packages</p>
|
||||
</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">
|
||||
<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>
|
||||
@ -2635,6 +2804,93 @@ to satisfy the request.</p>
|
||||
</div>
|
||||
</div></blockquote>
|
||||
</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">"sources"</span><span class="p">:</span> <span class="p">[</span>
|
||||
<span class="s2">"fedora"</span><span class="p">,</span>
|
||||
<span class="s2">"fedora-cisco-openh264"</span><span class="p">,</span>
|
||||
<span class="s2">"fedora-updates-testing"</span><span class="p">,</span>
|
||||
<span class="s2">"fedora-updates"</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/<source-names></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">"errors"</span><span class="p">:</span> <span class="p">[],</span>
|
||||
<span class="s2">"sources"</span><span class="p">:</span> <span class="p">{</span>
|
||||
<span class="s2">"fedora"</span><span class="p">:</span> <span class="p">{</span>
|
||||
<span class="s2">"check_gpg"</span><span class="p">:</span> <span class="n">true</span><span class="p">,</span>
|
||||
<span class="s2">"check_ssl"</span><span class="p">:</span> <span class="n">true</span><span class="p">,</span>
|
||||
<span class="s2">"gpgkey_urls"</span><span class="p">:</span> <span class="p">[</span>
|
||||
<span class="s2">"file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-28-x86_64"</span>
|
||||
<span class="p">],</span>
|
||||
<span class="s2">"name"</span><span class="p">:</span> <span class="s2">"fedora"</span><span class="p">,</span>
|
||||
<span class="s2">"proxy"</span><span class="p">:</span> <span class="s2">"http://proxy.brianlane.com:8123"</span><span class="p">,</span>
|
||||
<span class="s2">"system"</span><span class="p">:</span> <span class="n">true</span><span class="p">,</span>
|
||||
<span class="s2">"type"</span><span class="p">:</span> <span class="s2">"yum-metalink"</span><span class="p">,</span>
|
||||
<span class="s2">"url"</span><span class="p">:</span> <span class="s2">"https://mirrors.fedoraproject.org/metalink?repo=fedora-28&arch=x86_64"</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">"name"</span><span class="p">:</span> <span class="s2">"custom-source-1"</span><span class="p">,</span>
|
||||
<span class="s2">"url"</span><span class="p">:</span> <span class="s2">"https://url/path/to/repository/"</span><span class="p">,</span>
|
||||
<span class="s2">"type"</span><span class="p">:</span> <span class="s2">"yum-baseurl"</span><span class="p">,</span>
|
||||
<span class="s2">"check_ssl"</span><span class="p">:</span> <span class="n">true</span><span class="p">,</span>
|
||||
<span class="s2">"check_gpg"</span><span class="p">:</span> <span class="n">true</span><span class="p">,</span>
|
||||
<span class="s2">"gpgkey_urls"</span><span class="p">:</span> <span class="p">[</span>
|
||||
<span class="s2">"https://url/path/to/gpg-key"</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/<source-name></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">
|
||||
<h4><cite>/api/v0/modules/list[?offset=0&limit=20]</cite><a class="headerlink" href="#api-v0-modules-list-offset-0-limit-20" title="Permalink to this headline">¶</a></h4>
|
||||
<blockquote>
|
||||
@ -3214,7 +3470,7 @@ a line boundry.</p>
|
||||
<script type="text/javascript">
|
||||
var DOCUMENTATION_OPTIONS = {
|
||||
URL_ROOT:'./',
|
||||
VERSION:'29.1',
|
||||
VERSION:'29.6',
|
||||
LANGUAGE:'None',
|
||||
COLLAPSE_INDEX:false,
|
||||
FILE_SUFFIX:'.html',
|
||||
@ -3235,9 +3491,7 @@ a line boundry.</p>
|
||||
|
||||
<script type="text/javascript">
|
||||
jQuery(function () {
|
||||
|
||||
SphinxRtdTheme.Navigation.enableSticky();
|
||||
|
||||
SphinxRtdTheme.Navigation.enable(true);
|
||||
});
|
||||
</script>
|
||||
|
||||
|
30
pylorax.html
30
pylorax.html
@ -8,7 +8,7 @@
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<title>pylorax package — Lorax 29.1 documentation</title>
|
||||
<title>pylorax package — Lorax 29.6 documentation</title>
|
||||
|
||||
|
||||
|
||||
@ -59,7 +59,7 @@
|
||||
|
||||
|
||||
<div class="version">
|
||||
29.1
|
||||
29.6
|
||||
</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&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/<project_names></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/<project_names></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/<source-names></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/<source-name></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&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/<module_names>[?offset=0&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/<module_names></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 can’t use the result
|
||||
of a command in an %if statement (or any other control statements)!</p>
|
||||
</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 there’s a
|
||||
big enough difference between the host and the image you’re modifying.</p>
|
||||
</li>
|
||||
@ -1484,20 +1488,6 @@ Examples:</p>
|
||||
</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">
|
||||
<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>
|
||||
@ -2271,7 +2261,7 @@ lowest numbered directory entry is returned.</p>
|
||||
<script type="text/javascript">
|
||||
var DOCUMENTATION_OPTIONS = {
|
||||
URL_ROOT:'./',
|
||||
VERSION:'29.1',
|
||||
VERSION:'29.6',
|
||||
LANGUAGE:'None',
|
||||
COLLAPSE_INDEX:false,
|
||||
FILE_SUFFIX:'.html',
|
||||
@ -2292,9 +2282,7 @@ lowest numbered directory entry is returned.</p>
|
||||
|
||||
<script type="text/javascript">
|
||||
jQuery(function () {
|
||||
|
||||
SphinxRtdTheme.Navigation.enableSticky();
|
||||
|
||||
SphinxRtdTheme.Navigation.enable(true);
|
||||
});
|
||||
</script>
|
||||
|
||||
|
10
search.html
10
search.html
@ -8,7 +8,7 @@
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<title>Search — Lorax 29.1 documentation</title>
|
||||
<title>Search — Lorax 29.6 documentation</title>
|
||||
|
||||
|
||||
|
||||
@ -57,7 +57,7 @@
|
||||
|
||||
|
||||
<div class="version">
|
||||
29.1
|
||||
29.6
|
||||
</div>
|
||||
|
||||
|
||||
@ -198,7 +198,7 @@
|
||||
<script type="text/javascript">
|
||||
var DOCUMENTATION_OPTIONS = {
|
||||
URL_ROOT:'./',
|
||||
VERSION:'29.1',
|
||||
VERSION:'29.6',
|
||||
LANGUAGE:'None',
|
||||
COLLAPSE_INDEX:false,
|
||||
FILE_SUFFIX:'.html',
|
||||
@ -220,9 +220,7 @@
|
||||
|
||||
<script type="text/javascript">
|
||||
jQuery(function () {
|
||||
|
||||
SphinxRtdTheme.Navigation.enableSticky();
|
||||
|
||||
SphinxRtdTheme.Navigation.enable(true);
|
||||
});
|
||||
</script>
|
||||
<script type="text/javascript">
|
||||
|
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user