aboutsummaryrefslogtreecommitdiffstats
path: root/Rpmdrake/pkg.pm
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mandriva.org>2009-10-16 14:28:23 +0000
committerThierry Vignaud <tv@mandriva.org>2009-10-16 14:28:23 +0000
commite7088da59b1384ece439040d7291345cfcbffa20 (patch)
tree1f07fd657d1ae73ca014d65e6e5982f87e281e11 /Rpmdrake/pkg.pm
parent3a5331f4ebd5d18b9ccf5a881eb124d7331cc2f3 (diff)
downloadrpmdrake-e7088da59b1384ece439040d7291345cfcbffa20.tar
rpmdrake-e7088da59b1384ece439040d7291345cfcbffa20.tar.gz
rpmdrake-e7088da59b1384ece439040d7291345cfcbffa20.tar.bz2
rpmdrake-e7088da59b1384ece439040d7291345cfcbffa20.tar.xz
rpmdrake-e7088da59b1384ece439040d7291345cfcbffa20.zip
(perform_installation) match urpmi behavior when registering requested package
aka do not register all packages as potential orphan packages
Diffstat (limited to 'Rpmdrake/pkg.pm')
-rw-r--r--Rpmdrake/pkg.pm8
1 files changed, 6 insertions, 2 deletions
diff --git a/Rpmdrake/pkg.pm b/Rpmdrake/pkg.pm
index ac8b2eaa..02bf4dd2 100644
--- a/Rpmdrake/pkg.pm
+++ b/Rpmdrake/pkg.pm
@@ -636,7 +636,11 @@ sub perform_installation { #- (partially) duplicated from /usr/sbin/urpmi :-(
# FIXME: THIS SET flag_requested on all packages!!!!
# select packages to install / enssure selected pkg set is consistant:
- my $requested = { map { $_->id => undef } grep { $_->flag_selected } @{$urpm->{depslist}} };
+ my %saved_flags;
+ my $requested = { map {
+ $saved_flags{$_->id} = $_->flag_requested;
+ $_->id => undef;
+ } grep { $_->flag_selected } @{$urpm->{depslist}} };
urpm::select::resolve_dependencies(
$urpm, $state, $requested,
rpmdb => $::env && "$::env/rpmdb.cz",
@@ -732,7 +736,7 @@ sub perform_installation { #- (partially) duplicated from /usr/sbin/urpmi :-(
# fix flags for orphan computing:
foreach (keys %{$state->{selected}}) {
my $pkg = $urpm->{depslist}[$_];
- $pkg->set_flag_requested(0);
+ $pkg->set_flag_requested($saved_flags{$pkg->id});
}
my $exit_code =
urpm::main_loop::run($urpm, $state, 1, \@ask_unselect, $requested,