summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/fetch
diff options
context:
space:
mode:
authorRichard Purdie <richard@openedhand.com>2007-08-12 23:06:49 +0000
committerRichard Purdie <richard@openedhand.com>2007-08-12 23:06:49 +0000
commitce800d3aea333919302a490838906983c18fe54d (patch)
tree14754c6d6de07f47a6f917b4d4d0e9bf52468beb /bitbake/lib/bb/fetch
parentfc136f0b4c9f6c0bed18fb565f5c83d041abdd39 (diff)
downloadpoky-ce800d3aea333919302a490838906983c18fe54d.tar.gz
bitbake: Sync with upstream 1.8 branch for fixes
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@2484 311d38ba-8fff-0310-9ca6-ca027cbcb966
Diffstat (limited to 'bitbake/lib/bb/fetch')
-rw-r--r--bitbake/lib/bb/fetch/__init__.py17
-rw-r--r--bitbake/lib/bb/fetch/local.py4
2 files changed, 18 insertions, 3 deletions
diff --git a/bitbake/lib/bb/fetch/__init__.py b/bitbake/lib/bb/fetch/__init__.py
index f739245bd1..229b28c19d 100644
--- a/bitbake/lib/bb/fetch/__init__.py
+++ b/bitbake/lib/bb/fetch/__init__.py
@@ -182,8 +182,21 @@ def get_srcrev(d):
182 if len(scms) == 1: 182 if len(scms) == 1:
183 return urldata[scms[0]].method.sortable_revision(scms[0], urldata[scms[0]], d) 183 return urldata[scms[0]].method.sortable_revision(scms[0], urldata[scms[0]], d)
184 184
185 bb.msg.error(bb.msg.domain.Fetcher, "Sorry, support for SRCREV_FORMAT still needs to be written") 185 #
186 raise ParameterError 186 # Mutiple SCMs are in SRC_URI so we resort to SRCREV_FORMAT
187 #
188 format = bb.data.getVar('SRCREV_FORMAT', d, 1)
189 if not format:
190 bb.msg.error(bb.msg.domain.Fetcher, "The SRCREV_FORMAT variable must be set when multiple SCMs are used.")
191 raise ParameterError
192
193 for scm in scms:
194 if 'name' in urldata[scm].parm:
195 name = urldata[scm].parm["name"]
196 rev = urldata[scm].method.sortable_revision(scm, urldata[scm], d)
197 format = format.replace(name, rev)
198
199 return format
187 200
188def localpath(url, d, cache = True): 201def localpath(url, d, cache = True):
189 """ 202 """
diff --git a/bitbake/lib/bb/fetch/local.py b/bitbake/lib/bb/fetch/local.py
index 9be8f1ce4b..5e480a208e 100644
--- a/bitbake/lib/bb/fetch/local.py
+++ b/bitbake/lib/bb/fetch/local.py
@@ -38,9 +38,11 @@ class Local(Fetch):
38 return urldata.type in ['file','patch'] 38 return urldata.type in ['file','patch']
39 39
40 def localpath(self, url, urldata, d): 40 def localpath(self, url, urldata, d):
41 """Return the local filename of a given url assuming a successful fetch. 41 """
42 Return the local filename of a given url assuming a successful fetch.
42 """ 43 """
43 path = url.split("://")[1] 44 path = url.split("://")[1]
45 path = path.split(";")[0]
44 newpath = path 46 newpath = path
45 if path[0] != "/": 47 if path[0] != "/":
46 filespath = data.getVar('FILESPATH', d, 1) 48 filespath = data.getVar('FILESPATH', d, 1)