aboutsummaryrefslogtreecommitdiffstats
path: root/URPM
diff options
context:
space:
mode:
authorRafael Garcia-Suarez <rgarciasuarez@mandriva.com>2006-10-16 10:11:38 +0000
committerRafael Garcia-Suarez <rgarciasuarez@mandriva.com>2006-10-16 10:11:38 +0000
commit5410289d6136afcb4feb72e3ad966b89378e57a7 (patch)
tree0a162d33177c63f7bcdc9363fd0f4b2a93500288 /URPM
parentbf65ec370d67740b25ab25e020f8dfdd3358d5d2 (diff)
downloadperl-URPM-5410289d6136afcb4feb72e3ad966b89378e57a7.tar
perl-URPM-5410289d6136afcb4feb72e3ad966b89378e57a7.tar.gz
perl-URPM-5410289d6136afcb4feb72e3ad966b89378e57a7.tar.bz2
perl-URPM-5410289d6136afcb4feb72e3ad966b89378e57a7.tar.xz
perl-URPM-5410289d6136afcb4feb72e3ad966b89378e57a7.zip
Patch by Pixel to ignore self-obsoletes
Diffstat (limited to 'URPM')
-rw-r--r--URPM/Resolve.pm6
1 files changed, 6 insertions, 0 deletions
diff --git a/URPM/Resolve.pm b/URPM/Resolve.pm
index 03e5f8e..40c9c43 100644
--- a/URPM/Resolve.pm
+++ b/URPM/Resolve.pm
@@ -571,8 +571,14 @@ sub resolve_requested {
if ($pkg->arch ne 'src' && !$pkg->flag_disable_obsolete) {
my (%diff_provides);
+ my $first;
foreach ($pkg->name . " < " . $pkg->epoch . ":" . $pkg->version . "-" . $pkg->release, $pkg->obsoletes) {
if (my ($n, $o, $v) = /^([^\s\[]*)(?:\[\*\])?\s*\[?([^\s\]]*)\s*([^\s\]]*)/) {
+ if ($first++ && $n eq $pkg->name) {
+ #- ignore if this package obsoletes itself
+ #- otherwise this can cause havoc if: to_install=v3, installed=v2, v3 obsoletes < v2
+ next;
+ }
#- populate avoided entries according to what is selected.
foreach (keys %{$urpm->{provides}{$n} || {}}) {
my $p = $urpm->{depslist}[$_];