diff options
author | Olivier Blin <oblin@mandriva.com> | 2009-11-24 16:14:24 +0000 |
---|---|---|
committer | Olivier Blin <oblin@mandriva.com> | 2009-11-24 16:14:24 +0000 |
commit | 5d3bb5e547281c3ca79da5fb49e8a23234c4702b (patch) | |
tree | 627cd8058d231d53941f3d73fc8d8bd4639b4ef9 /perl-install/install/http.pm | |
parent | 73f8e6f9bcf7c1607f31aeb5de610ca7c6d15206 (diff) | |
download | drakx-5d3bb5e547281c3ca79da5fb49e8a23234c4702b.tar drakx-5d3bb5e547281c3ca79da5fb49e8a23234c4702b.tar.gz drakx-5d3bb5e547281c3ca79da5fb49e8a23234c4702b.tar.bz2 drakx-5d3bb5e547281c3ca79da5fb49e8a23234c4702b.tar.xz drakx-5d3bb5e547281c3ca79da5fb49e8a23234c4702b.zip |
do not stay chdired in /mnt/var/cache/urpmi when download fails (workaround urpmi bug)
Diffstat (limited to 'perl-install/install/http.pm')
-rw-r--r-- | perl-install/install/http.pm | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/perl-install/install/http.pm b/perl-install/install/http.pm index 3e879a874..c98a4184d 100644 --- a/perl-install/install/http.pm +++ b/perl-install/install/http.pm @@ -54,7 +54,13 @@ 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); (-s $file, $f); |