summaryrefslogtreecommitdiffstats
path: root/lib/bb/fetch2/git.py
AgeCommit message (Collapse)Author
2011-02-10fetch2: Correct the clean() mechanism for the fetcher2 codeSaul Wold
This create a clean() method in each of the fetcher modules and correctly cleans the .done stamp file and lock files (From Poky rev: 14dea89521c0c648e8e543388096a6dcd6d4f2e0) Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-02-10bitbake/fetch2/git: Write mirror tarballs if enabled and they don't exist, ↵Richard Purdie
also set a default value for mirror tarball generation (From Poky rev: 59a08262aba2d2b9b8b299a2818fb4cfe13b9909) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-02-10bitbake/fetch2/git: Fix broken variable referenceRichard Purdie
(From Poky rev: a235c67479846590eb2c7236bec3360b23c3e9b6) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-02-10bitbake/fetch2/git: Ensure unresolved branches are translated into revisionsRichard Purdie
(From Poky rev: 5920e85c561624e657c126df58f5c378a8950bbc) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-02-10bitbake/fetch2: Update forcefetch and mirror handling to clean up, simplfy ↵Richard Purdie
and bug fix the code (From Poky rev: 37624b97450f2ba3d6fad3e1e51818486451447e) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-02-10bitbake/fetch2/git: use clonedir as ud.localfile too since the mirror ↵Richard Purdie
tarball may not exist (From Poky rev: 681bcf4e6b606dde2029d143805023a927285917) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-02-10bitbake/fetch2/git.py: Ensure that forcefetch operates in the correct ↵Richard Purdie
directory for calling _contains_ref() (From Poky rev: 330886826770ff6ec1449dc375cb4c3604b2736b) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-02-10bitbake/fetch2/git: Fix localpath to point at the clone repo since we no ↵Richard Purdie
longer always generate a mirror tarball and it isn't a good guide to fetcher success (From Poky rev: 917d3e9697acefe308e7139e86df37a072ee3500) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-02-10bitbake/fetch2: Use True instead of integer valuesRichard Purdie
(From Poky rev: 7202a77134029cb37540c785ce0161a4dd574853) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-02-10bitbake/fetch2: Rename Fetch class to FetchMethodRichard Purdie
(From Poky rev: ab0dd1397491478ee6149283e5ba8775dd8cdc3b) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-02-10bitbake/fetch2: Rewrite and improve exception handling, reusing core ↵Richard Purdie
functions for common operations where possible (From Poky rev: d08397ba4d1331993300eacbb2f78fcfef19c1cf) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-02-10bitbake/fetch2: Define a sane localpath function and remove code duplicationRichard Purdie
(From Poky rev: 5a52cb80d6d62c704692ad6cfa93426c4a17bc52) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-02-10bitbake/fetch2: Move ud.localfile setup into urldata_initRichard Purdie
(From Poky rev: 972eb5fababb33b5537fcfbbaf8e33ea820f0fee) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-02-10bitbake/fetch2/git: Switch to completely use bare clonesRichard Purdie
We no longer need index/workdir support in the mirror tree and it causes all kind of reference naming problems.Simplifying the code to remove this and use just bare clones addresses this problem. We increase the "version" number on the mirror tarballs to reflect the change and ensure older mirror tarballs are not used as they would break. (From Poky rev: e4c1e99f234491af1c0fc886e73deedaef108a1a) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-02-10fetch2/git.py: Fix problem when fetching with no originSaul Wold
When updating a git repo, its possible to not have an origin, so fail gracefully with a debug message. (From Poky rev: 192f631129e25b959d501c46c3156b7037b49c22) Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-02-10bitbake/fetch2/git: Ensure we prune origin to remove stale branchesRichard Purdie
Thanks to Bruce Ashfield for the tip. (From Poky rev: 96810cade04cad44d70a7c6e51aacdf89caef92b) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-02-10bitbake/fetch2/git: Ensure deleted branches upstream are removed, all branch ↵Richard Purdie
tags are forced to the upstream revisions and all revisions and tags are always fetched (From Poky rev: dfc5faf717ac1f917af398097d5295128548a55d) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-02-10bitbake/fetch2/git: Ensure target directory exists when copying filesRichard Purdie
(From Poky rev: adfa6c40dadebb18bfd457859300d8c093b007f7) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-02-10fetch2: Allow multiple src rev to be used in one src_uriYu Ke
* 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 (From Poky rev: 0e837e6844be449659bb96a1498e54a8b9442d13) Signed-off-by: Yu Ke <ke.yu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-02-10git.py: Remove the source tree tarball archivesYu Ke
Since we're now always providing the git source control files it becomes pointless to handle the tarballs of specific git revisions so drop this part of the fetcher. (From Poky rev: affcfe468a0c2993c0c4ace446248f85aee4315f) Signed-off-by: Yu Ke <ke.yu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-02-10bitbake/fetch2/git: Add nocheckout option to disable checkouts and always ↵Richard Purdie
add scm data to checkouts (From Poky rev: 05048e0f9168ceb7d66f6ac79dcae42f1e696826) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-02-10bb.fetch2: Add git unpackYu Ke
The git download method clones the git repository to the local machine. The unpack process can be optimised to be a local to local machine clone or a direct readtree operation to the destination using git.will clone git repo to local, so git unpack can be simplified to only checkouting the code to the work dir. For fullclone case, we also need to manually copy all the ref info, which is needed by the later do_kernel_checkout(). Rather than use hardlinks, we reference the repository using alternatives since the download directory may be on a different filesystem. [Change to use -s by Richard Purdie] (From Poky rev: 3a3fc6b071f09970e7f79fb4f1a8f0013917371e) Signed-off-by: Yu Ke <ke.yu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-02-10bitbake/fetch2: Instrument fetchers when making network accessYu Ke
(From Poky rev: 029f8584d547c0792ffbe2f83451dcdfe2a3db7f) Signed-off-by: Yu Ke <ke.yu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-02-10bb.fetch2: remove the obsolate Fetch.try_mirrors referrenceYu Ke
Fetch.try_mirrors is no longer exists, so the code is obsolate (From Poky rev: 733de7596c2ed78a846541b3290f01c21ff96606) Signed-off-by: Yu Ke <ke.yu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-02-10git.py: split download to download() and build_mirror_data()Yu Ke
the download is to fetch the source from URL, the build_mirror_data is to create the mirror tar ball. the original go() method mix them together, it is more clean to split them. (From Poky rev: ef918a72de97fd2189e1c8487e371d13e18088fd) Signed-off-by: Yu Ke <ke.yu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-02-10bb.fetch2: rename "go" with "download" to better reflect its functionalityYu Ke
no functional change (From Poky rev: e05918937c515dff845fcb4c9e94f8ecbea8c957) Signed-off-by: Yu Ke <ke.yu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-02-10Fetcher: break the "SRCREVINACTION" deadlockYu Ke
Current fetcher has annoying "SRCREVINACTION" deadlock, which occurs when SRCREV=${AUTOREV}=@bb.fetch.get_srcrev(): get_srcrev()->setup_localpath()->srcrev_internal_helper() ->evaluate SRCREV->get_srcrev() current fetcher resolve the deadlock by introducing a "SRCREVINACTION" condition check. Althoguh it works, it is indeed not clean. This patch use antoehr idea to break the deadlock: break the dependency among SRCREV and get_srcrev(), i.e. assign a specific keyword "AUTOINC" to AUTOREV. when Fetcher meet this keyword, it will check and set the latest revision to urldata.revision. get_srcrev later can use the urldata.revision for value evaluation(SRCPV etc). In this case, SRCREV no longer depends on get_srcrev, and there is not deadlock anymore. (From Poky rev: 1589a1172f9432aed1cc9ce006f68cddf3073774) Signed-off-by: Yu Ke <ke.yu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-02-10bb.fetch2.git.py: add git urldata_initYu Ke
move the git specific urldata init from localpath to urldata_init so that it can be called early (From Poky rev: 54e34f6e255d1717beada23638a5783c9dda42ea) Signed-off-by: Yu Ke <ke.yu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-01-10bb.fetch2: replace bb.fetch with bb.fetch2 in the bb.fetchYu Ke
bb.fetch2 is copied from bb.fetch, and has many bb.fetch referrence. Fix these referrence with bb.fetch2 referrence (From Poky rev: c64b445f38179a117d39319f762f9dc2435da0ea) Signed-off-by: Yu Ke <ke.yu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-01-10fetch2/git: Remove duplicated code only added for backwards compatibilityRichard Purdie
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-01-10bitbake: copy bb.fetch to bb.fetch2 as initial code base for fetcher overhaulYu Ke
Signed-off-by: Yu Ke <ke.yu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>