Dpkg.pm

filter: Statementstmt 100% 17 / 17 Branchbran 50.0% 1 / 2 Conditioncond 50.0% 3 / 6 MC/DCmcdc 0.0% 0 / 3 Subroutinesub 100% 2 / 2 Podpod n/a totaltotal 76.6% 23 / 30 CC 1 SCAR 0.0
CC
1
Cov
84%
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
« Dpkg/Control/Tests.pm ↑ Summary Dpkg/Control/Fields.pm »
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 =head1 NAME
17  
18 Dpkg - module with core variables
19  
20 =head1 DESCRIPTION
21  
22 The Dpkg module provides a set of variables with information concerning
23 this system installation.
24  
25 It is also the entry point to the Dpkg module hierarchy.
26  
27 =cut
28  
29 package Dpkg 2.00;
30  
31 575 ▶use v5.36;
Subroutine BEGIN: called CC=1 SCAR=0.0
32  
33 573 our @EXPORT_OK = qw(
34 $PROGNAME
35 $PROGVERSION
36 $PROGMAKE
37 $PROGTAR
38 $PROGPATCH
39 $CONFDIR
40 $ADMINDIR
41 $LIBDIR
42 $DATADIR
43 );
44  
45 575 ▶use Exporter qw(import);
Subroutine BEGIN: called CC=1 SCAR=0.0
46  
47 =head1 VARIABLES
48  
49 =over 4
50  
51 =item $Dpkg::PROGNAME
52  
53 Contains the name of the current program.
54  
55 =item $Dpkg::PROGVERSION
56  
57 Contains the version of the dpkg suite.
58  
59 =item $Dpkg::PROGMAKE
60  
61 Contains the name of the system GNU make program.
62  
63 =item $Dpkg::PROGTAR
64  
65 Contains the name of the system GNU tar program.
66  
67 =item $Dpkg::PROGPATCH
68  
69 Contains the name of the system GNU patch program (or another implementation
70 that is directory traversal resistant).
71  
72 =item $Dpkg::CONFDIR
73  
74 Contains the path to the dpkg system configuration directory.
75  
76 =item $Dpkg::ADMINDIR
77  
78 Contains the path to the dpkg database directory.
79  
80 =item $Dpkg::LIBDIR
81  
82 Contains the path to the dpkg methods and plugins directory.
83  
84 =item $Dpkg::DATADIR
85  
86 Contains the path to the dpkg architecture tables directory.
87  
88 =back
89  
90 =cut
91  
92 573 our ($PROGNAME) = $0 =~ m{(?:.*/)?([^/]*)};
93  
94 # The following lines are automatically fixed at install time.
95 573 our $PROGVERSION = '1.23.x';
96 573 ▶our $PROGMAKE = $ENV{DPKG_PROGMAKE} // 'make';
Condition50%1/2
$ENV{"DPKG_PROGMAKE"} // "make"
l!l
0573
MC/DC0%0/1
$ENV{"DPKG_PROGMAKE"} // "make"
$ENV{"DPKG_PROGMAKE"}
Truth table50%1/2
A
A= $ENV{"DPKG_PROGMAKE"}
Aresult
11
00
97 573 ▶our $PROGTAR = $ENV{DPKG_PROGTAR} // 'tar';
Condition50%1/2
$ENV{"DPKG_PROGTAR"} // "tar"
l!l
0573
MC/DC0%0/1
$ENV{"DPKG_PROGTAR"} // "tar"
$ENV{"DPKG_PROGTAR"}
Truth table50%1/2
A
A= $ENV{"DPKG_PROGTAR"}
Aresult
11
00
98 573 ▶our $PROGPATCH = $ENV{DPKG_PROGPATCH} // 'patch';
Condition50%1/2
$ENV{"DPKG_PROGPATCH"} // "patch"
l!l
0573
MC/DC0%0/1
$ENV{"DPKG_PROGPATCH"} // "patch"
$ENV{"DPKG_PROGPATCH"}
Truth table50%1/2
A
A= $ENV{"DPKG_PROGPATCH"}
Aresult
11
00
99  
100 573 our $CONFDIR = '/etc/dpkg';
101 573 our $ADMINDIR = '/var/lib/dpkg';
102 573 our $LIBDIR = '.';
103 573 our $DATADIR = '../data';
104  
105 573 ▶$DATADIR = $ENV{DPKG_DATADIR} if defined $ENV{DPKG_DATADIR};
Branch: 1 branch
BranchTrueFalseTotal
if defined $ENV{"DPKG_DATADIR"} 573 0 573
106  
107 =head1 MODULES
108  
109 The following is the list of public modules within the Dpkg hierarchy. Only
110 modules with versions 1.00 or higher, and only the interfaces documented in
111 their POD are considered public.
112  
113 =over
114  
115 =item L<Dpkg>
116  
117 This module, core variables.
118  
119 =item L<Dpkg::Arch>
120  
121 Architecture handling functions.
122  
123 =item L<Dpkg::BuildFlags>
124  
125 Set, modify and query compilation build flags.
126  
127 =item L<Dpkg::BuildInfo>
128  
129 Build information functions.
130  
131 =item L<Dpkg::BuildOptions>
132  
133 Parse and manipulate B<DEB_BUILD_OPTIONS>.
134  
135 =item L<Dpkg::BuildProfiles>
136  
137 Parse and manipulate build profiles.
138  
139 =item L<Dpkg::Changelog>
140  
141 Parse changelogs.
142  
143 =item L<Dpkg::Changelog::Entry>
144  
145 Represents a changelog entry.
146  
147 =item L<Dpkg::Changelog::Parse>
148  
149 Generic changelog parser for F<dpkg-parsechangelog>.
150  
151 =item L<Dpkg::Checksums>
152  
153 Generate and parse checksums.
154  
155 =item L<Dpkg::Compression>
156  
157 Simple database of available compression methods.
158  
159 =item L<Dpkg::Compression::FileHandle>
160  
161 Transparently compress and decompress files.
162  
163 =item L<Dpkg::Compression::Process>
164  
165 Wrapper around compression tools.
166  
167 =item L<Dpkg::Conf>
168  
169 Parse F<dpkg> configuration files.
170  
171 =item L<Dpkg::Control>
172  
173 Parse and manipulate Debian control information (F<.dsc>, F<.changes>,
174 F<Packages>/F<Sources> entries, etc.).
175  
176 =item L<Dpkg::Control::Changelog>
177  
178 Represent fields output by F<dpkg-parsechangelog>.
179  
180 =item L<Dpkg::Control::Fields>
181  
182 Manage (list of known) control fields.
183  
184 =item L<Dpkg::Control::Hash>
185  
186 Parse and manipulate a stanza of deb822 fields.
187  
188 =item L<Dpkg::Control::Info>
189  
190 Parse files like F<debian/control>.
191  
192 =item L<Dpkg::Control::Tests>
193  
194 Parse files like F<debian/tests/control>.
195  
196 =item L<Dpkg::Control::Tests::Entry>
197  
198 Represents a F<debian/tests/control> stanza.
199  
200 =item L<Dpkg::Deps>
201  
202 Parse and manipulate dependencies.
203  
204 =item L<Dpkg::Deps::Simple>
205  
206 Represents a single dependency statement.
207  
208 =item L<Dpkg::Deps::Multiple>
209  
210 Base module to represent multiple dependencies.
211  
212 =item L<Dpkg::Deps::Union>
213  
214 List of unrelated dependencies.
215  
216 =item L<Dpkg::Deps::AND>
217  
218 List of AND dependencies.
219  
220 =item L<Dpkg::Deps::OR>
221  
222 List of OR dependencies.
223  
224 =item L<Dpkg::Deps::KnownFacts>
225  
226 List of installed and virtual packages.
227  
228 =item L<Dpkg::Exit>
229  
230 Push, pop and run exit handlers.
231  
232 =item L<Dpkg::Gettext>
233  
234 Wrapper around L<Locale::gettext>.
235  
236 =item L<Dpkg::IPC>
237  
238 Spawn sub-processes and feed/retrieve data.
239  
240 =item L<Dpkg::Index>
241  
242 Collections of L<Dpkg::Control> (F<Packages>/F<Sources> files for example).
243  
244 =item L<Dpkg::Interface::Storable>
245  
246 Base object serializer.
247  
248 =item L<Dpkg::Path>
249  
250 Common path handling functions.
251  
252 =item L<Dpkg::Source::Format>
253  
254 Parse and manipulate debian/source/format files.
255  
256 =item L<Dpkg::Source::Package>
257  
258 Extract Debian source packages.
259  
260 =item L<Dpkg::Substvars>
261  
262 Substitute variables in strings.
263  
264 =item L<Dpkg::Vendor>
265  
266 Identify current distribution vendor.
267  
268 =item L<Dpkg::Version>
269  
270 Parse and manipulate Debian package versions.
271  
272 =back
273  
274 =head1 CHANGES
275  
276 =head2 Version 2.00 (dpkg 1.20.0)
277  
278 Remove variables: $version, $progname, $admindir, $dpkglibdir and $pkgdatadir.
279  
280 =head2 Version 1.03 (dpkg 1.18.24)
281  
282 New variable: $PROGPATCH.
283  
284 =head2 Version 1.02 (dpkg 1.18.11)
285  
286 New variable: $PROGTAR, $PROGMAKE.
287  
288 =head2 Version 1.01 (dpkg 1.17.0)
289  
290 New variables: $PROGNAME, $PROGVERSION, $CONFDIR, $ADMINDIR, $LIBDIR and
291 $DATADIR.
292  
293 Deprecated variables: $version, $admindir, $dpkglibdir and $pkgdatadir.
294  
295 =head2 Version 1.00 (dpkg 1.15.6)
296  
297 Mark the module as public.
298  
299 =head1 LICENSE
300  
301 See the header comment on each module for their particular license.
302  
303 =cut
304  
305 573 1;
« Dpkg/Control/Tests.pm ↑ Summary Dpkg/Control/Fields.pm »