From 5d3bb5e547281c3ca79da5fb49e8a23234c4702b Mon Sep 17 00:00:00 2001 From: Olivier Blin Date: Tue, 24 Nov 2009 16:14:24 +0000 Subject: do not stay chdired in /mnt/var/cache/urpmi when download fails (workaround urpmi bug) --- perl-install/install/NEWS | 2 ++ perl-install/install/http.pm | 6 ++++++ 2 files changed, 8 insertions(+) (limited to 'perl-install') diff --git a/perl-install/install/NEWS b/perl-install/install/NEWS index dcb41c48c..df4dcce44 100644 --- a/perl-install/install/NEWS +++ b/perl-install/install/NEWS @@ -9,6 +9,8 @@ o unmount swap too when unmounting all partitions o do not suggest Windows mountpoint for mounted partitions (breaks install if the Win partition is the installer media) +- do not stay chdired in /mnt/var/cache/urpmi when download fails + (workaround urpmi bug) Version 12.77 - 30 October 2009 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); -- cgit v1.2.1