aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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}