From a1e7be0047b20719581fa5405994ad03480448ea Mon Sep 17 00:00:00 2001 From: Thierry Vignaud Date: Wed, 1 Oct 2008 23:21:28 +0000 Subject: workarounding downloading distro list as user for 2008.1 where sometimes urpmi reports it failed to download the list when it actually did with success "curl failed: exited with signal 127" however the requested file did got downloaded and did exist on local hard disk even if it was unlinked just before performing the sync() call what's more, it only failed in 50% of the case; even more strangely, when run with "strace" it works (but still failed if run with "strace -f") --- NEWS | 5 +++++ mdkapplet_urpm.pm | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/NEWS b/NEWS index 92fb510e..77f62a1b 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,8 @@ +- mdkapplet + o workarounding downloading distro list as user for 2008.1 where + sometimes urpmi reports it failed to download the list when it + actually did with success + Version 2.44 - 30 September 2008 - mdkapplet diff --git a/mdkapplet_urpm.pm b/mdkapplet_urpm.pm index 980854af..203a968e 100644 --- a/mdkapplet_urpm.pm +++ b/mdkapplet_urpm.pm @@ -43,7 +43,7 @@ sub get_content { my $file = $download_dir . basename($url); unlink $file; # prevent "partial file" errors - urpm::download::sync($urpm, undef, [ $url ], quiet => 1, dir => $download_dir) or return; + eval { urpm::download::sync($urpm, undef, [ $url ], quiet => 1, dir => $download_dir) }; #sync_url($urpm, $url, dir => $download_dir, quiet => 1) or return; my @l = cat_($file); -- cgit v1.2.1