summaryrefslogtreecommitdiff
path: root/bitbake/lib
diff options
context:
space:
mode:
authorRichard Purdie <richard@openedhand.com>2006-11-27 08:52:57 +0000
committerRichard Purdie <richard@openedhand.com>2006-11-27 08:52:57 +0000
commitd8f7680dc0221880a1eeb7bf2275642dfd3ce263 (patch)
tree88a7937db1871c9a4308eed67650f6c5486a4f76 /bitbake/lib
parentf4ab3a1d3a56c8a0359809a2a561cb02aa5ab475 (diff)
downloadopenembedded-core-d8f7680dc0221880a1eeb7bf2275642dfd3ce263.tar.gz
openembedded-core-d8f7680dc0221880a1eeb7bf2275642dfd3ce263.tar.bz2
openembedded-core-d8f7680dc0221880a1eeb7bf2275642dfd3ce263.zip
fetch/__init__.py: Store url data per .bb file fixing urldata contamination between .bb files.
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@960 311d38ba-8fff-0310-9ca6-ca027cbcb966
Diffstat (limited to 'bitbake/lib')
-rw-r--r--bitbake/lib/bb/fetch/__init__.py17
1 files changed, 11 insertions, 6 deletions
diff --git a/bitbake/lib/bb/fetch/__init__.py b/bitbake/lib/bb/fetch/__init__.py
index 24aebc41ca..84a80d1e57 100644
--- a/bitbake/lib/bb/fetch/__init__.py
+++ b/bitbake/lib/bb/fetch/__init__.py
@@ -91,7 +91,10 @@ def init(urls = [], d = None):
ud.method.urls.append(u)
def initdata(url, d):
- if url not in urldata:
+ fn = bb.data.getVar('FILE', d, 1)
+ if fn not in urldata:
+ urldata[fn] = {}
+ if url not in urldata[fn]:
ud = FetchData()
(ud.type, ud.host, ud.path, ud.user, ud.pswd, ud.parm) = bb.decodeurl(data.expand(url, d))
ud.date = Fetch.getSRCDate(d)
@@ -104,15 +107,16 @@ def initdata(url, d):
ud.localpath = ud.parm["localpath"]
ud.method = m
break
- urldata[url] = ud
- return urldata[url]
+ urldata[fn][url] = ud
+ return urldata[fn][url]
def go(d):
"""Fetch all urls"""
+ fn = bb.data.getVar('FILE', d, 1)
for m in methods:
for u in m.urls:
- ud = urldata[u]
- if ud.localfile and not m.forcefetch(u, ud, d) and os.path.exists(urldata[u].md5):
+ ud = urldata[fn][u]
+ if ud.localfile and not m.forcefetch(u, ud, d) and os.path.exists(urldata[fn][u].md5):
# File already present along with md5 stamp file
# Touch md5 file to show activity
os.utime(ud.md5, None)
@@ -127,9 +131,10 @@ def go(d):
def localpaths(d):
"""Return a list of the local filenames, assuming successful fetch"""
local = []
+ fn = bb.data.getVar('FILE', d, 1)
for m in methods:
for u in m.urls:
- local.append(urldata[u].localpath)
+ local.append(urldata[fn][u].localpath)
return local
def localpath(url, d):