summaryrefslogtreecommitdiffstats
path: root/urpm.pm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2006-11-20 15:42:08 +0000
committerPascal Rigaux <pixel@mandriva.com>2006-11-20 15:42:08 +0000
commit0c0cb9890b271b7bc53cc6d53b8d5bf01545a819 (patch)
tree8c3fd9f7faf38111045c0d6200852e75a7761186 /urpm.pm
parentd24fe494474d65c7871fd811234ed8560fcaf8b3 (diff)
downloadurpmi-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.pm7
1 files changed, 3 insertions, 4 deletions
diff --git a/urpm.pm b/urpm.pm
index 45133f7e..61464704 100644
--- a/urpm.pm
+++ b/urpm.pm
@@ -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} = $_;