summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2008-09-09 10:12:18 +0000
committerPascal Rigaux <pixel@mandriva.com>2008-09-09 10:12:18 +0000
commit3b56216905542c41c1c34c0c56348dee8f101340 (patch)
treedbbee906e060e98ca7d4765977944300041d18fd
parent842f058d15e6736f8c4ef19d2ec91cf0a1fadfc7 (diff)
downloadurpmi-3b56216905542c41c1c34c0c56348dee8f101340.tar
urpmi-3b56216905542c41c1c34c0c56348dee8f101340.tar.gz
urpmi-3b56216905542c41c1c34c0c56348dee8f101340.tar.bz2
urpmi-3b56216905542c41c1c34c0c56348dee8f101340.tar.xz
urpmi-3b56216905542c41c1c34c0c56348dee8f101340.zip
o fix orphans handling: an already installed pkg must not become
"unrequested" because a new version of it is required fixes test_urpme(['gg', 'g'], 'g', 'g', 'gg-2');
-rw-r--r--NEWS2
-rw-r--r--urpm/orphans.pm9
2 files changed, 8 insertions, 3 deletions
diff --git a/NEWS b/NEWS
index 4368ebff..c7dc0a36 100644
--- a/NEWS
+++ b/NEWS
@@ -1,6 +1,8 @@
- urpmi
o after installing in chroot, migrate back rpmdb db version to one
compatible with the rpm in the chroot
+ o fix orphans handling: an already installed pkg must not become
+ "unrequested" because a new version of it is required
- fix display of downloaded urls with aria2 and metalinks
- fix handling --downloader when using mirrorlist (it was forcing aria2)
diff --git a/urpm/orphans.pm b/urpm/orphans.pm
index 2750317c..57cda207 100644
--- a/urpm/orphans.pm
+++ b/urpm/orphans.pm
@@ -73,11 +73,14 @@ sub _installed_req_and_unreq_and_update_unrequested_list {
#- side-effects: none
sub _selected_unrequested {
- my ($urpm, $selected) = @_;
+ my ($urpm, $selected, $rejected) = @_;
+ require urpm::select;
map {
if (my $from = $selected->{$_}{from}) {
- ($urpm->{depslist}[$_]->name => "(required by " . $from->fullname . ")");
+ my $name = $urpm->{depslist}[$_]->name;
+ urpm::select::was_pkg_name_installed($rejected, $name) ? () :
+ ($name => "(required by " . $from->fullname . ")");
} elsif ($selected->{$_}{suggested}) {
($urpm->{depslist}[$_]->name => "(suggested)");
} else {
@@ -110,7 +113,7 @@ sub _renamed_unrequested {
sub _new_unrequested {
my ($urpm, $state) = @_;
(
- _selected_unrequested($urpm, $state->{selected}),
+ _selected_unrequested($urpm, $state->{selected}, $state->{rejected}),
_renamed_unrequested($urpm, $state->{rejected}),
);
}