summaryrefslogtreecommitdiffstats
path: root/perl-install/pkgs.pm
diff options
context:
space:
mode:
authorFrancois Pons <fpons@mandriva.com>2002-09-02 13:54:31 +0000
committerFrancois Pons <fpons@mandriva.com>2002-09-02 13:54:31 +0000
commit98f6b7b006e9f1342171ab775d0f1e5529ac7834 (patch)
tree87657a59b702305a64187b560862f16e959eaf35 /perl-install/pkgs.pm
parent5d7f2308ed5251c8420902c32e25412e08b2c89d (diff)
downloaddrakx-98f6b7b006e9f1342171ab775d0f1e5529ac7834.tar
drakx-98f6b7b006e9f1342171ab775d0f1e5529ac7834.tar.gz
drakx-98f6b7b006e9f1342171ab775d0f1e5529ac7834.tar.bz2
drakx-98f6b7b006e9f1342171ab775d0f1e5529ac7834.tar.xz
drakx-98f6b7b006e9f1342171ab775d0f1e5529ac7834.zip
allow selectPackagesToUpgrade to use a specific medium instead of all of them.
Diffstat (limited to 'perl-install/pkgs.pm')
-rw-r--r--perl-install/pkgs.pm10
1 files changed, 8 insertions, 2 deletions
diff --git a/perl-install/pkgs.pm b/perl-install/pkgs.pm
index e3858e668..d80d3c42f 100644
--- a/perl-install/pkgs.pm
+++ b/perl-install/pkgs.pm
@@ -823,7 +823,10 @@ sub selectPackagesAlreadyInstalled {
}
sub selectPackagesToUpgrade {
- my ($packages, $prefix) = @_;
+ my ($packages, $prefix, $medium) = @_;
+
+ #- check before that if medium is given, it should be valid.
+ $medium && ! defined $medium->{start} || ! defined $medium->{end} and return;
log::l("selecting packages to upgrade");
@@ -831,7 +834,10 @@ sub selectPackagesToUpgrade {
$state->{selected} = {};
my %selection;
- $packages->request_packages_to_upgrade($packages->{rpmdb}, $state, \%selection, requested => undef);
+ $packages->request_packages_to_upgrade($packages->{rpmdb}, $state, \%selection,
+ requested => undef,
+ $medium ? (start => $medium->{start}, end => $medium->{end}) : (),
+ );
log::l("resolving dependencies...");
$packages->resolve_requested($packages->{rpmdb}, $state, \%selection,
callback_choices => \&packageCallbackChoices);