summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mandriva.org>2008-10-01 23:21:28 +0000
committerThierry Vignaud <tv@mandriva.org>2008-10-01 23:21:28 +0000
commita1e7be0047b20719581fa5405994ad03480448ea (patch)
tree1e49150949ddc68bc48d63b182e66c367d71992a
parent85d771368e4b3dc21be05e365118ee262e3b7e70 (diff)
downloadmgaonline-a1e7be0047b20719581fa5405994ad03480448ea.tar
mgaonline-a1e7be0047b20719581fa5405994ad03480448ea.tar.gz
mgaonline-a1e7be0047b20719581fa5405994ad03480448ea.tar.bz2
mgaonline-a1e7be0047b20719581fa5405994ad03480448ea.tar.xz
mgaonline-a1e7be0047b20719581fa5405994ad03480448ea.zip
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")
-rw-r--r--NEWS5
-rw-r--r--mdkapplet_urpm.pm2
2 files changed, 6 insertions, 1 deletions
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);