aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--URPM.pm3
-rw-r--r--URPM/Resolve.pm17
2 files changed, 17 insertions, 3 deletions
diff --git a/URPM.pm b/URPM.pm
index dc10a0f..d1d4a13 100644
--- a/URPM.pm
+++ b/URPM.pm
@@ -834,7 +834,8 @@ B<selected>: { id => {
} }
B<rejected>: { fullname => {
- size => int, removed => bool, obsoleted => bool,
+ size => int, removed => { fullname|"asked" => undef },
+ obsoleted => { fullname|"asked" => undef },
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 d12aa91..801929b 100644
--- a/URPM/Resolve.pm
+++ b/URPM/Resolve.pm
@@ -682,6 +682,14 @@ sub _remove_rejected_from {
my ($state, $fullname, $from_fullname) = @_;
my $rv = $state->{rejected}{$fullname} or return;
+
+ foreach (qw(removed obsoleted)) {
+ if (exists $rv->{$_} && exists $rv->{$_}{$from_fullname}) {
+ delete $rv->{$_}{$from_fullname};
+ delete $rv->{$_} if !%{$rv->{$_}};
+ }
+ }
+
exists $rv->{closure}{$from_fullname} or return;
delete $rv->{closure}{$from_fullname};
if (%{$rv->{closure}}) {
@@ -756,8 +764,13 @@ sub set_rejected {
#- set removed and obsoleted level.
foreach (qw(removed obsoleted)) {
- $rdep->{$_} && (! exists $rv->{$_} || $rdep->{$_} <= $rv->{$_})
- and $rv->{$_} = $rdep->{$_};
+ if ($rdep->{$_}) {
+ if ($rdep->{from}) {
+ $rv->{$_}{scalar $rdep->{from}->fullname} = undef;
+ } else {
+ $rv->{$_}{asked} = undef;
+ }
+ }
}
$newly_rejected;