aboutsummaryrefslogtreecommitdiffstats
path: root/Rpmdrake/pkg.pm
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mandriva.org>2008-03-07 17:30:05 +0000
committerThierry Vignaud <tv@mandriva.org>2008-03-07 17:30:05 +0000
commit02c036884d45f4c8686e74f746911ece7140eadf (patch)
tree3160c05640c48f5456848dda50fe9b35acec0423 /Rpmdrake/pkg.pm
parent0e138616c770f5abdd134151d0673d035cc0bc52 (diff)
downloadrpmdrake-02c036884d45f4c8686e74f746911ece7140eadf.tar
rpmdrake-02c036884d45f4c8686e74f746911ece7140eadf.tar.gz
rpmdrake-02c036884d45f4c8686e74f746911ece7140eadf.tar.bz2
rpmdrake-02c036884d45f4c8686e74f746911ece7140eadf.tar.xz
rpmdrake-02c036884d45f4c8686e74f746911ece7140eadf.zip
(get_pkgs) reimplement priority upgrade support through urpmi-5.9's infrastructure
Diffstat (limited to 'Rpmdrake/pkg.pm')
-rw-r--r--Rpmdrake/pkg.pm20
1 files changed, 20 insertions, 0 deletions
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: