ACC SHELL
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html>
<head>
<title>
SpaceCalculation.ycp
</title>
<style type="text/css">body { background-color: #c8c8c8 }
h1 { color: #e00000 }
table { width: 100%/ border: none }
img { border: 0px }
.sigbox { background-color: #ffc080; border: solid thin #f96500 }
.sig { font: larger monospace }
.padtbl { background-color: #ffc080; padding: 10px; margin: 10px }
/* arrow */
.a { color: #606060 }
/* type, parameter */
.t, .p { color: #c05000 }
.pbox { width: 20% }
.descbox { }
.right { align: right }
.header {}
.footer { clear: both}
.menu { width: 10%; float: left }
.main { width: 90%; float: left }
</style>
</head>
<body>
<div class="header">
<i>YaST2 Developers Documentation:</i>
<a href="index.html">
<b>
SpaceCalculation.ycp
</b>
</a>
<img class="right" alt="" src="/usr/share/doc/packages/yast2-devtools/images/yast2-mini.png" />
<hr />
</div>
<div class="menu">
<img alt="YaST" src="/usr/share/doc/packages/yast2-devtools/images/yast2-half.png" />
<br />
<br />
<a href="index.html">functions</a>
<br />
<a href="files.html">files</a>
<br />
<a href="intro.html">intro</a>
</div>
<div class="main">
<div class="sigbox">
<table class="padtbl">
<tr>
<td>
<h1>
SpaceCalculation.ycp
</h1>
</td>
</tr>
<tr>
<td></td>
</tr>
<tr>
<td>
<ul>
<li>Klaus Kaempf (kkaempf@suse.de)</li>
<li> Gabriele Strattner (gs@suse.de)</li>
<li> Stefan Schubert (schubi@suse.de)</li>
<li> Purpose: Package installation functions usable</li>
<li> when the installation media is available</li>
<li> on Installation::sourcedir</li>
</ul>
</td>
</tr>
<tr>
<td>
<p>This module has an unstable interface.</p>
</td>
</tr>
</table>
<table class="padtbl">
<tr>
<td>
<h1>Imports</h1>
<ul>
<li>Installation</li>
<li>Mode</li>
<li>ProductFeatures</li>
<li>Report</li>
<li>Stage</li>
<li>String</li>
</ul>
<h1>Global Functions</h1>
<ul>
<li>
<a href="#CheckDiskFreeSpace">CheckDiskFreeSpace (integer free_percent, integer max_unsufficient_free_size)</a>
</li>
<li>
<a href="#EvaluateFreeSpace">EvaluateFreeSpace (integer spare_percentage)</a>
</li>
</ul>
<h1>Local Functions</h1>
<ul>
<li>
<a href="#GetDirMountPoint">GetDirMountPoint (string target, list<map<string, string> > partition)</a>
</li>
</ul>
</td>
</tr>
</table>
</div>
<p />
<div class="sigbox">
<span class="sig" id="GetDirMountPoint">local
<b>GetDirMountPoint (string target, list<map<string, string> > partition)
<span class="a"> -> </span>
<span class="t">string</span>
</b>
</span>
</div>
<p>
Get mountpoint for a directory</p>
<dl>
<dt>
<b>Parameters:</b>
</dt>
<dd>
<table>
<tr>
<td class="pbox">
<span class="p">target</span>
</td>
<td class="descbox">directory</td>
</tr>
<tr>
<td class="pbox">
<span class="p">partition</span>
</td>
<td class="descbox">partitions list</td>
</tr>
</table>
</dd>
</dl>
<dl>
<dt>
<b>Return value:</b>
</dt>
<dd>
<table>
<tr>
<td class="pbox">
<span class="t" />
</td>
<td class="descbox">mountpoint</td>
</tr>
</table>
</dd>
</dl>
<div class="sigbox">
<span class="sig" id="EvaluateFreeSpace">global
<b>EvaluateFreeSpace (integer spare_percentage)
<span class="a"> -> </span>
<span class="t">list<map<string,any> ></span>
</b>
</span>
</div>
<p>
Evaluate the free space on the file system. Runs the command "df" and creates a map
containig information about used and free space on every partition.
Free space is calculated respecting the spare_percentage given in second argument.</p>
<dl>
<dt>
<b>Parameters:</b>
</dt>
<dd>
<table>
<tr>
<td class="pbox">
<span class="p">spare_percentage</span>
</td>
<td class="descbox">percentage of spare disk space, i.e. free space is increased</td>
</tr>
</table>
</dd>
</dl>
<dl>
<dt>
<b>Return value:</b>
</dt>
<dd>
<table>
<tr>
<td class="pbox">
<span class="t" />
</td>
<td class="descbox">partition list, e.g. [$["free":389318, "name":"/", "used":1487222],
$["free":1974697, "name":"/usr", "used":4227733]]
</td>
</tr>
</table>
</dd>
</dl>
<dl>
<dt>
<b>Example</b>
</dt>
<dd>
<table>
<tr>
<td align="left" valign="top"><pre>
EvaluateFreeSpace ( 5 );
*** This is needed during update !</pre></td>
</tr>
</table>
</dd>
</dl>
<div class="sigbox">
<span class="sig" id="CheckDiskFreeSpace">global
<b>CheckDiskFreeSpace (integer free_percent, integer max_unsufficient_free_size)
<span class="a"> -> </span>
<span class="t">list<map></span>
</b>
</span>
</div>
<p>
Check, if there is enough free space after installing the current selection</p>
<dl>
<dt>
<b>Parameters:</b>
</dt>
<dd>
<table>
<tr>
<td class="pbox">
<span class="p">free_percent</span>
</td>
<td class="descbox">minimal free space after installation (in percent)</td>
</tr>
<tr>
<td class="pbox">
<span class="p">max_unsufficient_free_size</span>
</td>
<td class="descbox"></td>
</tr>
</table>
</dd>
</dl>
<dl>
<dt>
<b>Return value:</b>
</dt>
<dd>
<table>
<tr>
<td class="pbox">
<span class="t" />
</td>
<td class="descbox">of partitions which have less than free_percent free size</td>
</tr>
</table>
</dd>
</dl>
</div>
<div class="footer">
<hr />
<i>YaST2 Developers Documentation</i>
<img class="right" alt="" src="/usr/share/doc/packages/yast2-devtools/images/yast2-mini.png" />
</div>
</body>
</html>
ACC SHELL 2018