aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnssi Hannula <anssi@mandriva.org>2009-08-05 20:24:46 +0000
committerAnssi Hannula <anssi@mandriva.org>2009-08-05 20:24:46 +0000
commit2aa62ffc953968bbc0911ad1fdb7eb54f86fc06b (patch)
treeccc592a2c10d2c1c948c8fd59f017e18f45520f1
parent6775a45077a1dc688d5d9538d60d23a8ad07d830 (diff)
downloadperl-URPM-2aa62ffc953968bbc0911ad1fdb7eb54f86fc06b.tar
perl-URPM-2aa62ffc953968bbc0911ad1fdb7eb54f86fc06b.tar.gz
perl-URPM-2aa62ffc953968bbc0911ad1fdb7eb54f86fc06b.tar.bz2
perl-URPM-2aa62ffc953968bbc0911ad1fdb7eb54f86fc06b.tar.xz
perl-URPM-2aa62ffc953968bbc0911ad1fdb7eb54f86fc06b.zip
Obey options (keep, nodeps) when unselecting current package in the case
that was added in 3.31 (Anssi Hannula). In a simple mistake, %options was not passed to backtrack_selected.
-rw-r--r--NEWS3
-rw-r--r--URPM/Resolve.pm6
2 files changed, 6 insertions, 3 deletions
diff --git a/NEWS b/NEWS
index f78909c..50a827b 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,6 @@
+- obey options (keep, nodeps) when unselecting current package in the case
+ that was added in 3.31 (Anssi Hannula)
+
Version 3.31 - 28 July 2009, by Christophe Fergeau
- add support for querying %disttag & %distepoch (by Per Øyvind Karlsen)
diff --git a/URPM/Resolve.pm b/URPM/Resolve.pm
index a0dd92e..1079ad8 100644
--- a/URPM/Resolve.pm
+++ b/URPM/Resolve.pm
@@ -989,7 +989,7 @@ sub resolve_requested__no_suggests_ {
_unselect_package_deprecated_by($urpm, $db, $state, \%diff_provides_h, $pkg);
}
- _handle_conflicts_with_selected($urpm, $db, $state, $pkg, $dep, \@properties) or next;
+ _handle_conflicts_with_selected($urpm, $db, $state, $pkg, $dep, \@properties, %options) or next;
#- all requires should be satisfied according to selected package, or installed packages.
if (my @l = unsatisfied_requires($urpm, $db, $state, $pkg)) {
@@ -1047,7 +1047,7 @@ sub resolve_requested__no_suggests_ {
#- + those of disable_selected (flag_requested, flag_required, $state->{selected}, $state->{rejected}, $state->{whatrequires})
#- + those of backtrack_selected ($state->{backtrack}, $state->{rejected}, $state->{selected}, $state->{whatrequires}, flag_requested, flag_required)
sub _handle_conflicts_with_selected {
- my ($urpm, $db, $state, $pkg, $dep, $properties) = @_;
+ my ($urpm, $db, $state, $pkg, $dep, $properties, %options) = @_;
foreach ($pkg->conflicts) {
if (my ($n, $o, $v) = property2name_op_version($_)) {
foreach my $p ($urpm->packages_providing($n)) {
@@ -1057,7 +1057,7 @@ sub _handle_conflicts_with_selected {
$urpm->{debug_URPM}($pkg->fullname . " conflicts with already selected package " . $p->fullname) if $urpm->{debug_URPM};
disable_selected($urpm, $db, $state, $pkg);
_set_rejected_from($state, $pkg, $p);
- unshift @$properties, backtrack_selected($urpm, $db, $state, $dep);
+ unshift @$properties, backtrack_selected($urpm, $db, $state, $dep, %options);
return;
}
_set_rejected_from($state, $p, $pkg);