summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--bitbake/lib/bb/fetch2/__init__.py60
1 files changed, 32 insertions, 28 deletions
diff --git a/bitbake/lib/bb/fetch2/__init__.py b/bitbake/lib/bb/fetch2/__init__.py
index 05ab2a5b75..55ef457da4 100644
--- a/bitbake/lib/bb/fetch2/__init__.py
+++ b/bitbake/lib/bb/fetch2/__init__.py
@@ -1067,10 +1067,10 @@ def try_mirror_url(fetch, origud, ud, ld, check = False):
1067 # Return of None or a value means we're finished 1067 # Return of None or a value means we're finished
1068 # False means try another url 1068 # False means try another url
1069 1069
1070 if ud.lockfile and ud.lockfile != origud.lockfile:
1071 lf = bb.utils.lockfile(ud.lockfile)
1072
1073 try: 1070 try:
1071 if ud.lockfile and ud.lockfile != origud.lockfile:
1072 lf = bb.utils.lockfile(ud.lockfile)
1073
1074 if check: 1074 if check:
1075 found = ud.method.checkstatus(fetch, ud, ld) 1075 found = ud.method.checkstatus(fetch, ud, ld)
1076 if found: 1076 if found:
@@ -1864,10 +1864,10 @@ class Fetch(object):
1864 m = ud.method 1864 m = ud.method
1865 done = False 1865 done = False
1866 1866
1867 if ud.lockfile:
1868 lf = bb.utils.lockfile(ud.lockfile)
1869
1870 try: 1867 try:
1868 if ud.lockfile:
1869 lf = bb.utils.lockfile(ud.lockfile)
1870
1871 self.d.setVar("BB_NO_NETWORK", network) 1871 self.d.setVar("BB_NO_NETWORK", network)
1872 if m.verify_donestamp(ud, self.d) and not m.need_update(ud, self.d): 1872 if m.verify_donestamp(ud, self.d) and not m.need_update(ud, self.d):
1873 done = True 1873 done = True
@@ -2000,18 +2000,20 @@ class Fetch(object):
2000 unpack_tracer.start(root, self.ud, self.d) 2000 unpack_tracer.start(root, self.ud, self.d)
2001 2001
2002 for u in urls: 2002 for u in urls:
2003 ud = self.ud[u] 2003 try:
2004 ud.setup_localpath(self.d) 2004 ud = self.ud[u]
2005 ud.setup_localpath(self.d)
2005 2006
2006 if ud.lockfile: 2007 if ud.lockfile:
2007 lf = bb.utils.lockfile(ud.lockfile) 2008 lf = bb.utils.lockfile(ud.lockfile)
2008 2009
2009 unpack_tracer.start_url(u) 2010 unpack_tracer.start_url(u)
2010 ud.method.unpack(ud, root, self.d) 2011 ud.method.unpack(ud, root, self.d)
2011 unpack_tracer.finish_url(u) 2012 unpack_tracer.finish_url(u)
2012 2013
2013 if ud.lockfile: 2014 finally:
2014 bb.utils.unlockfile(lf) 2015 if ud.lockfile:
2016 bb.utils.unlockfile(lf)
2015 2017
2016 unpack_tracer.complete() 2018 unpack_tracer.complete()
2017 2019
@@ -2024,23 +2026,25 @@ class Fetch(object):
2024 urls = self.urls 2026 urls = self.urls
2025 2027
2026 for url in urls: 2028 for url in urls:
2027 if url not in self.ud: 2029 try:
2028 self.ud[url] = FetchData(url, self.d) 2030 if url not in self.ud:
2029 ud = self.ud[url] 2031 self.ud[url] = FetchData(url, self.d)
2030 ud.setup_localpath(self.d) 2032 ud = self.ud[url]
2033 ud.setup_localpath(self.d)
2031 2034
2032 if not ud.localfile and ud.localpath is None: 2035 if not ud.localfile and ud.localpath is None:
2033 continue 2036 continue
2034 2037
2035 if ud.lockfile: 2038 if ud.lockfile:
2036 lf = bb.utils.lockfile(ud.lockfile) 2039 lf = bb.utils.lockfile(ud.lockfile)
2037 2040
2038 ud.method.clean(ud, self.d) 2041 ud.method.clean(ud, self.d)
2039 if ud.donestamp: 2042 if ud.donestamp:
2040 bb.utils.remove(ud.donestamp) 2043 bb.utils.remove(ud.donestamp)
2041 2044
2042 if ud.lockfile: 2045 finally:
2043 bb.utils.unlockfile(lf) 2046 if ud.lockfile:
2047 bb.utils.unlockfile(lf)
2044 2048
2045 def expanded_urldata(self, urls=None): 2049 def expanded_urldata(self, urls=None):
2046 """ 2050 """