diff options
-rw-r--r-- | bitbake/lib/bb/fetch2/__init__.py | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/bitbake/lib/bb/fetch2/__init__.py b/bitbake/lib/bb/fetch2/__init__.py index 670afb1..5d7ef1f 100644 --- a/bitbake/lib/bb/fetch2/__init__.py +++ b/bitbake/lib/bb/fetch2/__init__.py @@ -507,8 +507,7 @@ def try_mirrors(d, origud, mirrors, check = False): logger.debug(1, "Mirror fetch failure for url %s (original url: %s)" % (newuri, origud.url)) logger.debug(1, str(e)) try: - if os.path.isfile(ud.localpath): - bb.utils.remove(ud.localpath) + ud.method.clean(ud, ld) except UnboundLocalError: pass continue @@ -984,8 +983,7 @@ class Fetch(object): logger.debug(1, str(e)) firsterr = e # Remove any incomplete fetch - if os.path.isfile(ud.localpath): - bb.utils.remove(ud.localpath) + m.clean(ud, self.d) logger.debug(1, "Trying MIRRORS") mirrors = mirror_from_string(self.d.getVar('MIRRORS', True)) localpath = try_mirrors (self.d, ud, mirrors) |