diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2008-07-08 18:05:48 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2008-07-08 18:05:48 +0000 |
commit | 646de7067306de16958f9248b4f01ca730ca5c52 (patch) | |
tree | 14b98233c1ecccd6b5b21e82d62c8f4f3a6fea12 /urpm/main_loop.pm | |
parent | ec49bc330577f2b7535ad658ab0608ecace5a9a2 (diff) | |
download | urpmi-646de7067306de16958f9248b4f01ca730ca5c52.tar urpmi-646de7067306de16958f9248b4f01ca730ca5c52.tar.gz urpmi-646de7067306de16958f9248b4f01ca730ca5c52.tar.bz2 urpmi-646de7067306de16958f9248b4f01ca730ca5c52.tar.xz urpmi-646de7067306de16958f9248b4f01ca730ca5c52.zip |
goal: get rid of $list which must be used together with $urpm->{media}, and use $blists instead
- create urpm::get_pkgs::selected2local_and_blists(),
which is similar to selected2list(), but returns a $blists
- the following functions have been modified to use a $blists instead of $list:
urpm::cdrom::copy_packages_of_removable_media()
urpm::install::prepare_transaction()
urpm::removable::try_mounting_non_cdroms()
urpm::get_pkgs::download_packages_of_distant_media()
- adapt code to use $blists
Diffstat (limited to 'urpm/main_loop.pm')
-rw-r--r-- | urpm/main_loop.pm | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/urpm/main_loop.pm b/urpm/main_loop.pm index 790cdffd..ba3c3879 100644 --- a/urpm/main_loop.pm +++ b/urpm/main_loop.pm @@ -41,22 +41,22 @@ sub run { urpm::get_pkgs::clean_all_cache($urpm) if $clean; -my ($local_sources, $list) = urpm::get_pkgs::selected2list($urpm, +my ($local_sources, $blists) = urpm::get_pkgs::selected2local_and_blists($urpm, $state->{selected}, clean_other => !$noclean && $urpm->{options}{'pre-clean'}, ); -if (!$local_sources && !$list) { +if (!$local_sources && !$blists) { $urpm->{fatal}(3, N("unable to get source packages, aborting")); } my %sources = %$local_sources; -urpm::removable::try_mounting_non_cdroms($urpm, $list); +urpm::removable::try_mounting_non_cdroms($urpm, $blists); $callbacks->{pre_removable} and $callbacks->{pre_removable}->(); require urpm::cdrom; urpm::cdrom::copy_packages_of_removable_media($urpm, - $list, \%sources, + $blists, \%sources, $callbacks->{copy_removable}); $callbacks->{post_removable} and $callbacks->{post_removable}->(); @@ -87,13 +87,13 @@ foreach my $set (@{$state->{transaction} || []}) { #- put a blank line to separate with previous transaction or user question. print "\n" if $options{verbose} >= 0; - my ($transaction_list, $transaction_sources) = - urpm::install::prepare_transaction($urpm, $set, $list, \%sources); + my ($transaction_blists, $transaction_sources) = + urpm::install::prepare_transaction($urpm, $set, $blists, \%sources); #- first, filter out what is really needed to download for this small transaction. my @error_sources; urpm::get_pkgs::download_packages_of_distant_media($urpm, - $transaction_list, + $transaction_blists, $transaction_sources, \@error_sources, quiet => $options{verbose} < 0, |