File: | Dpkg/Control/Types.pm |
Coverage: | 100.0% |
line | stmt | bran | cond | sub | pod | time | code |
---|---|---|---|---|---|---|---|
1 | # This program is free software; you can redistribute it and/or modify | ||||||
2 | # it under the terms of the GNU General Public License as published by | ||||||
3 | # the Free Software Foundation; either version 2 of the License, or | ||||||
4 | # (at your option) any later version. | ||||||
5 | # | ||||||
6 | # This program is distributed in the hope that it will be useful, | ||||||
7 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||||
8 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||||||
9 | # GNU General Public License for more details. | ||||||
10 | # | ||||||
11 | # You should have received a copy of the GNU General Public License | ||||||
12 | # along with this program. If not, see <https://www.gnu.org/licenses/>. | ||||||
13 | |||||||
14 | =encoding utf8 | ||||||
15 | |||||||
16 - 30 | =head1 NAME Dpkg::Control::Types - export CTRL_* constants =head1 DESCRIPTION You should not use this module directly. Instead you more likely want to use L<Dpkg::Control> which also re-exports the same constants. This module has been introduced solely to avoid a dependency loop between L<Dpkg::Control> and L<Dpkg::Control::Fields>. B<Note>: This is a private module, its API can change at any time. =cut | ||||||
31 | |||||||
32 | package Dpkg::Control::Types 0.01; | ||||||
33 | |||||||
34 | 138 138 138 | 646 96 1830 | use strict; | ||||
35 | 138 138 138 | 215 85 6168 | use warnings; | ||||
36 | |||||||
37 | our @EXPORT = qw( | ||||||
38 | CTRL_UNKNOWN | ||||||
39 | CTRL_TMPL_SRC | ||||||
40 | CTRL_TMPL_PKG | ||||||
41 | CTRL_REPO_RELEASE | ||||||
42 | CTRL_REPO_SRC | ||||||
43 | CTRL_REPO_PKG | ||||||
44 | CTRL_DSC | ||||||
45 | CTRL_DEB | ||||||
46 | CTRL_FILE_BUILDINFO | ||||||
47 | CTRL_FILE_CHANGES | ||||||
48 | CTRL_FILE_VENDOR | ||||||
49 | CTRL_FILE_STATUS | ||||||
50 | CTRL_CHANGELOG | ||||||
51 | CTRL_COPYRIGHT_HEADER | ||||||
52 | CTRL_COPYRIGHT_FILES | ||||||
53 | CTRL_COPYRIGHT_LICENSE | ||||||
54 | CTRL_TESTS | ||||||
55 | |||||||
56 | CTRL_INFO_SRC | ||||||
57 | CTRL_INFO_PKG | ||||||
58 | CTRL_PKG_SRC | ||||||
59 | CTRL_PKG_DEB | ||||||
60 | CTRL_INDEX_SRC | ||||||
61 | CTRL_INDEX_PKG | ||||||
62 | ); | ||||||
63 | |||||||
64 | 138 138 138 | 353 86 5793 | use Exporter qw(import); | ||||
65 | |||||||
66 | use constant { | ||||||
67 | 138 | 15036 | CTRL_UNKNOWN => 0, | ||||
68 | # First source package control stanza in debian/control. | ||||||
69 | CTRL_TMPL_SRC => 1 << 0, | ||||||
70 | # Subsequent binary package control stanza in debian/control. | ||||||
71 | CTRL_TMPL_PKG => 1 << 1, | ||||||
72 | # Entry in repository's Sources files. | ||||||
73 | CTRL_REPO_SRC => 1 << 2, | ||||||
74 | # Entry in repository's Packages files. | ||||||
75 | CTRL_REPO_PKG => 1 << 3, | ||||||
76 | # .dsc file of source package. | ||||||
77 | CTRL_DSC => 1 << 4, | ||||||
78 | # DEBIAN/control in binary packages. | ||||||
79 | CTRL_DEB => 1 << 5, | ||||||
80 | # .changes file. | ||||||
81 | CTRL_FILE_CHANGES => 1 << 6, | ||||||
82 | # File in $Dpkg::CONFDIR/origins. | ||||||
83 | CTRL_FILE_VENDOR => 1 << 7, | ||||||
84 | # $Dpkg::ADMINDIR/status. | ||||||
85 | CTRL_FILE_STATUS => 1 << 8, | ||||||
86 | # Output of dpkg-parsechangelog. | ||||||
87 | CTRL_CHANGELOG => 1 << 9, | ||||||
88 | # Repository's (In)Release file. | ||||||
89 | CTRL_REPO_RELEASE => 1 << 10, | ||||||
90 | # Header control stanza in debian/copyright. | ||||||
91 | CTRL_COPYRIGHT_HEADER => 1 << 11, | ||||||
92 | # Files control stanza in debian/copyright. | ||||||
93 | CTRL_COPYRIGHT_FILES => 1 << 12, | ||||||
94 | # License control stanza in debian/copyright. | ||||||
95 | CTRL_COPYRIGHT_LICENSE => 1 << 13, | ||||||
96 | # Package test suite control file in debian/tests/control. | ||||||
97 | CTRL_TESTS => 1 << 14, | ||||||
98 | # .buildinfo file | ||||||
99 | CTRL_FILE_BUILDINFO => 1 << 15, | ||||||
100 | 138 138 | 439 94 | }; | ||||
101 | |||||||
102 | # Backwards compatibility aliases. | ||||||
103 | use constant { | ||||||
104 | 138 | 5224 | CTRL_INFO_SRC => CTRL_TMPL_SRC, | ||||
105 | CTRL_INFO_PKG => CTRL_TMPL_PKG, | ||||||
106 | CTRL_PKG_SRC => CTRL_DSC, | ||||||
107 | CTRL_PKG_DEB => CTRL_DEB, | ||||||
108 | CTRL_INDEX_SRC => CTRL_REPO_SRC, | ||||||
109 | CTRL_INDEX_PKG => CTRL_REPO_PKG, | ||||||
110 | 138 138 | 338 131 | }; | ||||
111 | |||||||
112 - 118 | =head1 CHANGES =head2 Version 0.xx This is a private module. =cut | ||||||
119 | |||||||
120 | 1; |