summaryrefslogtreecommitdiffstats
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: Fix negated if check for BB_FETCH_PREMIRRORONLYRichard Purdie
(From Poky rev: 29ed2c6e9a0c3cc57c5bbaf3c53e1cff8586c51c) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-02-10fetch2: Add SRPM knowledgeMark Hatle
Enable the fetcher to be able to unpack and SRPM. By default the system will unpack the contents of the SRPM into the WORKDIR. A new syntax "unpack=file" was developed for the SRC_URI, to allow for a recipe to extract a specific file within an SRPM. An unpack operation will then be executed on the extracted file. In order to apply extracted patches (or unpack files not specified with unpack), you must specify the path using WORKDIR, i.e.: file://${WORKDIR}/mypatch.patch (From Poky rev: 906285ff00d6ffd3fd7713af52250e7c6503edb7) Signed-off-by: Mark Hatle <mark.hatle@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-02-10bitbake/fetch2: Ignore UnboundLocalError in exception handler in try_mirrorRichard Purdie
(From Poky rev: aa45760702e874977454778659c205b29d1ff049) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-02-10bitbake/fetch2: Move symlink handling into try_mirror where is belongs ↵Richard Purdie
instead of the main download function (From Poky rev: ee1a9c0476cc4b2ce9dfb0faa29a1371a8517c40) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-02-10bitbake/fetch2: When using BB_FETCH_PREMIRRORONLY, set BB_NO_NETWORK after ↵Richard Purdie
premirrors as there could be data processing needed by the real fetcher (From Poky rev: c4e66a7fe0c314b843aac6340995c584ec156529) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-02-10bitbake/fetch2: Ensure we only remove files, not directories when fetch ↵Richard Purdie
failures occur (From Poky rev: 91eeb9b0d334275ff2730e55e86fd351e1b652ef) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-02-10bitbake/fetch2: Ensure original ud is preserved in try_mirrorRichard Purdie
(From Poky rev: 0713fb6b99486cd08c6036dba7aeb15e3bfb8129) 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-10fetch2: add try/finally to ensure lockfile is unlocked on failureSaul Wold
(From Poky rev: 1544aa8ab4a80d529a001e27b473645f2caec87c) Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-02-10fetch2: add runfetchcmd to import for fetchersSaul Wold
(From Poky rev: 232b6f3c92928c333ad1201aa8eb3706e7251cdf) Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-02-10bitbake/fetch2:Fetch Make using the fn based cache optionalRichard Purdie
(From Poky rev: 500c66337c7cb5e3044a02ef761097713e47f523) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-02-10bitbake/fetch2: Fix pickling issues with fetcher exceptionsRichard Purdie
See the problems in http://bugs.python.org/issue1692335, need to set self.args correctly. (From Poky rev: d4b4b48addfa781d7b94965e0477974c3fb6dbb3) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-02-10bitbake/fetch2: Update mirror processing to ensure we look for mirror tarballsRichard Purdie
(From Poky rev: 94faffdaf6c13ce59987aab28383d66a9a0bf100) 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: Match Fetcher log domain to that in bb.msgRichard Purdie
(From Poky rev: ded83ffc3bd86553c9b540795660985905c925ba) 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: Drop name/override ordering backwards compatibility codeRichard Purdie
(From Poky rev: 8f2abf4a9f000d42e98c4936e393bd5033a1af48) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-02-10bitbake/fetch2/svn: The concept of using dates with svn is totally insane, ↵Richard Purdie
drop support (From Poky rev: ee6f34483a9bfeca5b5c3656fd62bb4849d5fbb8) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-02-10bitbake/fetch2: Define a new interface to the fetcher code though the ↵Richard Purdie
'Fetch' class (From Poky rev: ca7adf75295c2a6041b891bfa61e0b4bc2f7c860) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-02-10bitbake/fetch2: Fix typoRichard Purdie
(From Poky rev: 08a9fef4fa0036708f29bd150d7ecf66354e5475) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-02-10bitbake/fetch2: Drop legacy CVSDATE supportRichard Purdie
(From Poky rev: 806d1c25f8ca8ab5116652e6f82f7d9ee5774278) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-02-10bitbake/fetch2: Move getSRCDate to FetchData class where is more appropriateRichard Purdie
(From Poky rev: f60d9d6bd4bb7691b62bf1f4b1fbeaa1faa53879) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-02-10bitbake/fetch2: Make srcrev_internal_helper a normal function, doesn't ↵Richard Purdie
belong in the FetchMethod class (From Poky rev: 831c6c1d3c23c50f9c55a6bbf8dc6311bca3881b) 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: Drop old md5 handling codeRichard Purdie
Drop some old md5 functions since we have improved functionality now which includes sha256 checksum support. This stops each download being md5 checksumed twice. Also change ".md5" stamp extentions to ".done" to better describe its use as a download complete marker file and no longer write the md5 sum to the files. (From Poky rev: 74b71864fed79ce60e721945c8e239b3ebf49200) 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: Have all fetcher exceptions derived from a common ↵Richard Purdie
BBFetchException class (From Poky rev: f6eefb3ca3bb2a5ea0ec1364bdb0bc41ae58c815) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-02-10bitbake/fetch2: Drop unused parameter for localpath() and update commentsRichard Purdie
(From Poky rev: 8daab5b95157dda6854fe6bf1929f911fe3cf25e) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-02-10bitbake/fetch2: Simplfy setup_srcrevsRichard Purdie
(From Poky rev: 7e4fbfc1c1887a1a0507b60244aa53b8b1994edd) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-02-10bitbake/fetch2: Simplify localpath variable handling FetchData initRichard Purdie
(From Poky rev: 49a022d25d35115e7286e2ca2530566da2d71aa8) 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: Drop horrible SRCREV hack which is no longer neededRichard Purdie
(From Poky rev: 0e5404cedadaea6738ef6468d7eb8a24d23d9bab) 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: Remove old local file acceleration codeRichard Purdie
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. (From Poky rev: 282a828f3dc373d8f1397827ebbe1be1c54f2d2a) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-02-10bitbake/fetch2: Ensure that mirror fetches are symlinked from the download ↵Richard Purdie
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. (From Poky rev: fa9fda05e1d269446b51050195b891346482e8bb) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-02-10bitbake/fetch2: When encoding a file:// url, drop user and host informationRichard Purdie
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. (From Poky rev: 7f99605562119a13a2510a3c990e3cf577ad764e) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-02-10bitbake/lib/bb/fetch2: Assign a default name in the names array as empty ↵Richard Purdie
strings as names cause problems for python (From Poky rev: a55d86b4051f6d063f9a67db026f7da6f9b50cc6) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-02-10bitbake/fetch2: Add missing parameter to localcount_internal_helperRichard Purdie
(From Poky rev: 08cd6c1cb9639e958e0c60a02e317a22cf43f880) 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>