1 # Copyright © 1998 Richard Braakman
2 # Copyright © 1999 Darren Benham
3 # Copyright © 2000 Sean 'Shaleh' Perry
4 # Copyright © 2004 Frank Lichtenheld
5 # Copyright © 2006 Russ Allbery
6 # Copyright © 2007-2009 Raphaël Hertzog <hertzog@debian.org>
7 # Copyright © 2008-2009, 2012-2014 Guillem Jover <guillem@debian.org>
9 # This program is free software; you may redistribute it and/or modify
10 # it under the terms of the GNU General Public License as published by
11 # the Free Software Foundation; either version 2 of the License, or
12 # (at your option) any later version.
14 # This is distributed in the hope that it will be useful,
15 # but WITHOUT ANY WARRANTY; without even the implied warranty of
16 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 # GNU General Public License for more details.
19 # You should have received a copy of the GNU General Public License
20 # along with this program. If not, see <https://www.gnu.org/licenses/>.
26 Dpkg::Deps::Union - list of unrelated dependencies
30 This class represents a list of relationships.
31 It inherits from L<Dpkg::Deps::Multiple>.
35 package Dpkg
::Deps
::Union
1.00;
40 use parent
qw(Dpkg::Deps::Multiple);
46 =item $dep->output([$fh])
48 The output() method uses ", " to join the list of relationships.
55 my $res = join(', ', map {
67 =item $dep->implies($other_dep)
69 =item $dep->get_evaluation($other_dep)
71 These methods are not meaningful for this object and always return undef.
76 # Implication test is not useful on Union.
81 # Evaluation is not useful on Union.
85 =item $dep->simplify_deps($facts)
87 The simplification is done to generate an union of all the relationships.
88 It uses $simple_dep->merge_union($other_dep) to get its job done.
93 my ($self, $facts) = @_;
97 while (@
{$self->{list
}}) {
98 my $odep = shift @
{$self->{list
}};
99 foreach my $dep (@new) {
100 next WHILELOOP
if $dep->merge_union($odep);
104 $self->{list
} = [ @new ];
111 =head2 Version 1.00 (dpkg 1.15.6)
113 Mark the module as public.