aboutsummaryrefslogtreecommitdiffstats
path: root/Rpmdrake/pkg.pm
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mandriva.org>2009-02-15 08:22:14 +0000
committerThierry Vignaud <tv@mandriva.org>2009-02-15 08:22:14 +0000
commitd0021121b78511e15d568206b421e97a5ff46c63 (patch)
tree63541d723ef29400f18b76acb3dafdc481f038e2 /Rpmdrake/pkg.pm
parentf17adc99bedbbe8560e663580c4e2f43d4778554 (diff)
downloadrpmdrake-d0021121b78511e15d568206b421e97a5ff46c63.tar
rpmdrake-d0021121b78511e15d568206b421e97a5ff46c63.tar.gz
rpmdrake-d0021121b78511e15d568206b421e97a5ff46c63.tar.bz2
rpmdrake-d0021121b78511e15d568206b421e97a5ff46c63.tar.xz
rpmdrake-d0021121b78511e15d568206b421e97a5ff46c63.zip
(get_pkgs) add 'compute_updates' option that enable super fast startup
by skipping computing updates on startup
Diffstat (limited to 'Rpmdrake/pkg.pm')
-rw-r--r--Rpmdrake/pkg.pm10
1 files changed, 8 insertions, 2 deletions
diff --git a/Rpmdrake/pkg.pm b/Rpmdrake/pkg.pm
index 8d0c34b4..c1d395e5 100644
--- a/Rpmdrake/pkg.pm
+++ b/Rpmdrake/pkg.pm
@@ -432,6 +432,10 @@ sub get_pkgs {
priority_upgrade => $urpm->{options}{'priority-upgrade'},
);
+ my (@requested, @requested_strict);
+
+
+ if ($::rpmdrake_options{compute_updates}) {
if ($urpm->{options}{'priority-upgrade'}) {
$need_restart =
urpm::select::resolve_priority_upgrades_after_auto_select($urpm, $db, $state,
@@ -439,10 +443,10 @@ sub get_pkgs {
}
# list of updates (including those matching /etc/urpmi/skip.list):
- my @requested = sort map { urpm_name($_) } @{$urpm->{depslist}}[keys %$requested];
+ @requested = sort map { urpm_name($_) } @{$urpm->{depslist}}[keys %$requested];
# list of pure updates (w/o those matching /etc/urpmi/skip.list but with their deps):
- my @requested_strict;
+ @requested_strict;
if ($probe_only_for_updates && !$need_restart) {
@requested_strict = sort map {
urpm_name($_);
@@ -471,6 +475,8 @@ sub get_pkgs {
# do not pre select updates in rpmdrake:
undef @requested_strict if !$probe_only_for_updates;
+ }
+
$priority_state = $need_restart ? $state : undef;
$priority_requested = $need_restart ? $requested : undef;