summaryrefslogtreecommitdiffstats
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)
downloadpoky-d8f7680dc0221880a1eeb7bf2275642dfd3ce263.tar.gz
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):
91 ud.method.urls.append(u) 91 ud.method.urls.append(u)
92 92
93def initdata(url, d): 93def initdata(url, d):
94 if url not in urldata: 94 fn = bb.data.getVar('FILE', d, 1)
95 if fn not in urldata:
96 urldata[fn] = {}
97 if url not in urldata[fn]:
95 ud = FetchData() 98 ud = FetchData()
96 (ud.type, ud.host, ud.path, ud.user, ud.pswd, ud.parm) = bb.decodeurl(data.expand(url, d)) 99 (ud.type, ud.host, ud.path, ud.user, ud.pswd, ud.parm) = bb.decodeurl(data.expand(url, d))
97 ud.date = Fetch.getSRCDate(d) 100 ud.date = Fetch.getSRCDate(d)
@@ -104,15 +107,16 @@ def initdata(url, d):
104 ud.localpath = ud.parm["localpath"] 107 ud.localpath = ud.parm["localpath"]
105 ud.method = m 108 ud.method = m
106 break 109 break
107 urldata[url] = ud 110 urldata[fn][url] = ud
108 return urldata[url] 111 return urldata[fn][url]
109 112
110def go(d): 113def go(d):
111 """Fetch all urls""" 114 """Fetch all urls"""
115 fn = bb.data.getVar('FILE', d, 1)
112 for m in methods: 116 for m in methods:
113 for u in m.urls: 117 for u in m.urls:
114 ud = urldata[u] 118 ud = urldata[fn][u]
115 if ud.localfile and not m.forcefetch(u, ud, d) and os.path.exists(urldata[u].md5): 119 if ud.localfile and not m.forcefetch(u, ud, d) and os.path.exists(urldata[fn][u].md5):
116 # File already present along with md5 stamp file 120 # File already present along with md5 stamp file
117 # Touch md5 file to show activity 121 # Touch md5 file to show activity
118 os.utime(ud.md5, None) 122 os.utime(ud.md5, None)
@@ -127,9 +131,10 @@ def go(d):
127def localpaths(d): 131def localpaths(d):
128 """Return a list of the local filenames, assuming successful fetch""" 132 """Return a list of the local filenames, assuming successful fetch"""
129 local = [] 133 local = []
134 fn = bb.data.getVar('FILE', d, 1)
130 for m in methods: 135 for m in methods:
131 for u in m.urls: 136 for u in m.urls:
132 local.append(urldata[u].localpath) 137 local.append(urldata[fn][u].localpath)
133 return local 138 return local
134 139
135def localpath(url, d): 140def localpath(url, d):