summaryrefslogtreecommitdiffstats
path: root/urpm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2008-07-08 19:36:42 +0000
committerPascal Rigaux <pixel@mandriva.com>2008-07-08 19:36:42 +0000
commit576b4e766e0dd95d2601f2eaf160021503e443e1 (patch)
treef07ce75a582273308541d78ec08ab76dc5018062 /urpm
parent9e3ac6ad068fc76b85ab0360fa3c7cac0a59e377 (diff)
downloadurpmi-576b4e766e0dd95d2601f2eaf160021503e443e1.tar
urpmi-576b4e766e0dd95d2601f2eaf160021503e443e1.tar.gz
urpmi-576b4e766e0dd95d2601f2eaf160021503e443e1.tar.bz2
urpmi-576b4e766e0dd95d2601f2eaf160021503e443e1.tar.xz
urpmi-576b4e766e0dd95d2601f2eaf160021503e443e1.zip
use a local copy of $blists to avoid modifying it
Diffstat (limited to 'urpm')
-rw-r--r--urpm/cdrom.pm12
1 files changed, 6 insertions, 6 deletions
diff --git a/urpm/cdrom.pm b/urpm/cdrom.pm
index 38aabb76..05bd86af 100644
--- a/urpm/cdrom.pm
+++ b/urpm/cdrom.pm
@@ -216,20 +216,20 @@ sub _copy_from_cdrom__if_needed {
sub copy_packages_of_removable_media {
my ($urpm, $blists, $sources, $o_ask_for_medium) = @_;
- @$blists = grep { urpm::is_cdrom_url($_->{medium}{url}) } @$blists;
+ my @blists = grep { urpm::is_cdrom_url($_->{medium}{url}) } @$blists;
# we prompt for CDs used less first, since the last CD will be used directly
- @$blists = sort { values(%{$a->{list}}) <=> values(%{$b->{list}}) } @$blists;
+ @blists = sort { values(%{$a->{list}}) <=> values(%{$b->{list}}) } @blists;
my $prev_medium;
- while (@$blists) {
+ while (@blists) {
$prev_medium and delete $prev_medium->{mntpoint};
_may_eject_cdrom($urpm);
- my @blists_mounted = _mount_cdrom($urpm, $blists, $o_ask_for_medium);
- @$blists = difference2($blists, \@blists_mounted);
+ 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);
+ _copy_from_cdrom__if_needed($urpm, $blist, $sources, @blists > 0);
$prev_medium = $blist->{medium};
}
}