summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/fetch2/svn.py
diff options
context:
space:
mode:
authorYu Ke <ke.yu@intel.com>2011-01-26 20:14:06 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2011-02-02 17:19:18 +0000
commit0e837e6844be449659bb96a1498e54a8b9442d13 (patch)
tree79c3f4dada68ff4c4d2d4d2d37d17eced8846f47 /bitbake/lib/bb/fetch2/svn.py
parentaffcfe468a0c2993c0c4ace446248f85aee4315f (diff)
downloadpoky-0e837e6844be449659bb96a1498e54a8b9442d13.tar.gz
fetch2: Allow multiple src rev to be used in one src_uri
* SRC_URI format: the SRC_URI are extended to allow multiple src rev: name=<name1>,<name2>,...<name-n> branch=<branch1>,<branch2>,...,<branch-n> also SRCREV can be defined with SRCREV_<name1> = xxxxx SRCREV_<name2> = xxxxx * FetchData extention to support multiple src rev, several FetchData data are added: - FetchData.names: list of name in SRC_URI, one name per srcrev. name is the index of revision and branch - FetchData.revisions: dictionary of name->revision. - FetchData.branches: dictionary of name->branch. For example, linux-yocto recipes becomes: SRC_URI = "git://git.pokylinux.org/linux-yocto-2.6.37;protocol=git;branch=${KBRANCH},meta;name=machine,meta" FetchData.names = ['machine', 'meta'] FetchData.revisions = { 'machine':xxxxx, 'meta':xxxxxx } FetchData.branches = { 'machine':${KBRANCH}, 'meta':'meta'} * generic revision handling extension the related revision handling code in fetch2.__init__.py are changed accordingly. the major change is add name parameter to indicate which src rev to handling. originally there is one src rev per FetchData, so FetchData parameter is enough. now since one FetchData has multiple src rev, it is necessary to use FetchData + name to specifiy src rev. * git extension git fetcher are also revised to take advantage of the multiple src rev in FetchData. especially the download() method are enhanced to fetch multiple src rev. * other fetcher (svn, hg, ...) does not support multiple src rev. they just sync the API to add name, and then simply ignore the name. no actually functional change Signed-off-by: Yu Ke <ke.yu@intel.com>
Diffstat (limited to 'bitbake/lib/bb/fetch2/svn.py')
-rw-r--r--bitbake/lib/bb/fetch2/svn.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/bitbake/lib/bb/fetch2/svn.py b/bitbake/lib/bb/fetch2/svn.py
index 8d768026be..96d5b1683a 100644
--- a/bitbake/lib/bb/fetch2/svn.py
+++ b/bitbake/lib/bb/fetch2/svn.py
@@ -172,13 +172,13 @@ class Svn(Fetch):
172 def supports_srcrev(self): 172 def supports_srcrev(self):
173 return True 173 return True
174 174
175 def _revision_key(self, url, ud, d): 175 def _revision_key(self, url, ud, d, name):
176 """ 176 """
177 Return a unique key for the url 177 Return a unique key for the url
178 """ 178 """
179 return "svn:" + ud.moddir 179 return "svn:" + ud.moddir
180 180
181 def _latest_revision(self, url, ud, d): 181 def _latest_revision(self, url, ud, d, name):
182 """ 182 """
183 Return the latest upstream revision number 183 Return the latest upstream revision number
184 """ 184 """