summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--urpm.pm17
-rwxr-xr-xurpmi2
-rw-r--r--urpmi.spec5
-rwxr-xr-xurpmq2
4 files changed, 19 insertions, 7 deletions
diff --git a/urpm.pm b/urpm.pm
index d6fe6b84..8a97250e 100644
--- a/urpm.pm
+++ b/urpm.pm
@@ -1296,6 +1296,7 @@ sub filter_minimal_packages_to_upgrade {
#- choices for which all package in the choices are taken and their dependencies.
#- allow iteration over a modifying list.
while (defined($id = shift @packages)) {
+ print STDERR "examining $id\n";
if (ref $id) {
#- at this point we have almost only choices to resolves.
#- but we have to check if one package here is already selected
@@ -1313,7 +1314,9 @@ sub filter_minimal_packages_to_upgrade {
}
}
my $pkg = $urpm->{params}{depslist}[$id];
+ print STDERR "examining $id as $pkg->{name}-$pkg->{version}-$pkg->{release}.$pkg->{arch} and $pkg->{source}\n";
defined $pkg->{id} or next; #- id has been removed for package that only exists on some arch.
+ print STDERR "accepting $id\n";
#- search for package that will be upgraded, and check the difference
#- of provides to see if something will be altered and need to be upgraded.
@@ -1394,18 +1397,24 @@ sub filter_minimal_packages_to_upgrade {
$pkg = $best[0]; #- keep already requested packages.
}
push @choices, $pkg;
+
rpmtools::db_traverse_tag($db,
'name', [ $_ ],
[ qw(name version release serial) ], sub {
my ($p) = @_;
my $cmp = rpmtools::version_compare($pkg->{version}, $p->{version});
- $installed{$pkg->{id}} ||= !($pkg->{serial} > $p->{serial} || $pkg->{serial} == $p->{serial} && ($cmp > 0 || $cmp == 0 && rpmtools::version_compare($pkg->{release}, $p->{release}) > 0))
+ $installed{$pkg->{id}} ||= !($pkg->{serial} > $p->{serial} || $pkg->{serial} == $p->{serial} && ($cmp > 0 || $cmp == 0 && rpmtools::version_compare($pkg->{release}, $p->{release}) > 0));
});
- $installed{$pkg->{id}} and delete $packages->{$pkg->{id}};
- if (exists $packages->{$pkg->{id}} || $installed{$pkg->{id}}) {
+ if ($installed{$pkg->{id}}) {
+ @choices = @upgradable_choices = ();
+ delete $installed{$pkg->{id}};
+ next;
+ }
+ #$installed{$pkg->{id}} and delete $packages->{$pkg->{id}};
+ if (exists $packages->{$pkg->{id}}) {
#- the package is already selected, or installed with a better version and release.
@choices = @upgradable_choices = ();
- last;
+ next;
}
exists $installed{$pkg->{id}} and push @upgradable_choices, $pkg;
}
diff --git a/urpmi b/urpmi
index b0814ab1..c531eed8 100755
--- a/urpmi
+++ b/urpmi
@@ -216,7 +216,7 @@ if ($auto_select) {
}
if ($minimal) {
- $urpm->read_provides;
+ $use_provides || @files or $urpm->read_provides;
$update or $urpm->read_config;
$urpm->filter_minimal_packages_to_upgrade(\%packages, $ask_choice);
} else {
diff --git a/urpmi.spec b/urpmi.spec
index c4851b4f..6f7056da 100644
--- a/urpmi.spec
+++ b/urpmi.spec
@@ -2,7 +2,7 @@
Name: urpmi
Version: 1.7
-Release: 9mdk
+Release: 10mdk
License: GPL
Source0: %{name}.tar.bz2
Source1: %{name}.logrotate
@@ -114,6 +114,9 @@ rm -f /var/lib/urpmi/depslist
%changelog
+* Tue Sep 11 2001 François Pons <fpons@mandrakesoft.com> 1.7-10mdk
+- fixed error about urpmi saying package already installed.
+
* Mon Sep 10 2001 François Pons <fpons@mandrakesoft.com> 1.7-9mdk
- moved depslist computation out of loop of reading.
diff --git a/urpmq b/urpmq
index 8f9f14c6..708ab889 100755
--- a/urpmq
+++ b/urpmq
@@ -135,7 +135,7 @@ if ($query->{auto_select}) {
#- filter to add in packages selected required packages.
if ($query->{minimal}) {
- $urpm->read_provides;
+ $query->{use_provides} || @files or $urpm->read_provides;
$query->{update} or $urpm->read_config(nocheck_access => 1);
$urpm->filter_minimal_packages_to_upgrade(\%packages, undef);
} else {