aboutsummaryrefslogtreecommitdiffstats
path: root/URPM
diff options
context:
space:
mode:
authorFrancois Pons <fpons@mandriva.com>2002-06-13 17:56:39 +0000
committerFrancois Pons <fpons@mandriva.com>2002-06-13 17:56:39 +0000
commitc6ed46cf5665980efe6f3672833a8b60dd9a8baf (patch)
tree2a46540a22a29d2d34769dd0b628504c0e821342 /URPM
parent44ceb8d7cad4a07a8ea1ecbcaadcee70bd2b69bc (diff)
downloadperl-URPM-c6ed46cf5665980efe6f3672833a8b60dd9a8baf.tar
perl-URPM-c6ed46cf5665980efe6f3672833a8b60dd9a8baf.tar.gz
perl-URPM-c6ed46cf5665980efe6f3672833a8b60dd9a8baf.tar.bz2
perl-URPM-c6ed46cf5665980efe6f3672833a8b60dd9a8baf.tar.xz
perl-URPM-c6ed46cf5665980efe6f3672833a8b60dd9a8baf.zip
0.04-4mdk
Diffstat (limited to 'URPM')
-rw-r--r--URPM/Resolve.pm24
1 files changed, 14 insertions, 10 deletions
diff --git a/URPM/Resolve.pm b/URPM/Resolve.pm
index 9b78d58..a7e7f25 100644
--- a/URPM/Resolve.pm
+++ b/URPM/Resolve.pm
@@ -354,16 +354,20 @@ sub resolve_packages_to_upgrade {
#- check provides of existing package to see if a obsolete
#- may allow selecting it.
- foreach ($p->provides) {
- if (my ($n) = /^([^\s\[]*)/) {
- foreach my $pkg (@{$obsoletes{$n} || []}) {
- next if $pkg->name eq $p->name;
- foreach my $property ($pkg->obsoletes) {
- if (ranges_overlap($property, $_)) {
- #- the package being examined can be obsoleted.
- #- do not set installed and provides flags.
- $state->{requested}{$pkg->id} = $options{requested};
- return;
+ foreach my $property ($p->provides) {
+ #- only real provides should be taken into account, this means internal obsoletes
+ #- should be avoided.
+ unless (grep { ranges_overlap($property, $_) } $p->obsoletes) {
+ if (my ($n) = $property =~ /^([^\s\[]*)/) {
+ foreach my $pkg (@{$obsoletes{$n} || []}) {
+ next if $pkg->name eq $p->name;
+ foreach ($pkg->obsoletes) {
+ if (ranges_overlap($property, $_)) {
+ #- the package being examined can be obsoleted.
+ #- do not set installed and provides flags.
+ $state->{requested}{$pkg->id} = $options{requested};
+ return;
+ }
}
}
}