aboutsummaryrefslogtreecommitdiffstats
path: root/Rpmdrake
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mandriva.org>2007-02-21 11:30:11 +0000
committerThierry Vignaud <tv@mandriva.org>2007-02-21 11:30:11 +0000
commitd79bb6f01e5e130f6c725c0ef425c2ef27a6f233 (patch)
treeac5ebcaaa1d29aab8276a16714aa94a2fc4bab07 /Rpmdrake
parentaaab59a20ba894b16088fb9f24275ca9f59898bb (diff)
downloadrpmdrake-d79bb6f01e5e130f6c725c0ef425c2ef27a6f233.tar
rpmdrake-d79bb6f01e5e130f6c725c0ef425c2ef27a6f233.tar.gz
rpmdrake-d79bb6f01e5e130f6c725c0ef425c2ef27a6f233.tar.bz2
rpmdrake-d79bb6f01e5e130f6c725c0ef425c2ef27a6f233.tar.xz
rpmdrake-d79bb6f01e5e130f6c725c0ef425c2ef27a6f233.zip
(get_pkgs) enable to speed-up startup time for MandrivaUpdate
Diffstat (limited to 'Rpmdrake')
-rwxr-xr-xRpmdrake/pkg.pm10
1 files changed, 8 insertions, 2 deletions
diff --git a/Rpmdrake/pkg.pm b/Rpmdrake/pkg.pm
index 7bb24cdd..fe8a5315 100755
--- a/Rpmdrake/pkg.pm
+++ b/Rpmdrake/pkg.pm
@@ -174,6 +174,7 @@ sub formatlistpkg { join("\n", sort { uc($a) cmp uc($b) } @_) }
# -=-=-=---=-=-=---=-=-=-- install packages -=-=-=---=-=-=---=-=-=-
+our $probe_only_for_updates;
sub get_pkgs {
my ($urpm, $opts) = @_;
my $update_name = 'update_source';
@@ -322,6 +323,7 @@ Then, restart %s.", $rpmdrake::myname_update)), myexit(-1);
Rpmdrake::gurpm::progress($level = 0.33);
$reset_update->(0.66);
my %installed_pkgs;
+ if (!$probe_only_for_updates) {
$db->traverse(sub {
my ($pkg) = @_;
$update->();
@@ -343,6 +345,8 @@ Then, restart %s.", $rpmdrake::myname_update)), myexit(-1);
urpm::media::configure($urpm, parallel => $group);
}
+ }
+
# find out availlable packages:
#$urpm = urpm->new;
@@ -365,8 +369,10 @@ Then, restart %s.", $rpmdrake::myname_update)), myexit(-1);
start => 0,
end => $#{$urpm->{depslist}},
);
- $urpm->compute_installed_flags($db); # TODO/FIXME: not for updates
- $urpm->{depslist}[$_]->set_flag_installed foreach keys %$requested; #- pretend it's installed
+ if (!$probe_only_for_updates) {
+ $urpm->compute_installed_flags($db); # TODO/FIXME: not for updates
+ $urpm->{depslist}[$_]->set_flag_installed foreach keys %$requested; #- pretend it's installed
+ }
$urpm->{rpmdrake_state} = $state; #- Don't forget it
Rpmdrake::gurpm::progress($level = 0.7);