diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2006-11-20 15:42:08 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2006-11-20 15:42:08 +0000 |
commit | 0c0cb9890b271b7bc53cc6d53b8d5bf01545a819 (patch) | |
tree | 8c3fd9f7faf38111045c0d6200852e75a7761186 /urpm.pm | |
parent | d24fe494474d65c7871fd811234ed8560fcaf8b3 (diff) | |
download | urpmi-0c0cb9890b271b7bc53cc6d53b8d5bf01545a819.tar urpmi-0c0cb9890b271b7bc53cc6d53b8d5bf01545a819.tar.gz urpmi-0c0cb9890b271b7bc53cc6d53b8d5bf01545a819.tar.bz2 urpmi-0c0cb9890b271b7bc53cc6d53b8d5bf01545a819.tar.xz urpmi-0c0cb9890b271b7bc53cc6d53b8d5bf01545a819.zip |
have same _guess_hdlist_suffix parameters(), and simplify
Diffstat (limited to 'urpm.pm')
-rw-r--r-- | urpm.pm | 7 |
1 files changed, 3 insertions, 4 deletions
@@ -1063,9 +1063,8 @@ sub reconfig_urpmi { } sub _guess_hdlist_suffix { - my ($dir) = @_; - my ($suffix) = $dir =~ m!\bmedia/(\w+)/*\Z!; - $suffix; + my ($url) = @_; + $url =~ m!\bmedia/(\w+)/*\Z! && $1; } sub _hdlist_suffix { @@ -1389,7 +1388,7 @@ this could happen if you mounted manually the directory when creating the medium #- try to probe for possible with_hdlist parameter, unless #- it is already defined (and valid). if ($options->{probe_with} && (!$medium->{with_hdlist} || ! -e "$dir/$medium->{with_hdlist}")) { - foreach (_probe_with_try_list(_guess_hdlist_suffix($dir), $options->{probe_with})) { + foreach (_probe_with_try_list(_guess_hdlist_suffix($medium->{url}), $options->{probe_with})) { -e "$dir/$_" or next; if (file_size("$dir/$_") > 32) { $medium->{with_hdlist} = $_; |