summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/fetch2
Commit message (Collapse)AuthorAgeFilesLines
* bitbake/fetch2: Define a sane localpath function and remove code duplicationRichard Purdie2011-02-0711-31/+2
| | | | Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake/fetch2: Move ud.localfile setup into urldata_initRichard Purdie2011-02-0712-21/+29
| | | | Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake/fetch2: Drop horrible SRCREV hack which is no longer neededRichard Purdie2011-02-071-3/+0
| | | | Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake/fetch2/git: Switch to completely use bare clonesRichard Purdie2011-02-061-9/+4
| | | | | | | | | | | 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. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* fetch2/git.py: Fix problem when fetching with no originSaul Wold2011-02-051-2/+6
| | | | | | | When updating a git repo, its possible to not have an origin, so fail gracefully with a debug message. Signed-off-by: Saul Wold <sgw@linux.intel.com>
* bitbake/fetch2/git: Ensure we prune origin to remove stale branchesRichard Purdie2011-02-051-0/+1
| | | | | | Thanks to Bruce Ashfield for the tip. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake/fetch2/git: Ensure deleted branches upstream are removed, all branch ↵Richard Purdie2011-02-031-7/+10
| | | | | | tags are forced to the upstream revisions and all revisions and tags are always fetched Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake/fetch2: Remove old local file acceleration codeRichard Purdie2011-02-031-18/+4
| | | | | | | | Since local mirror fetches are always symlinked from the download directory directly, there is no need for this premirrors hack which doesn't cover mirrors and also abuses the localpath variable with inconsistent results. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake/fetch2: Ensure that mirror fetches are symlinked from the download ↵Richard Purdie2011-02-031-3/+17
| | | | | | | | | | | | | directory When files are fetched from a mirror source that happens to be local, ensure links are created for the file since subsequent fetch calls can then follow the links to find files. Any other approach such as the existing manipulations of localpath internally to the fetcher are prone to errors, races and other issues. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake/fetch2: When encoding a file:// url, drop user and host informationRichard Purdie2011-02-031-2/+2
| | | | | | | | When processing a cvs SRC_URI to a file:// mirror, the user and host information will break the mirror processing. This patch addresses it by only constructing valid urls. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake/lib/bb/fetch2: Assign a default name in the names array as empty ↵Richard Purdie2011-02-031-1/+1
| | | | | | strings as names cause problems for python Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake/fetch2: Add missing parameter to localcount_internal_helperRichard Purdie2011-02-021-1/+1
| | | | Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake/fetch2/git: Ensure target directory exists when copying filesRichard Purdie2011-02-021-0/+1
| | | | Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* fetch2: Allow multiple src rev to be used in one src_uriYu Ke2011-02-025-64/+73
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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>
* git.py: Remove the source tree tarball archivesYu Ke2011-02-021-58/+5
| | | | | | | | 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. Signed-off-by: Yu Ke <ke.yu@intel.com>
* bitbake/fetch2/git: Add nocheckout option to disable checkouts and always ↵Richard Purdie2011-02-021-9/+12
| | | | | | add scm data to checkouts Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bb.fetch2: Add git unpackYu Ke2011-02-021-0/+25
| | | | | | | | | | | | | | 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] Signed-off-by: Yu Ke <ke.yu@intel.com>
* bitbake/fetch2: Ensure the local revision counter takes a default value of ↵Richard Purdie2011-02-011-1/+1
| | | | | | 0, not None Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake/fetch2: Instrument fetchers when making network accessYu Ke2011-01-259-1/+22
| | | | Signed-off-by: Yu Ke <ke.yu@intel.com>
* bb.fetch2: add "BB_NO_NETWORK" optionYu Ke2011-01-251-0/+10
| | | | | | | | | | Sometime user want a purely local fetching, i.e. using local mirror without any remote netowrk access. BB_NO_NETWORK option is introduced for this purpose check_network_access() is the guard for BB_NO_NETWOKR option. it should be put in any place that fetcher use network access Signed-off-by: Yu Ke <ke.yu@intel.com>
* bb.fetch2: remove the obsolate Fetch.try_mirrors referrenceYu Ke2011-01-251-7/+0
| | | | | | Fetch.try_mirrors is no longer exists, so the code is obsolate Signed-off-by: Yu Ke <ke.yu@intel.com>
* git.py: split download to download() and build_mirror_data()Yu Ke2011-01-252-3/+9
| | | | | | | | 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. Signed-off-by: Yu Ke <ke.yu@intel.com>
* bb.fetch2: rename "go" with "download" to better reflect its functionalityYu Ke2011-01-2513-19/+19
| | | | | | no functional change Signed-off-by: Yu Ke <ke.yu@intel.com>
* bb.fetch: add fetch version to distinguish bb.fetch and bb.fetch2Yu Ke2011-01-251-0/+2
| | | | | | | | there is case that we need to distingush bb.fetch and bb.fetch2, and use different API for bb.fetch and bb.fetch2. so it is necessary to add version info for distinguish purpose Signed-off-by: Yu Ke <ke.yu@intel.com>
* bb.fetch2: revise the Fetch.unpack APIYu Ke2011-01-251-18/+15
| | | | | | | | | | change the unpack to use the urldata and rootdir parameter - urldata is the FetchData instance - rootdir is the dir to put the extracted source. the original unpack use current dir (os.getcwd) as destination dir, which is not flexible and error-prone (error will occur if caller not chdir to dest dir) Signed-off-by: Yu Ke <ke.yu@intel.com>
* bb.fetch2: add unpack method in fetcherYu Ke2011-01-251-0/+84
| | | | | | copy exactly the base.bbclass:oe_unpack_file() to bb.fetch2 as the code base Signed-off-by: Yu Ke <ke.yu@intel.com>
* *: use utils.remove() some moreBernhard Reutner-Fischer2011-01-121-8/+3
| | | | | | | (Bitbake rev: d3489b141cac1197324661680fe38b8a88bc49b4) Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* Fetcher: only set __BB_DONT_CACHE when SRCREV = "${AUTOREV}"Yu Ke2011-01-101-3/+3
| | | | | | | | we should cache SRCREV whenever possible, the only exception is when SREREV is auto rev. so change the logic to only set __BB_DONT_CACHE at SRCREV = "${AUTOREV}" case Signed-off-by: Yu Ke <ke.yu@intel.com>
* Fetcher: break the "SRCREVINACTION" deadlockYu Ke2011-01-105-53/+15
| | | | | | | | | | | | | | | | | | | | | 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. Signed-off-by: Yu Ke <ke.yu@intel.com>
* bb.fetch2.bzr: add bzr urldata_initYu Ke2011-01-101-2/+5
| | | | | | | move the bzr specific urldata init from localpath to urldata_init so that it can be called early Signed-off-by: Yu Ke <ke.yu@intel.com>
* bb.fetch2.hg: add hg urldata_initYu Ke2011-01-101-5/+9
| | | | | | | move the hg specific urldata init from localpath to urldata_init so that it can be called early Signed-off-by: Yu Ke <ke.yu@intel.com>
* bb.fetch2.svn.py: add urldata_initYu Ke2011-01-101-1/+5
| | | | | | | move the svn specific urldata init from localpath to urldata_init so that it can be called early Signed-off-by: Yu Ke <ke.yu@intel.com>
* bb.fetch2.git.py: add git urldata_initYu Ke2011-01-101-4/+9
| | | | | | | move the git specific urldata init from localpath to urldata_init so that it can be called early Signed-off-by: Yu Ke <ke.yu@intel.com>
* bb.fetch2: add urldata_init call for Fetch classYu Ke2011-01-101-0/+2
| | | | | | | | | | | FetchData has some fetch method specific data, and only fetch method knows how to initialize it. originally it is mostly initialized in Fetch.localpath(). But now there is requirement to call Fetch.latest_revision() before Fetch.localpath(), thus require another earlier place for initialization. so urldata_init is introduced for this purpose. it will be called in FetchData:__init__ and make all the Fetch functions useable after that. Signed-off-by: Yu Ke <ke.yu@intel.com>
* bb.fetch2: replace bb.fetch with bb.fetch2 in the bb.fetchYu Ke2011-01-1013-44/+44
| | | | | | | | bb.fetch2 is copied from bb.fetch, and has many bb.fetch referrence. Fix these referrence with bb.fetch2 referrence Signed-off-by: Yu Ke <ke.yu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: copy bb.fetch to bb.fetch2 as initial code base for fetcher overhaulYu Ke2011-01-1013-0/+2636
Signed-off-by: Yu Ke <ke.yu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>