summaryrefslogtreecommitdiffstats
path: root/perl-install/install
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mandriva.org>2009-04-09 11:21:31 +0000
committerThierry Vignaud <tv@mandriva.org>2009-04-09 11:21:31 +0000
commit2a997dde3d1b567f7c7e61b9b42702b34743300e (patch)
tree7a567ec1cfbe02d63ec6f7f70daebb2754d8b500 /perl-install/install
parent1f47b19c262e31aca55a6f21f82af734d4356f66 (diff)
downloaddrakx-2a997dde3d1b567f7c7e61b9b42702b34743300e.tar
drakx-2a997dde3d1b567f7c7e61b9b42702b34743300e.tar.gz
drakx-2a997dde3d1b567f7c7e61b9b42702b34743300e.tar.bz2
drakx-2a997dde3d1b567f7c7e61b9b42702b34743300e.tar.xz
drakx-2a997dde3d1b567f7c7e61b9b42702b34743300e.zip
(get_file_and_size) be more compatible with older http code for error management
Diffstat (limited to 'perl-install/install')
-rw-r--r--perl-install/install/NEWS2
-rw-r--r--perl-install/install/http.pm12
2 files changed, 10 insertions, 4 deletions
diff --git a/perl-install/install/NEWS b/perl-install/install/NEWS
index ff01a25d4..ae38bf2a5 100644
--- a/perl-install/install/NEWS
+++ b/perl-install/install/NEWS
@@ -1,3 +1,5 @@
+- be more compatible with older http code for error management
+
Version 12.26.2 - 08 April 2009
- media management:
diff --git a/perl-install/install/http.pm b/perl-install/install/http.pm
index bca1f7362..5de087d61 100644
--- a/perl-install/install/http.pm
+++ b/perl-install/install/http.pm
@@ -29,7 +29,7 @@ sub get_file_and_size_ {
}
}
-sub get_file_and_size {
+sub get_file_and_size1 {
my ($url) = @_;
# can be used for ftp urls (with http proxy)
@@ -55,9 +55,13 @@ sub get_file_and_size {
}
my $res = urpm::download::sync_url($urpm, $url, dir => $cachedir);
- $res or die N("retrieval of [%s] failed", $file) . "\n";
- open(my $f, $file);
- (-s $file, $f);
+ if ($res) {
+ open(my $f, $file);
+ (-s $file, $f);
+ } else {
+ log::l("retrieval of [$file] failed");
+ undef;
+ }
}
1;