summaryrefslogtreecommitdiffstats
path: root/perl-install/pkgs.pm
diff options
context:
space:
mode:
Diffstat (limited to 'perl-install/pkgs.pm')
-rw-r--r--perl-install/pkgs.pm17
1 files changed, 16 insertions, 1 deletions
diff --git a/perl-install/pkgs.pm b/perl-install/pkgs.pm
index 2ba869eb9..3bf3f2e93 100644
--- a/perl-install/pkgs.pm
+++ b/perl-install/pkgs.pm
@@ -316,6 +316,20 @@ sub unselectPackage($$;$) {
if (packageFlagSelected($provided)) {
$otherOnly or packageSetFlagSelected($provided, 0);
$otherOnly and $otherOnly->{packageName($provided)} = 1;
+ foreach (packageDepsId($provided)) {
+ if (/\|/) {
+ #- this package use a choice of other package, so we have to check
+ #- if our package is not included in the choice, if this is the
+ #- case, if must be checked one of the other package are selected.
+ my $unselect_alone = 0;
+ foreach (split '\|') {
+ my $dep = packageById($packages, $_);
+ $dep == $pkg and $unselect_alone |= 1;
+ packageFlagBase($dep) || packageFlagSelected($dep) and $unselect_alone |= 2;
+ }
+ $unselect_alone == 3 and return;
+ }
+ }
}
foreach (map { split '\|' } packageDepsId($provided)) {
my $dep = packageById($packages, $_);
@@ -587,6 +601,7 @@ sub getProvides($) {
#- needed by a large number of package.
foreach my $pkg (@{$packages->[1]}) {
+ packageFlagBase($pkg) and next;
map { my $provided = $packages->[1][$_] or die "invalid package index $_";
packageFlagBase($provided) or push @{$provided->{provides} ||= []}, $pkg;
} map { split '\|' } grep { !/^NOTFOUND_/ } packageDepsId($pkg);
@@ -846,7 +861,7 @@ sub selectPackagesToUpgrade($$$;$$) {
unless ($skipThis) {
my $cumulSize;
- selectPackage($packages, $p) unless packageFlagSelected($p);
+ selectPackage($packages, $p);
#- keep in mind installed files which are not being updated. doing this costs in
#- execution time but use less memory, else hash all installed files and unhash