diff options
author | Francois Pons <fpons@mandriva.com> | 2002-09-02 13:54:31 +0000 |
---|---|---|
committer | Francois Pons <fpons@mandriva.com> | 2002-09-02 13:54:31 +0000 |
commit | 98f6b7b006e9f1342171ab775d0f1e5529ac7834 (patch) | |
tree | 87657a59b702305a64187b560862f16e959eaf35 /perl-install/pkgs.pm | |
parent | 5d7f2308ed5251c8420902c32e25412e08b2c89d (diff) | |
download | drakx-backup-do-not-use-98f6b7b006e9f1342171ab775d0f1e5529ac7834.tar drakx-backup-do-not-use-98f6b7b006e9f1342171ab775d0f1e5529ac7834.tar.gz drakx-backup-do-not-use-98f6b7b006e9f1342171ab775d0f1e5529ac7834.tar.bz2 drakx-backup-do-not-use-98f6b7b006e9f1342171ab775d0f1e5529ac7834.tar.xz drakx-backup-do-not-use-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.pm | 10 |
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); |