bitbake: Try to fix cache locking issue
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@2361 311d38ba-8fff-0310-9ca6-ca027cbcb966
This commit is contained in:
parent
51df8408c1
commit
89853852ed
|
@ -106,7 +106,7 @@ def init(urls, d, cache = True):
|
||||||
urldata = {}
|
urldata = {}
|
||||||
|
|
||||||
if cache:
|
if cache:
|
||||||
urldata, pd, fn = getdata(d)
|
urldata = getdata(d)
|
||||||
|
|
||||||
for url in urls:
|
for url in urls:
|
||||||
if url not in urldata:
|
if url not in urldata:
|
||||||
|
@ -119,6 +119,8 @@ def init(urls, d, cache = True):
|
||||||
urldata[url] = ud
|
urldata[url] = ud
|
||||||
|
|
||||||
if cache:
|
if cache:
|
||||||
|
fn = bb.data.getVar('FILE', d, 1)
|
||||||
|
pd = persist_data.PersistData(d)
|
||||||
pd.setValue("BB_URLDATA", fn, pickle.dumps(urldata, 0))
|
pd.setValue("BB_URLDATA", fn, pickle.dumps(urldata, 0))
|
||||||
|
|
||||||
return urldata
|
return urldata
|
||||||
|
@ -131,14 +133,14 @@ def getdata(d):
|
||||||
if encdata:
|
if encdata:
|
||||||
urldata = pickle.loads(str(encdata))
|
urldata = pickle.loads(str(encdata))
|
||||||
|
|
||||||
return urldata, pd, fn
|
return urldata
|
||||||
|
|
||||||
def go(d, urldata = None):
|
def go(d, urldata = None):
|
||||||
"""
|
"""
|
||||||
Fetch all urls
|
Fetch all urls
|
||||||
"""
|
"""
|
||||||
if not urldata:
|
if not urldata:
|
||||||
urldata, pd, fn = getdata(d)
|
urldata = getdata(d)
|
||||||
|
|
||||||
for u in urldata:
|
for u in urldata:
|
||||||
ud = urldata[u]
|
ud = urldata[u]
|
||||||
|
@ -158,7 +160,7 @@ def localpaths(d, urldata = None):
|
||||||
"""
|
"""
|
||||||
local = []
|
local = []
|
||||||
if not urldata:
|
if not urldata:
|
||||||
urldata, pd, fn = getdata(d)
|
urldata = getdata(d)
|
||||||
|
|
||||||
for u in urldata:
|
for u in urldata:
|
||||||
ud = urldata[u]
|
ud = urldata[u]
|
||||||
|
@ -175,7 +177,7 @@ def get_srcrev(d):
|
||||||
have been set.
|
have been set.
|
||||||
"""
|
"""
|
||||||
scms = []
|
scms = []
|
||||||
urldata, pd, fn = getdata(d)
|
urldata = getdata(d)
|
||||||
if len(urldata) == 0:
|
if len(urldata) == 0:
|
||||||
src_uri = bb.data.getVar('SRC_URI', d, 1).split()
|
src_uri = bb.data.getVar('SRC_URI', d, 1).split()
|
||||||
for url in src_uri:
|
for url in src_uri:
|
||||||
|
|
Loading…
Reference in New Issue