diff options
author | Thierry Vignaud <tv@mandriva.org> | 2009-10-16 14:28:23 +0000 |
---|---|---|
committer | Thierry Vignaud <tv@mandriva.org> | 2009-10-16 14:28:23 +0000 |
commit | e7088da59b1384ece439040d7291345cfcbffa20 (patch) | |
tree | 1f07fd657d1ae73ca014d65e6e5982f87e281e11 /Rpmdrake/pkg.pm | |
parent | 3a5331f4ebd5d18b9ccf5a881eb124d7331cc2f3 (diff) | |
download | rpmdrake-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.pm | 8 |
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, |