summaryrefslogtreecommitdiffstats
path: root/urpm/removable.pm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2008-07-08 18:05:48 +0000
committerPascal Rigaux <pixel@mandriva.com>2008-07-08 18:05:48 +0000
commit646de7067306de16958f9248b4f01ca730ca5c52 (patch)
tree14b98233c1ecccd6b5b21e82d62c8f4f3a6fea12 /urpm/removable.pm
parentec49bc330577f2b7535ad658ab0608ecace5a9a2 (diff)
downloadurpmi-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/removable.pm')
-rw-r--r--urpm/removable.pm19
1 files changed, 1 insertions, 18 deletions
diff --git a/urpm/removable.pm b/urpm/removable.pm
index 558e95a6..57b52f95 100644
--- a/urpm/removable.pm
+++ b/urpm/removable.pm
@@ -136,9 +136,7 @@ sub try_umounting_removables {
#- side-effects:
#- + those of try_mounting_non_cdrom ($urpm->{removable_mounted}, "mount")
sub try_mounting_non_cdroms {
- my ($urpm, $list) = @_;
-
- my $blists = create_blists($urpm->{media}, $list);
+ my ($urpm, $blists) = @_;
foreach my $blist (grep { urpm::file_from_local_url($_->{medium}{url}) } @$blists) {
try_mounting_medium($urpm, $blist->{medium}, _blist_first_url($blist));
@@ -146,21 +144,6 @@ sub try_mounting_non_cdroms {
}
#- side-effects: none
-sub create_blists {
- my ($media, $list) = @_;
-
- #- make sure everything is correct on input...
- $media or return;
- @$media == @$list or return;
-
- my $i;
- [ map {
- my $list = $list->[$i++];
- %$list ? { medium => $_, list => $list } : ();
- } @$media ];
-}
-
-#- side-effects: none
sub _blist_first_url {
my ($blist) = @_;