diff options
Diffstat (limited to 'perl-install/install/http.pm')
-rw-r--r-- | perl-install/install/http.pm | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/perl-install/install/http.pm b/perl-install/install/http.pm index 2a625dff3..db111564c 100644 --- a/perl-install/install/http.pm +++ b/perl-install/install/http.pm @@ -1,13 +1,9 @@ -package install::http; # $Id: http.pm 270205 2010-07-02 12:24:09Z pterjan $ +package install::http; use urpm::download; use common; use Cwd; -# to be killed once callers got fixed -sub close() { -} - sub getFile { my ($url, %o_options) = @_; my ($_size, $fh) = get_file_and_size($url, %o_options) or return; @@ -41,6 +37,7 @@ sub get_file_and_size { if (!$urpm) { require install::pkgs; $urpm = install::pkgs::empty_packages($::o->{keep_unrequested_dependencies}); + $urpm->{options}{'curl-options'} = '-s'; } my $cachedir = $urpm->{cachedir} || '/root'; @@ -55,12 +52,7 @@ sub get_file_and_size { urpm::download::set_cmdline_proxy(http_proxy => "http://$proxy/"); } - (my $cwd) = getcwd() =~ /(.*)/; my $res = eval { urpm::download::sync_url($urpm, $url, %o_options, dir => $cachedir) }; - #- urpmi does not always reset cwd when dying or failing! - #- do not stay in /mnt/var/cache/urpmi, it's evil to be in /mnt - #- FIXME: fix urpmi - chdir $cwd; if ($res) { open(my $f, $file); |