summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/fetch2/gitsm.py
Commit message (Collapse)AuthorAgeFilesLines
* bitbake: fetch/gitsm: add support for shallow mirror tarballsChristopher Larson2017-06-021-6/+11
| | | | | | | | | | | | | When we're building from a shallow mirror tarball, we don't want to do anything with ud.clonedir, as it's not being used when we unpack. As such, disable updating the submodules in that case. Also include the repositories in .git/modules in the shallow tarball. It does not actually make the submodule repositories shallow at this time. (Bitbake rev: 6c0613f1f2f9d4f009545f82a9173e80396f9d34) Signed-off-by: Christopher Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: fetch2: don't use deprecated bb.data APIsAndre McCurdy2017-03-011-1/+0
| | | | | | | | | Cleanup some more usage of bb.data APIs in the fetchers. (Bitbake rev: 9752fd1c10b8fcc819822fa6eabc2c1050fcc03b) Signed-off-by: Andre McCurdy <armccurdy@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: gitsm.py: Add force flag to git checkout command in update_submodulesOla Redell2017-01-171-1/+1
| | | | | | | | | | | | When the gitsm fetcher is used with a repo that includes a .gitattributes file that makes git modify files on cloning (e.g. line break characters), the subsequent checkout performed in the update_submodules function fails. This is fixed by adding the force flag (-f) to the checkout command. (Bitbake rev: c05e1396625b14e66d795408ea2ae4cd2afc3209) Signed-off-by: Ola Redell <ola.redell@retotech.se> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: fetch2: preserve current working directoryMatt Madison2016-08-201-13/+10
| | | | | | | | | | | Fix the methods in all fetchers so they don't change the current working directory of the calling process, which could lead to "changed cwd" warnings from bitbake. (Bitbake rev: 6aa78bf3bd1f75728209e2d01faef31cb8887333) Signed-off-by: Matt Madison <matt@madison.systems> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: bitbake: fetch2/gitsm: Fix fetch when the repository contains ↵Derek Straka2016-03-261-5/+2
| | | | | | | | | | | nested submodules This fixes a problem when the repository contains multiple levels of submodules via a resursive submodule init. (Bitbake rev: dbafbe229360ffe5908b106a9c10e274712b9b17) Signed-off-by: Derek Straka <derek@asterius.io> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: fetch2/gitsm: Fix when repository change submodulesFelipe F. Tonello2016-02-041-1/+1
| | | | | | | | | | | | | | This fix a problem when checking out a commit that changes the submodules previously checkout. Example: Recipe uses branch A and then it updates to use branch B, but branch B has different submodules dependencies then what branch A previously had. (Bitbake rev: 54a3864246f2be0b62761f639a1d5c9407aded4f) Signed-off-by: Felipe F. Tonello <eu@felipetonello.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: fetch2: Checkout to correct ref begore init and update submodulesFelipe F. Tonello2015-07-071-0/+1
| | | | | | | | | | | | This is nessary when specified branch with submodules is different then default (master) branch. [YOCTO #7771] (Bitbake rev: f7b0b5e33e00f3ce0744322eee93835ee76bf184) Signed-off-by: Felipe F. Tonello <eu@felipetonello.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: fetch2/gitsm: Documentation improvements for gitsm:// fetcherChris Morgan2014-05-191-0/+10
| | | | | | (Bitbake rev: ef2bf63e56b87e19d1a9059dd2d81a9a1a537254) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: fetch2: fix fetching git submodules with git 1.7.9.x or olderPaul Eggleton2014-02-281-0/+48
| | | | | | | | | | | | | | | | | | | Git versions older than 1.7.10 put absolute paths in configuration files for the submodule repositories, leading to errors when the repository checkout is moved. We move the repository as a matter of course in the gitsm fetcher; the failure occurs in do_unpack). Change the absolute paths to be relative during processing to fix this. (At the time of writing, Ubuntu 12.04.4 LTS ships Git version 1.7.9.5, hence the desire to fix this rather than just mandating a newer Git version.) Fixes [YOCTO #5525]. (Bitbake rev: e700d5a41deed4ee837465af526ed30c8a579933) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: fetch2/gitsm: Use ud.basecmd instead of hardcoding gitRichard Purdie2014-01-181-5/+5
| | | | | | | | | | This allows FETCHCMD_git to override the fetcher command as the git fetcher does. [YOCTO #5717] (Bitbake rev: 23ab943be3a33077d6ad8be68bba53cd1e2270b4) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: fetch2: Stop passing around the pointless url parameterRichard Purdie2013-11-221-5/+5
| | | | | | | | | | | | | | | There is no good reason to keep passing around the url parameter when its contained within urldata (ud). This is left around due to legacy reasons, some functions take it, some don't and its time to cleanup. This is fetcher internal API, there are a tiny number of external users of the internal API (buildhistory and distrodata) which can be fixed up after this change. (Bitbake rev: 6a48474de9505a3700863f31839a7c53c5e18a8d) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: bitbake/fetch: Add git submodules fetcherRichard Purdie2013-03-251-0/+78
This adds very basic git submodule support to the fetcher. It can be used by replacing a git:// url prefix with a gitsm:// prefix, otherwise behaviour is the same as the git fetcher. Whilst this code should be functional, its not as efficient as the usual git fetcher due to the need to checkout the tree to fetch/update the submodule information. git doesn't support submodule operations on the bare clones the standard git fetcher uses which is also problematic. This code does however give a starting point to people wanting to use submodules. (Bitbake rev: 25e0b0bc50114f1fbf955de23cc0c96f5f7a41e3) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>