summaryrefslogtreecommitdiffstats
path: root/urpm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2008-03-19 16:04:38 +0000
committerPascal Rigaux <pixel@mandriva.com>2008-03-19 16:04:38 +0000
commit8c944c1d668d153c7ca500940d638cfd91a726a9 (patch)
tree845e0769232ba85b4c5126ddc624c99678423568 /urpm
parent79e666cd26423a2e38404692339fce671b5d60bd (diff)
downloadurpmi-8c944c1d668d153c7ca500940d638cfd91a726a9.tar
urpmi-8c944c1d668d153c7ca500940d638cfd91a726a9.tar.gz
urpmi-8c944c1d668d153c7ca500940d638cfd91a726a9.tar.bz2
urpmi-8c944c1d668d153c7ca500940d638cfd91a726a9.tar.xz
urpmi-8c944c1d668d153c7ca500940d638cfd91a726a9.zip
- urpmi:
o fix getting rpms from different media on same DVD without it $blist->{medium}{mntpoint} is set during first _find_blist_url_matching() and "$blist->{medium}{mntpoint} and next" will block everything. with this commit, it won't copy rpms on disk even if on different media if same DVD.
Diffstat (limited to 'urpm')
-rw-r--r--urpm/cdrom.pm18
1 files changed, 9 insertions, 9 deletions
diff --git a/urpm/cdrom.pm b/urpm/cdrom.pm
index 5f351a42..55e26671 100644
--- a/urpm/cdrom.pm
+++ b/urpm/cdrom.pm
@@ -85,8 +85,7 @@ sub _mount_cdrom_and_check {
my ($urpm, $blists) = @_;
my @matching_blists = try_mounting_cdrom($urpm, $blists) or return;
- my @checked = grep { !_check_notfound($_) } @matching_blists;
- $checked[0];
+ grep { !_check_notfound($_) } @matching_blists;
}
#- side-effects: none
@@ -148,8 +147,8 @@ sub _mount_cdrom {
#- everything that might be necessary.
while (1) {
- if (my $blist = _mount_cdrom_and_check($urpm, $blists)) {
- return $blist;
+ if (my @blists = _mount_cdrom_and_check($urpm, $blists)) {
+ return @blists;
}
# ask for the first one, it's ok if the user insert another wanted cdrom
@@ -230,11 +229,12 @@ sub copy_packages_of_removable_media {
$prev_medium and delete $prev_medium->{mntpoint};
_may_eject_cdrom($urpm);
- my $blist = _mount_cdrom($urpm, $blists, $o_ask_for_medium);
- @$blists = grep { $_ != $blist } @$blists;
-
- _copy_from_cdrom__if_needed($urpm, $blist, $sources, @$blists > 0);
- $prev_medium = $blist->{medium};
+ my @blists_mounted = _mount_cdrom($urpm, $blists, $o_ask_for_medium);
+ @$blists = difference2($blists, \@blists_mounted);
+ foreach my $blist (@blists_mounted) {
+ _copy_from_cdrom__if_needed($urpm, $blist, $sources, @$blists > 0);
+ $prev_medium = $blist->{medium};
+ }
}
1;