summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/fetch2/bzr.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/bzr.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/bzr.py')
-rw-r--r--bitbake/lib/bb/fetch2/bzr.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/bitbake/lib/bb/fetch2/bzr.py b/bitbake/lib/bb/fetch2/bzr.py
index 6e1970b715..80c02f835b 100644
--- a/bitbake/lib/bb/fetch2/bzr.py
+++ b/bitbake/lib/bb/fetch2/bzr.py
@@ -120,13 +120,13 @@ class Bzr(Fetch):
120 def supports_srcrev(self): 120 def supports_srcrev(self):
121 return True 121 return True
122 122
123 def _revision_key(self, url, ud, d): 123 def _revision_key(self, url, ud, d, name):
124 """ 124 """
125 Return a unique key for the url 125 Return a unique key for the url
126 """ 126 """
127 return "bzr:" + ud.pkgdir 127 return "bzr:" + ud.pkgdir
128 128
129 def _latest_revision(self, url, ud, d): 129 def _latest_revision(self, url, ud, d, name):
130 """ 130 """
131 Return the latest upstream revision number 131 Return the latest upstream revision number
132 """ 132 """