From d24185353c074609f9d57265bd82ec14195a1f92 Mon Sep 17 00:00:00 2001 From: Thierry Vignaud Date: Mon, 10 Mar 2008 14:10:06 +0000 Subject: - MandrivaUpdate: o faster startup if there're priority updates o only list priority updates if existing --- Rpmdrake/pkg.pm | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'Rpmdrake') diff --git a/Rpmdrake/pkg.pm b/Rpmdrake/pkg.pm index 365965d6..892d0968 100644 --- a/Rpmdrake/pkg.pm +++ b/Rpmdrake/pkg.pm @@ -451,7 +451,7 @@ sub get_pkgs { # list of pure updates (w/o those matching /etc/urpmi/skip.list but with their deps): my @requested_strict; - if ($probe_only_for_updates) { + if ($probe_only_for_updates && !$need_restart) { @requested_strict = sort map { urpm_name($_); } $urpm->resolve_requested($db, $state, $requested, callback_choices => \&Rpmdrake::gui::callback_choices); @@ -466,6 +466,13 @@ sub get_pkgs { } } + if ($probe_only_for_updates && $need_restart) { + @requested_strict = map { scalar $_->fullname } @{$urpm->{depslist}}[keys %{$state->{selected}}]; + # drop non priority updates: + undef @requested; + } + + # list updates including skiped ones + their deps in MandrivaUpdate: @requested = uniq(@requested, @requested_strict) if $probe_only_for_updates; -- cgit v1.2.1