aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2008-06-26 09:46:36 +0000
committerPascal Rigaux <pixel@mandriva.com>2008-06-26 09:46:36 +0000
commit186e71ba67e0b449828c22757a83d2db9d2e4434 (patch)
treebe051e6b16707e6f16aa0ede2fc25339b824f010
parenteafee2b9958466622118ada12560eafceaea0ff6 (diff)
downloadperl-URPM-186e71ba67e0b449828c22757a83d2db9d2e4434.tar
perl-URPM-186e71ba67e0b449828c22757a83d2db9d2e4434.tar.gz
perl-URPM-186e71ba67e0b449828c22757a83d2db9d2e4434.tar.bz2
perl-URPM-186e71ba67e0b449828c22757a83d2db9d2e4434.tar.xz
perl-URPM-186e71ba67e0b449828c22757a83d2db9d2e4434.zip
- when not selecting a package because already installed,
but it in $state->{rejected} with flags {installed}
-rw-r--r--NEWS3
-rw-r--r--URPM.pm2
-rw-r--r--URPM/Resolve.pm8
3 files changed, 9 insertions, 4 deletions
diff --git a/NEWS b/NEWS
index a72f2c7..ff74bfc 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,6 @@
+- when not selecting a package because already installed,
+ but it in $state->{rejected} with flags {installed}
+
Version 3.15 - 23 June 2008, by Pascal "Pixel" Rigaux
- fix urpmi wrongly considering epochless conflicts to match any epoch in a
diff --git a/URPM.pm b/URPM.pm
index 3727846..94ced85 100644
--- a/URPM.pm
+++ b/URPM.pm
@@ -823,7 +823,7 @@ B<selected>: { id => {
} }
B<rejected>: { fullname => {
- size => int, removed => bool, obsoleted => bool,
+ size => int, removed => bool, obsoleted => bool, installed => bool,
backtrack => { # those info are only used to display why package is unselected
promote => [ name ], keep => [ fullname ],
unsatisfied => [ id|property ],
diff --git a/URPM/Resolve.pm b/URPM/Resolve.pm
index 3a582fc..1f21c94 100644
--- a/URPM/Resolve.pm
+++ b/URPM/Resolve.pm
@@ -666,9 +666,11 @@ sub _set_rejected_from {
sub _set_rejected_old_package {
my ($state, $pkg, $new_pkg) = @_;
- $pkg->fullname ne $new_pkg->fullname or return;
-
- push @{$state->{rejected}{$pkg->fullname}{backtrack}{keep}}, scalar $new_pkg->fullname;
+ if ($pkg->fullname eq $new_pkg->fullname) {
+ $state->{rejected}{$pkg->fullname}{installed} = 1;
+ } else {
+ push @{$state->{rejected}{$pkg->fullname}{backtrack}{keep}}, scalar $new_pkg->fullname;
+ }
}
#- side-effects: $state->{rejected}