From 02c036884d45f4c8686e74f746911ece7140eadf Mon Sep 17 00:00:00 2001 From: Thierry Vignaud Date: Fri, 7 Mar 2008 17:30:05 +0000 Subject: (get_pkgs) reimplement priority upgrade support through urpmi-5.9's infrastructure --- NEWS | 3 +++ Rpmdrake/pkg.pm | 20 ++++++++++++++++++++ 2 files changed, 23 insertions(+) diff --git a/NEWS b/NEWS index 3e213ee3..bc9b8113 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,6 @@ +- reimplement priority upgrade support through urpmi-5.9's + infrastructure + Version 4.4.2.3 - 6 March 2008, Thierry Vignaud - MandrivaUpdate: diff --git a/Rpmdrake/pkg.pm b/Rpmdrake/pkg.pm index 97fdcdda..d043281c 100644 --- a/Rpmdrake/pkg.pm +++ b/Rpmdrake/pkg.pm @@ -414,6 +414,17 @@ sub get_pkgs { $requested, ); + my %common_opts = ( + callback_choices => \&Rpmdrake::gui::callback_choices, + priority_upgrade => $urpm->{options}{'priority-upgrade'}, + ); + + if ($urpm->{options}{'priority-upgrade'}) { + $restart_itself = + urpm::select::resolve_priority_upgrades_after_auto_select($urpm, $db, $state, + $requested, %common_opts); + } + # list of updates (including those matching /etc/urpmi/skip.list): my @requested = sort map { urpm_name($_) } @{$urpm->{depslist}}[keys %$requested]; @@ -423,6 +434,15 @@ sub get_pkgs { @requested_strict = sort map { urpm_name($_); } $urpm->resolve_requested($db, $state, $requested, callback_choices => \&Rpmdrake::gui::callback_choices); + + if (my @l = grep { $state->{selected}{$_->id} } + urpm::select::_priority_upgrade_pkgs($urpm, $urpm->{options}{'priority-upgrade'})) { + if (!$restart_itself) { + $restart_itself = + urpm::select::_resolve_priority_upgrades($urpm, $db, $state, $state->{selected}, + \@l, %common_opts); + } + } } # list updates including skiped ones + their deps in MandrivaUpdate: -- cgit v1.2.1