summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
authorFrancois Pons <fpons@mandriva.com>2000-07-31 18:07:43 +0000
committerFrancois Pons <fpons@mandriva.com>2000-07-31 18:07:43 +0000
commit1fcb9d98f6f5069c77db9769993a77936f7d4519 (patch)
treef3143785f08fcd4c26ca630b74302529062c4470 /perl-install
parentd2876b431a58836796207541ab0d5614f7e2fdc2 (diff)
downloaddrakx-1fcb9d98f6f5069c77db9769993a77936f7d4519.tar
drakx-1fcb9d98f6f5069c77db9769993a77936f7d4519.tar.gz
drakx-1fcb9d98f6f5069c77db9769993a77936f7d4519.tar.bz2
drakx-1fcb9d98f6f5069c77db9769993a77936f7d4519.tar.xz
drakx-1fcb9d98f6f5069c77db9769993a77936f7d4519.zip
*** empty log message ***
Diffstat (limited to 'perl-install')
-rw-r--r--perl-install/ChangeLog6
-rw-r--r--perl-install/pkgs.pm17
2 files changed, 22 insertions, 1 deletions
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 <fpons@mandrakesoft.com>
+
+ * 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 <fpons@mandrakesoft.com>
* 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