diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2001-02-21 18:01:37 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2001-02-21 18:01:37 +0000 |
commit | 0869e606e8f1b68e9f4e3d32c76cfbaaac2b8469 (patch) | |
tree | 81b9a1c274def506da8e1be86735ca2ea8df0334 /perl-install/pkgs.pm | |
parent | 512c92973dc5eceae594bd389350a1ab16da7981 (diff) | |
download | drakx-0869e606e8f1b68e9f4e3d32c76cfbaaac2b8469.tar drakx-0869e606e8f1b68e9f4e3d32c76cfbaaac2b8469.tar.gz drakx-0869e606e8f1b68e9f4e3d32c76cfbaaac2b8469.tar.bz2 drakx-0869e606e8f1b68e9f4e3d32c76cfbaaac2b8469.tar.xz drakx-0869e606e8f1b68e9f4e3d32c76cfbaaac2b8469.zip |
(selected_leaves): created
Diffstat (limited to 'perl-install/pkgs.pm')
-rw-r--r-- | perl-install/pkgs.pm | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/perl-install/pkgs.pm b/perl-install/pkgs.pm index 6c6c6d1eb..84c38a6ad 100644 --- a/perl-install/pkgs.pm +++ b/perl-install/pkgs.pm @@ -616,7 +616,7 @@ sub read_rpmsrate { (?: \s*\|\|\s* (?: !\s*)? [0-9A-Z_]+(?:".*?")?)* ) (?:\s+|$) - )(.*)/x) { + )(.*)/x) { #@")) { ($t, $flag, $data) = ($1,$2,$3); while ($flag =~ s,^\s*(("[^"]*"|[^"\s]*)*)\s+,$1,) {} my $ok = 0; @@ -1342,4 +1342,23 @@ sub remove($$) { @{$toRemove || []} = (); } +sub selected_leaves { + my ($packages) = @_; + my %l; + $l{$_->[$FILE]} = 1 foreach grep { packageFlagSelected($_) && !packageFlagBase($_) } @{$packages->{depslist}}; + + my %m = %l; + foreach (@{$packages->{depslist}}) { + delete $m{$_->[$FILE]} or next; + + foreach (map { split '\|' } grep { !/^NOTFOUND_/ } packageDepsId($_)) { + delete $l{$packages->{depslist}[$_][$FILE]}; + } + } + [ map { + my @l; $l[$FILE] = $_; + packageName(\@l); + } grep { $l{$_} } keys %l ]; +} + 1; |