From 646de7067306de16958f9248b4f01ca730ca5c52 Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Tue, 8 Jul 2008 18:05:48 +0000 Subject: 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 --- urpm/cdrom.pm | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'urpm/cdrom.pm') diff --git a/urpm/cdrom.pm b/urpm/cdrom.pm index 6fcfe9f7..38aabb76 100644 --- a/urpm/cdrom.pm +++ b/urpm/cdrom.pm @@ -209,17 +209,13 @@ sub _copy_from_cdrom__if_needed { } } -#- $list is a [ { pkg_id1 => url1, ... }, { ... }, ... ] -#- where there is one hash for each medium in {media} -#- #- side-effects: #- + those of _may_eject_cdrom ($urpm->{cdrom_mounted}, "hal_umount", "hal_eject") #- + those of _mount_cdrom ($urpm->{cdrom_mounted}, $blists_url->[_]{medium}{mntpoint}, "hal_mount", "hal_eject") #- + those of _copy_from_cdrom__if_needed ("copy-move-files") sub copy_packages_of_removable_media { - my ($urpm, $list, $sources, $o_ask_for_medium) = @_; + my ($urpm, $blists, $sources, $o_ask_for_medium) = @_; - my $blists = urpm::removable::create_blists($urpm->{media}, $list); @$blists = grep { urpm::is_cdrom_url($_->{medium}{url}) } @$blists; # we prompt for CDs used less first, since the last CD will be used directly -- cgit v1.2.1