aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2008-05-19 15:17:47 +0000
committerPascal Rigaux <pixel@mandriva.com>2008-05-19 15:17:47 +0000
commit35b06087d972fdfa5d4702822b45e0e22897843d (patch)
treeb841e65f407078af6753918fb41c78b8bc5652c4
parente0c56be325f8c2f74b37824057de31066247e686 (diff)
downloadperl-URPM-35b06087d972fdfa5d4702822b45e0e22897843d.tar
perl-URPM-35b06087d972fdfa5d4702822b45e0e22897843d.tar.gz
perl-URPM-35b06087d972fdfa5d4702822b45e0e22897843d.tar.bz2
perl-URPM-35b06087d972fdfa5d4702822b45e0e22897843d.tar.xz
perl-URPM-35b06087d972fdfa5d4702822b45e0e22897843d.zip
- do not ignore dropped provide from updated package (mdvbz#40842)
-rw-r--r--NEWS2
-rw-r--r--URPM/Resolve.pm23
2 files changed, 24 insertions, 1 deletions
diff --git a/NEWS b/NEWS
index ea1e657..71b2ff3 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,5 @@
+- do not ignore dropped provide from updated package (mdvbz#40842)
+
Version 3.12 - 7 March 2008, by Pascal "Pixel" Rigaux
- do allow to promoting a pkg even if it has unsatisfied require (since the
diff --git a/URPM/Resolve.pm b/URPM/Resolve.pm
index ac4525f..e270909 100644
--- a/URPM/Resolve.pm
+++ b/URPM/Resolve.pm
@@ -460,6 +460,27 @@ sub with_db_unsatisfied_requires {
});
}
+#- side-effects: only those done by $do
+sub with_state_unsatisfied_requires {
+ my ($urpm, $db, $state, $name, $do) = @_;
+
+ foreach (whatrequires_id($state, $name)) {
+ $state->{selected}{$_} or next;
+ my $p = $urpm->{depslist}[$_];
+ if (my @l = unsatisfied_requires($urpm, $db, $state, $p, name => $name)) {
+ $urpm->{debug_URPM}("selected " . $p->fullname . " is conflicting because of unsatisfied @l") if $urpm->{debug_URPM};
+ $do->($p, @l);
+ }
+ }
+}
+
+sub with_any_unsatisfied_requires {
+ my ($urpm, $db, $state, $name, $do) = @_;
+ with_db_unsatisfied_requires($urpm, $db, $state, $name, $do);
+ with_state_unsatisfied_requires($urpm, $db, $state, $name, $do);
+}
+
+
# used when a require is not available
#
#- side-effects: $state->{backtrack}, $state->{selected}
@@ -1098,7 +1119,7 @@ sub _find_packages_obsoleting {
sub _handle_diff_provides {
my ($urpm, $db, $state, $properties, $n, $pkg, %options) = @_;
- with_db_unsatisfied_requires($urpm, $db, $state, $n, sub {
+ with_any_unsatisfied_requires($urpm, $db, $state, $n, sub {
my ($p, @l) = @_;
#- try if upgrading the package will be satisfying all the requires...