diff options
author | Richard Purdie <richard@openedhand.com> | 2007-08-04 20:13:35 +0000 |
---|---|---|
committer | Richard Purdie <richard@openedhand.com> | 2007-08-04 20:13:35 +0000 |
commit | 89853852ed422e5be7e488ea2389fc7760f97d29 (patch) | |
tree | 4deb0cf475e833d3e77ed467327f85ebae877a32 /bitbake | |
parent | 51df8408c139e99e5d4f7fabe235eee4bd05d3fd (diff) | |
download | poky-89853852ed422e5be7e488ea2389fc7760f97d29.tar.gz |
bitbake: Try to fix cache locking issue
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@2361 311d38ba-8fff-0310-9ca6-ca027cbcb966
Diffstat (limited to 'bitbake')
-rw-r--r-- | bitbake/lib/bb/fetch/__init__.py | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/bitbake/lib/bb/fetch/__init__.py b/bitbake/lib/bb/fetch/__init__.py index 6ebf5a34ad..9333e2b600 100644 --- a/bitbake/lib/bb/fetch/__init__.py +++ b/bitbake/lib/bb/fetch/__init__.py | |||
@@ -106,7 +106,7 @@ def init(urls, d, cache = True): | |||
106 | urldata = {} | 106 | urldata = {} |
107 | 107 | ||
108 | if cache: | 108 | if cache: |
109 | urldata, pd, fn = getdata(d) | 109 | urldata = getdata(d) |
110 | 110 | ||
111 | for url in urls: | 111 | for url in urls: |
112 | if url not in urldata: | 112 | if url not in urldata: |
@@ -119,6 +119,8 @@ def init(urls, d, cache = True): | |||
119 | urldata[url] = ud | 119 | urldata[url] = ud |
120 | 120 | ||
121 | if cache: | 121 | if cache: |
122 | fn = bb.data.getVar('FILE', d, 1) | ||
123 | pd = persist_data.PersistData(d) | ||
122 | pd.setValue("BB_URLDATA", fn, pickle.dumps(urldata, 0)) | 124 | pd.setValue("BB_URLDATA", fn, pickle.dumps(urldata, 0)) |
123 | 125 | ||
124 | return urldata | 126 | return urldata |
@@ -131,14 +133,14 @@ def getdata(d): | |||
131 | if encdata: | 133 | if encdata: |
132 | urldata = pickle.loads(str(encdata)) | 134 | urldata = pickle.loads(str(encdata)) |
133 | 135 | ||
134 | return urldata, pd, fn | 136 | return urldata |
135 | 137 | ||
136 | def go(d, urldata = None): | 138 | def go(d, urldata = None): |
137 | """ | 139 | """ |
138 | Fetch all urls | 140 | Fetch all urls |
139 | """ | 141 | """ |
140 | if not urldata: | 142 | if not urldata: |
141 | urldata, pd, fn = getdata(d) | 143 | urldata = getdata(d) |
142 | 144 | ||
143 | for u in urldata: | 145 | for u in urldata: |
144 | ud = urldata[u] | 146 | ud = urldata[u] |
@@ -158,7 +160,7 @@ def localpaths(d, urldata = None): | |||
158 | """ | 160 | """ |
159 | local = [] | 161 | local = [] |
160 | if not urldata: | 162 | if not urldata: |
161 | urldata, pd, fn = getdata(d) | 163 | urldata = getdata(d) |
162 | 164 | ||
163 | for u in urldata: | 165 | for u in urldata: |
164 | ud = urldata[u] | 166 | ud = urldata[u] |
@@ -175,7 +177,7 @@ def get_srcrev(d): | |||
175 | have been set. | 177 | have been set. |
176 | """ | 178 | """ |
177 | scms = [] | 179 | scms = [] |
178 | urldata, pd, fn = getdata(d) | 180 | urldata = getdata(d) |
179 | if len(urldata) == 0: | 181 | if len(urldata) == 0: |
180 | src_uri = bb.data.getVar('SRC_URI', d, 1).split() | 182 | src_uri = bb.data.getVar('SRC_URI', d, 1).split() |
181 | for url in src_uri: | 183 | for url in src_uri: |