/usr/share/doc/git-buildpackage/apidocs/gbp.pkg.pkgpolicy.PkgPolicy.html is in git-buildpackage 0.9.8.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 | <?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"DTD/xhtml1-strict.dtd">
<html>
<head>
<title>gbp.pkg.pkgpolicy.PkgPolicy : API documentation</title>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
<link href="bootstrap.min.css" type="text/css" rel="stylesheet" />
<link href="apidocs.css" type="text/css" rel="stylesheet" />
</head>
<body>
<nav class="navbar navbar-default">
<div class="container">
<div class="navbar-header">
<a href="index.html" class="navbar-brand">
<a href="https://honk.sigxcpu.org/piki/projects/git-buildpackage/">git-buildpackage</a> API Documentation
</a>
</div>
</div>
</nav>
<div id="showPrivate">
<button class="btn btn-link" onclick="togglePrivate()">Toggle Private API</button>
</div>
<div class="container">
<div class="page-header">
<h1 class="class"><code>gbp.pkg.pkgpolicy.PkgPolicy(<span title="object">object</span>)</code> <small>class documentation</small></h1>
<span id="partOf">
Part of <code><a href="gbp.html" data-type="Package" class="code">gbp</a>.<a href="gbp.pkg.html" data-type="Package" class="code">pkg</a>.<a href="gbp.pkg.pkgpolicy.html" data-type="Module" class="code">pkgpolicy</a></code>
<a href="classIndex.html#gbp.pkg.pkgpolicy.PkgPolicy">(View In Hierarchy)</a>
</span>
</div>
<div class="extrasDocstring">
<p>Known subclasses: <a href="gbp.deb.policy.DebianPkgPolicy.html" data-type="Class" class="code">gbp.deb.policy.DebianPkgPolicy</a>, <a href="gbp.rpm.policy.RpmPkgPolicy.html" data-type="Class" class="code">gbp.rpm.policy.RpmPkgPolicy</a></p>
</div>
<div class="moduleDocstring">
<div><p>Common helpers for packaging policy.</p><table class="fieldTable"></table></div>
</div>
<div id="splitTables">
<table class="children sortable" id="id140">
<tr class="classmethod">
<td>Class Method</td>
<td><a href="gbp.pkg.pkgpolicy.PkgPolicy.html#is_valid_packagename" data-type="Class Method" class="code">is_valid_packagename</a></td>
<td><span>Is this a valid package name?</span></td>
</tr><tr class="classmethod">
<td>Class Method</td>
<td><a href="gbp.pkg.pkgpolicy.PkgPolicy.html#is_valid_upstreamversion" data-type="Class Method" class="code">is_valid_upstreamversion</a></td>
<td><span>Is this a valid upstream version number?</span></td>
</tr><tr class="staticmethod">
<td>Static Method</td>
<td><a href="gbp.pkg.pkgpolicy.PkgPolicy.html#guess_upstream_src_version" data-type="Static Method" class="code">guess_upstream_src_version</a></td>
<td><span>Guess the package name and version from the filename of an upstream
archive.</span></td>
</tr><tr class="staticmethod">
<td>Static Method</td>
<td><a href="gbp.pkg.pkgpolicy.PkgPolicy.html#has_origs" data-type="Static Method" class="code">has_origs</a></td>
<td><span>Check orig tarball and additional tarballs exists in dir</span></td>
</tr><tr class="classmethod">
<td>Class Method</td>
<td><a href="gbp.pkg.pkgpolicy.PkgPolicy.html#has_orig" data-type="Class Method" class="code">has_orig</a></td>
<td><span class="undocumented">Undocumented</span></td>
</tr><tr class="staticmethod">
<td>Static Method</td>
<td><a href="gbp.pkg.pkgpolicy.PkgPolicy.html#symlink_origs" data-type="Static Method" class="code">symlink_origs</a></td>
<td><span>symlink orig tarball from orig_dir to output_dir @return: [] if all
links were created, list of failed links otherwise</span></td>
</tr><tr class="classmethod">
<td>Class Method</td>
<td><a href="gbp.pkg.pkgpolicy.PkgPolicy.html#symlink_orig" data-type="Class Method" class="code">symlink_orig</a></td>
<td><span class="undocumented">Undocumented</span></td>
</tr>
</table>
</div>
<div id="childList">
<div class="baseclassmethod">
<a name="gbp.pkg.pkgpolicy.PkgPolicy.is_valid_packagename">
</a>
<a name="is_valid_packagename">
</a>
<div class="functionHeader">
@classmethod<br />
def
is_valid_packagename(cls, name):
</div>
<div class="docstring functionBody">
<div><p>Is this a valid package name?</p>
<pre class="py-doctest">
<span class="py-prompt">>>> </span>PkgPolicy.is_valid_packagename(<span class="py-string">'doesnotmatter'</span>)
<span class="py-except">Traceback (most recent call last):</span>
<span class="py-except">...</span>
<span class="py-except">NotImplementedError: Class needs to provide packagename_re</span></pre><table class="fieldTable"></table></div>
</div>
</div><div class="baseclassmethod">
<a name="gbp.pkg.pkgpolicy.PkgPolicy.is_valid_upstreamversion">
</a>
<a name="is_valid_upstreamversion">
</a>
<div class="functionHeader">
@classmethod<br />
def
is_valid_upstreamversion(cls, version):
</div>
<div class="docstring functionBody">
<div><p>Is this a valid upstream version number?</p>
<pre class="py-doctest">
<span class="py-prompt">>>> </span>PkgPolicy.is_valid_upstreamversion(<span class="py-string">'doesnotmatter'</span>)
<span class="py-except">Traceback (most recent call last):</span>
<span class="py-except">...</span>
<span class="py-except">NotImplementedError: Class needs to provide upstreamversion_re</span></pre><table class="fieldTable"></table></div>
</div>
</div><div class="basestaticmethod">
<a name="gbp.pkg.pkgpolicy.PkgPolicy.guess_upstream_src_version">
</a>
<a name="guess_upstream_src_version">
</a>
<div class="functionHeader">
@staticmethod<br />
def
guess_upstream_src_version(filename, extra_regex=''):
</div>
<div class="docstring functionBody">
<div><p>Guess the package name and version from the filename of an upstream
archive.</p><table class="fieldTable"><tr class="fieldStart"><td class="fieldName">Parameters</td><td class="fieldArg">filename</td><td>filename (archive or directory) from which to guess (type: <code>string</code>)</td></tr><tr><td></td><td class="fieldArg">extra_regex</td><td>additional regex to apply, needs a 'package' and a 'version' group</td></tr><tr class="fieldStart"><td class="fieldName">Returns</td><td colspan="2">(package name, version) or ('', '') (type: tuple
<pre class="py-doctest">
<span class="py-prompt">>>> </span>PkgPolicy.guess_upstream_src_version(<span class="py-string">'foo-bar_0.2.orig.tar.gz'</span>)
<span class="py-output">('foo-bar', '0.2')</span>
<span class="py-output"></span><span class="py-prompt">>>> </span>PkgPolicy.guess_upstream_src_version(<span class="py-string">'foo-Bar_0.2.orig.tar.gz'</span>)
<span class="py-output">('', '')</span>
<span class="py-output"></span><span class="py-prompt">>>> </span>PkgPolicy.guess_upstream_src_version(<span class="py-string">'git-bar-0.2.tar.gz'</span>)
<span class="py-output">('git-bar', '0.2')</span>
<span class="py-output"></span><span class="py-prompt">>>> </span>PkgPolicy.guess_upstream_src_version(<span class="py-string">'git-bar-0.2-rc1.tar.gz'</span>)
<span class="py-output">('git-bar', '0.2-rc1')</span>
<span class="py-output"></span><span class="py-prompt">>>> </span>PkgPolicy.guess_upstream_src_version(<span class="py-string">'git-bar-0.2:~-rc1.tar.gz'</span>)
<span class="py-output">('git-bar', '0.2:~-rc1')</span>
<span class="py-output"></span><span class="py-prompt">>>> </span>PkgPolicy.guess_upstream_src_version(<span class="py-string">'git-Bar-0A2d:rc1.tar.bz2'</span>)
<span class="py-output">('git-Bar', '0A2d:rc1')</span>
<span class="py-output"></span><span class="py-prompt">>>> </span>PkgPolicy.guess_upstream_src_version(<span class="py-string">'git-1.tar.bz2'</span>)
<span class="py-output">('git', '1')</span>
<span class="py-output"></span><span class="py-prompt">>>> </span>PkgPolicy.guess_upstream_src_version(<span class="py-string">'kvm_87+dfsg.orig.tar.gz'</span>)
<span class="py-output">('kvm', '87+dfsg')</span>
<span class="py-output"></span><span class="py-prompt">>>> </span>PkgPolicy.guess_upstream_src_version(<span class="py-string">'foo-Bar-a.b.tar.gz'</span>)
<span class="py-output">('', '')</span>
<span class="py-output"></span><span class="py-prompt">>>> </span>PkgPolicy.guess_upstream_src_version(<span class="py-string">'foo-bar_0.2.orig.tar.xz'</span>)
<span class="py-output">('foo-bar', '0.2')</span>
<span class="py-output"></span><span class="py-prompt">>>> </span>PkgPolicy.guess_upstream_src_version(<span class="py-string">'foo-bar_0.2.orig.tar.lzma'</span>)
<span class="py-output">('foo-bar', '0.2')</span>
<span class="py-output"></span><span class="py-prompt">>>> </span>PkgPolicy.guess_upstream_src_version(<span class="py-string">'foo-bar-0.2.zip'</span>)
<span class="py-output">('foo-bar', '0.2')</span>
<span class="py-output"></span><span class="py-prompt">>>> </span>PkgPolicy.guess_upstream_src_version(<span class="py-string">'foo-bar-0.2.tlz'</span>)
<span class="py-output">('foo-bar', '0.2')</span>
<span class="py-output"></span><span class="py-prompt">>>> </span>PkgPolicy.guess_upstream_src_version(<span class="py-string">'foo-bar_0.2.tar.gz'</span>)
<span class="py-output">('foo-bar', '0.2')</span></pre>)</td></tr></table></div>
</div>
</div><div class="basestaticmethod">
<a name="gbp.pkg.pkgpolicy.PkgPolicy.has_origs">
</a>
<a name="has_origs">
</a>
<div class="functionHeader">
@staticmethod<br />
def
has_origs(orig_files, dir):
</div>
<div class="docstring functionBody">
<div><p>Check orig tarball and additional tarballs exists in dir</p><table class="fieldTable"></table></div>
</div>
</div><div class="baseclassmethod">
<a name="gbp.pkg.pkgpolicy.PkgPolicy.has_orig">
</a>
<a name="has_orig">
</a>
<div class="functionHeader">
@classmethod<br />
def
has_orig(cls, orig_file, dir):
</div>
<div class="docstring functionBody">
<div class="undocumented">Undocumented</div>
</div>
</div><div class="basestaticmethod">
<a name="gbp.pkg.pkgpolicy.PkgPolicy.symlink_origs">
</a>
<a name="symlink_origs">
</a>
<div class="functionHeader">
@staticmethod<br />
def
symlink_origs(orig_files, orig_dir, output_dir, force=False):
</div>
<div class="docstring functionBody">
<div><p>symlink orig tarball from orig_dir to output_dir</p><table class="fieldTable"><tr class="fieldStart"><td class="fieldName">Returns</td><td colspan="2">[] if all links were created, list of failed links otherwise</td></tr></table></div>
</div>
</div><div class="baseclassmethod">
<a name="gbp.pkg.pkgpolicy.PkgPolicy.symlink_orig">
</a>
<a name="symlink_orig">
</a>
<div class="functionHeader">
@classmethod<br />
def
symlink_orig(cls, orig_file, orig_dir, output_dir, force=False):
</div>
<div class="docstring functionBody">
<div class="undocumented">Undocumented</div>
</div>
</div>
</div>
<address>
<a href="index.html">API Documentation</a> for <a href="https://honk.sigxcpu.org/piki/projects/git-buildpackage/">git-buildpackage</a>, generated by <a href="https://github.com/twisted/pydoctor/">pydoctor</a> at 2018-04-03 11:06:47.
</address>
</div>
<script type="text/javascript" src="pydoctor.js"></script>
</body>
</html>
|