aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--URPM/Resolve.pm7
-rw-r--r--perl-URPM.spec8
2 files changed, 11 insertions, 4 deletions
diff --git a/URPM/Resolve.pm b/URPM/Resolve.pm
index 399a7d0..61b04f3 100644
--- a/URPM/Resolve.pm
+++ b/URPM/Resolve.pm
@@ -204,6 +204,7 @@ sub resolve_requested {
});
}
if ($p->flag_installed) {
+ $p->flag_upgrade or $pkg = $p, last; #- already installed package is taken.
if (exists $requested{$p->id}) {
push @chosen_requested_upgrade, $p;
} else {
@@ -334,13 +335,13 @@ sub resolve_requested {
my ($p) = @_;
if (my @l = $urpm->unsatisfied_requires($db, $state, $p)) {
#- try if upgrading the package will be satisfying all the requires
- #- else it will be necessary to ask hte user for removing it.
+ #- else it will be necessary to ask the user for removing it.
my $packages = $urpm->find_candidate_packages($p->name);
my $best = join '|', map { $_->id }
grep { $urpm->unsatisfied_requires($db, $state, $_, name => $n) == 0 }
@{$packages->{$p->name}};
- if ($best) {
+ if (length $best) {
push @properties, $best;
} else {
#- no package have been found, we may need to remove the package examined unless
@@ -395,7 +396,7 @@ sub resolve_requested {
grep { ! grep { ranges_overlap($_, $property) } $_->provides }
@{$packages->{$p->name}};
- if ($best) {
+ if (length $best) {
push @properties, $best;
} else {
#- no package have been found, we need to remove the package examined.
diff --git a/perl-URPM.spec b/perl-URPM.spec
index e74dddb..b2b3fac 100644
--- a/perl-URPM.spec
+++ b/perl-URPM.spec
@@ -1,7 +1,7 @@
%define name perl-URPM
%define real_name URPM
%define version 0.70
-%define release 8mdk
+%define release 9mdk
%{expand:%%define rpm_version %(rpm -q --queryformat '%{VERSION}-%{RELEASE}' rpm)}
@@ -49,6 +49,12 @@ rm -rf $RPM_BUILD_ROOT
%changelog
+* Mon Sep 9 2002 François Pons <fpons@mandrakesoft.com> 0.70-9mdk
+- select package already installed to be taken instead of proposing
+ choice to the user.
+- fixed bad test for first package of first synthesis to be chosen
+ to be upgraded.
+
* Mon Sep 2 2002 François Pons <fpons@mandrakesoft.com> 0.70-8mdk
- added start and end options to request_packages_to_upgrade
for DrakX to choose updated packages to upgrade.