aboutsummaryrefslogtreecommitdiffstats
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
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
-rw-r--r--NEWS3
-rw-r--r--Rpmdrake/pkg.pm20
2 files changed, 23 insertions, 0 deletions
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: