fetch/__init__.py: Allow srcdate to be overridden in SRC_URI
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@1015 311d38ba-8fff-0310-9ca6-ca027cbcb966
This commit is contained in:
parent
aac2b8d747
commit
b142185345
|
@ -97,7 +97,7 @@ def initdata(url, d):
|
||||||
if url not in urldata[fn]:
|
if url not in urldata[fn]:
|
||||||
ud = FetchData()
|
ud = FetchData()
|
||||||
(ud.type, ud.host, ud.path, ud.user, ud.pswd, ud.parm) = bb.decodeurl(data.expand(url, d))
|
(ud.type, ud.host, ud.path, ud.user, ud.pswd, ud.parm) = bb.decodeurl(data.expand(url, d))
|
||||||
ud.date = Fetch.getSRCDate(d)
|
ud.date = Fetch.getSRCDate(ud, d)
|
||||||
for m in methods:
|
for m in methods:
|
||||||
if m.supports(url, ud, d):
|
if m.supports(url, ud, d):
|
||||||
ud.localpath = m.localpath(url, ud, d)
|
ud.localpath = m.localpath(url, ud, d)
|
||||||
|
@ -190,12 +190,15 @@ class Fetch(object):
|
||||||
"""
|
"""
|
||||||
raise NoMethodError("Missing implementation for url")
|
raise NoMethodError("Missing implementation for url")
|
||||||
|
|
||||||
def getSRCDate(d):
|
def getSRCDate(urldata, d):
|
||||||
"""
|
"""
|
||||||
Return the SRC Date for the component
|
Return the SRC Date for the component
|
||||||
|
|
||||||
d the bb.data module
|
d the bb.data module
|
||||||
"""
|
"""
|
||||||
|
if "srcdate" in urldata.parm:
|
||||||
|
return urldata.parm['srcdate']
|
||||||
|
|
||||||
pn = data.getVar("PN", d, 1)
|
pn = data.getVar("PN", d, 1)
|
||||||
|
|
||||||
if pn:
|
if pn:
|
||||||
|
|
Loading…
Reference in New Issue