From 97a47d30b9e12e494a3da59d7359eb930230e4c2 Mon Sep 17 00:00:00 2001 From: Holger Hans Peter Freyther Date: Wed, 18 May 2005 22:37:01 +0000 Subject: [PATCH] tbake/lib/bb/fetch.py: Stop sf.net from bull?#*... us. We will fail when we wanted to download a file and got something with a different name. This should solve sf.net related problems as we go immediately to the next mirror and it should work for all other packages as well. --- lib/bb/fetch.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lib/bb/fetch.py b/lib/bb/fetch.py index ee5c40b..8567fbf 100644 --- a/lib/bb/fetch.py +++ b/lib/bb/fetch.py @@ -183,6 +183,13 @@ class Wget(Fetch): if ret != 0: return False + # check if sourceforge did send us to the mirror page + dl_dir = data.getVar("DL_DIR", d, True) + if not os.path.exists(dl): + os.system("rm %s*" % dl) # FIXME shell quote it + bb.debug(2,"sourceforge.net send us to the mirror on %s" % basename) + return False + # supposedly complete.. write out md5sum if bb.which(data.getVar('PATH', d), 'md5sum'): try: -- 2.7.4