From 1fcb9d98f6f5069c77db9769993a77936f7d4519 Mon Sep 17 00:00:00 2001 From: Francois Pons Date: Mon, 31 Jul 2000 18:07:43 +0000 Subject: *** empty log message *** --- perl-install/ChangeLog | 6 ++++++ perl-install/pkgs.pm | 17 ++++++++++++++++- 2 files changed, 22 insertions(+), 1 deletion(-) diff --git a/perl-install/ChangeLog b/perl-install/ChangeLog index c52618672..380879269 100644 --- a/perl-install/ChangeLog +++ b/perl-install/ChangeLog @@ -1,3 +1,9 @@ +2000-07-31 François Pons + + * pkgs.pm: fixed provided package with choice in deps used with a + base package, complicated but kernel-fb or similar can be + unselected now. + 2000-07-27 François Pons * install_steps_interactive.pm: changed expert message to ask 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 -- cgit v1.2.1