diff options
author | Yu Ke <ke.yu@intel.com> | 2011-01-26 20:14:06 +0800 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2011-02-02 17:19:18 +0000 |
commit | 0e837e6844be449659bb96a1498e54a8b9442d13 (patch) | |
tree | 79c3f4dada68ff4c4d2d4d2d37d17eced8846f47 /bitbake/lib/bb/fetch2/hg.py | |
parent | affcfe468a0c2993c0c4ace446248f85aee4315f (diff) | |
download | poky-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/hg.py')
-rw-r--r-- | bitbake/lib/bb/fetch2/hg.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/bitbake/lib/bb/fetch2/hg.py b/bitbake/lib/bb/fetch2/hg.py index 4ba28c7100..13e9b8673b 100644 --- a/bitbake/lib/bb/fetch2/hg.py +++ b/bitbake/lib/bb/fetch2/hg.py | |||
@@ -163,7 +163,7 @@ class Hg(Fetch): | |||
163 | def supports_srcrev(self): | 163 | def supports_srcrev(self): |
164 | return True | 164 | return True |
165 | 165 | ||
166 | def _latest_revision(self, url, ud, d): | 166 | def _latest_revision(self, url, ud, d, name): |
167 | """ | 167 | """ |
168 | Compute tip revision for the url | 168 | Compute tip revision for the url |
169 | """ | 169 | """ |
@@ -174,7 +174,7 @@ class Hg(Fetch): | |||
174 | def _build_revision(self, url, ud, d): | 174 | def _build_revision(self, url, ud, d): |
175 | return ud.revision | 175 | return ud.revision |
176 | 176 | ||
177 | def _revision_key(self, url, ud, d): | 177 | def _revision_key(self, url, ud, d, name): |
178 | """ | 178 | """ |
179 | Return a unique key for the url | 179 | Return a unique key for the url |
180 | """ | 180 | """ |