From cbffab246997fb5a06211dfb706b54e5ae5bb59f Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 7 Apr 2024 16:58:51 +0200 Subject: Adding upstream version 1.21.22. Signed-off-by: Daniel Baumann --- scripts/Dpkg.pm | 307 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 307 insertions(+) create mode 100644 scripts/Dpkg.pm (limited to 'scripts/Dpkg.pm') diff --git a/scripts/Dpkg.pm b/scripts/Dpkg.pm new file mode 100644 index 0000000..edb0d32 --- /dev/null +++ b/scripts/Dpkg.pm @@ -0,0 +1,307 @@ +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +package Dpkg; + +=encoding utf8 + +=head1 NAME + +Dpkg - module with core variables + +=head1 DESCRIPTION + +The Dpkg module provides a set of variables with information concerning +this system installation. + +It is also the entry point to the Dpkg module hierarchy. + +=cut + +use strict; +use warnings; + +our $VERSION = '2.00'; +our @EXPORT_OK = qw( + $PROGNAME + $PROGVERSION + $PROGMAKE + $PROGTAR + $PROGPATCH + $CONFDIR + $ADMINDIR + $LIBDIR + $DATADIR +); + +use Exporter qw(import); + +=head1 VARIABLES + +=over 4 + +=item $Dpkg::PROGNAME + +Contains the name of the current program. + +=item $Dpkg::PROGVERSION + +Contains the version of the dpkg suite. + +=item $Dpkg::PROGMAKE + +Contains the name of the system GNU make program. + +=item $Dpkg::PROGTAR + +Contains the name of the system GNU tar program. + +=item $Dpkg::PROGPATCH + +Contains the name of the system GNU patch program (or another implementation +that is directory traversal resistant). + +=item $Dpkg::CONFDIR + +Contains the path to the dpkg system configuration directory. + +=item $Dpkg::ADMINDIR + +Contains the path to the dpkg database directory. + +=item $Dpkg::LIBDIR + +Contains the path to the dpkg methods and plugins directory. + +=item $Dpkg::DATADIR + +Contains the path to the dpkg architecture tables directory. + +=back + +=cut + +our ($PROGNAME) = $0 =~ m{(?:.*/)?([^/]*)}; + +# The following lines are automatically fixed at install time +our $PROGVERSION = '1.21.x'; +our $PROGMAKE = $ENV{DPKG_PROGMAKE} // 'make'; +our $PROGTAR = $ENV{DPKG_PROGTAR} // 'tar'; +our $PROGPATCH = $ENV{DPKG_PROGPATCH} // 'patch'; + +our $CONFDIR = '/etc/dpkg'; +our $ADMINDIR = '/var/lib/dpkg'; +our $LIBDIR = '.'; +our $DATADIR = '../data'; + +$DATADIR = $ENV{DPKG_DATADIR} if defined $ENV{DPKG_DATADIR}; + +=head1 MODULES + +The following is the list of public modules within the Dpkg hierarchy. Only +modules with versions 1.00 or higher, and only the interfaces documented in +their POD are considered public. + +=over + +=item L + +This module, core variables. + +=item L + +Architecture handling functions. + +=item L + +Set, modify and query compilation build flags. + +=item L + +Build information functions. + +=item L + +Parse and manipulate B. + +=item L + +Parse and manipulate build profiles. + +=item L + +Parse changelogs. + +=item L + +Represents a changelog entry. + +=item L + +Generic changelog parser for F. + +=item L + +Generate and parse checksums. + +=item L + +Simple database of available compression methods. + +=item L + +Transparently compress and decompress files. + +=item L + +Wrapper around compression tools. + +=item L + +Parse F configuration files. + +=item L + +Parse and manipulate Debian control information (F<.dsc>, F<.changes>, +F/F entries, etc.). + +=item L + +Represent fields output by F. + +=item L + +Manage (list of known) control fields. + +=item L + +Parse and manipulate a stanza of deb822 fields. + +=item L + +Parse files like F. + +=item L + +Parse files like F. + +=item L + +Represents a F stanza. + +=item L + +Parse and manipulate dependencies. + +=item L + +Represents a single dependency statement. + +=item L + +Base module to represent multiple dependencies. + +=item L + +List of unrelated dependencies. + +=item L + +List of AND dependencies. + +=item L + +List of OR dependencies. + +=item L + +List of installed and virtual packages. + +=item L + +Push, pop and run exit handlers. + +=item L + +Wrapper around L. + +=item L + +Spawn sub-processes and feed/retrieve data. + +=item L + +Collections of L (F/F files for example). + +=item L + +Base object serializer. + +=item L + +Common path handling functions. + +=item L + +Parse and manipulate debian/source/format files. + +=item L + +Extract Debian source packages. + +=item L + +Substitute variables in strings. + +=item L + +Identify current distribution vendor. + +=item L + +Parse and manipulate Debian package versions. + +=back + +=head1 CHANGES + +=head2 Version 2.00 (dpkg 1.20.0) + +Remove variables: $version, $progname, $admindir, $dpkglibdir and $pkgdatadir. + +=head2 Version 1.03 (dpkg 1.18.24) + +New variable: $PROGPATCH. + +=head2 Version 1.02 (dpkg 1.18.11) + +New variable: $PROGTAR, $PROGMAKE. + +=head2 Version 1.01 (dpkg 1.17.0) + +New variables: $PROGNAME, $PROGVERSION, $CONFDIR, $ADMINDIR, $LIBDIR and +$DATADIR. + +Deprecated variables: $version, $admindir, $dpkglibdir and $pkgdatadir. + +=head2 Version 1.00 (dpkg 1.15.6) + +Mark the module as public. + +=head1 LICENSE + +See the header comment on each module for their particular license. + +=cut + +1; -- cgit v1.2.3