aboutsummaryrefslogtreecommitdiffstats
path: root/Rpmdrake/edit_urpm_sources.pm
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mandriva.org>2007-10-23 01:10:24 +0000
committerThierry Vignaud <tv@mandriva.org>2007-10-23 01:10:24 +0000
commitc5b13377fad1b2bdac6f0ac39c41d3e46af30426 (patch)
treec202c8d4c7cef9feb2228d2c27c33525b9baaf0a /Rpmdrake/edit_urpm_sources.pm
parent104d1e448c04aabf656cf499a2ca60558ce03b05 (diff)
downloadrpmdrake-c5b13377fad1b2bdac6f0ac39c41d3e46af30426.tar
rpmdrake-c5b13377fad1b2bdac6f0ac39c41d3e46af30426.tar.gz
rpmdrake-c5b13377fad1b2bdac6f0ac39c41d3e46af30426.tar.bz2
rpmdrake-c5b13377fad1b2bdac6f0ac39c41d3e46af30426.tar.xz
rpmdrake-c5b13377fad1b2bdac6f0ac39c41d3e46af30426.zip
(add_distrib_update_media) factorize computing unique media names
Diffstat (limited to 'Rpmdrake/edit_urpm_sources.pm')
-rw-r--r--Rpmdrake/edit_urpm_sources.pm10
1 files changed, 1 insertions, 9 deletions
diff --git a/Rpmdrake/edit_urpm_sources.pm b/Rpmdrake/edit_urpm_sources.pm
index 79cf19e2..b44abdd8 100644
--- a/Rpmdrake/edit_urpm_sources.pm
+++ b/Rpmdrake/edit_urpm_sources.pm
@@ -137,15 +137,7 @@ Is it ok to continue?", $distro),
) or return 0;
ref $mirror or return;
my $wait = wait_msg(N("Please wait, adding media..."));
- my $medium_name;
- if ($rpmdrake::mandrake_release =~ /(\d+\.\d+) \((\w+)\)/) {
- $medium_name = $2 . $1 . '-';
- } else {
- $medium_name = 'distrib';
- }
- #- ensure a unique medium name
- my $initial_number = 1 + max map { $_->{name} =~ /\(\Q$medium_name\E(\d+)\b/ ? $1 : 0 } @{$urpm->{media}};
- add_distrib_update_media($urpm, $medium_name, $mirror, initial_number => $initial_number);
+ add_distrib_update_media($urpm, $mirror);
remove_wait_msg($wait);
return 1;
}