diff options
author | Thierry Vignaud <tv@mandriva.org> | 2007-10-23 01:10:24 +0000 |
---|---|---|
committer | Thierry Vignaud <tv@mandriva.org> | 2007-10-23 01:10:24 +0000 |
commit | c5b13377fad1b2bdac6f0ac39c41d3e46af30426 (patch) | |
tree | c202c8d4c7cef9feb2228d2c27c33525b9baaf0a /Rpmdrake/edit_urpm_sources.pm | |
parent | 104d1e448c04aabf656cf499a2ca60558ce03b05 (diff) | |
download | rpmdrake-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.pm | 10 |
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; } |