summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/fetch2/__init__.py
Commit message (Collapse)AuthorAgeFilesLines
* fetch, fetch2: Get rid of DeprecationWarning noticeKhem Raj2011-03-031-2/+2
| | | | | | | | | | | | | * This patch fixes a cosmetic issue currently we get with master WARNING: /home/kraj/work/bitbake/lib/bb/fetch2/__init__.py:733: DeprecationWarning: Call to deprecated function bb.mkdirhier: Please use bb.utils.mkdirhier instead. bb.mkdirhier("%s/%s" % (rootdir, destdir)) (Bitbake rev: 36fe59ce314c295d239b76de34c8714def2c32d5) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Chris Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake/fetch2: Ensure SRCREV_pn-PN is checked for a revision when the ↵Richard Purdie2011-02-231-1/+3
| | | | | | SRC_URI is unnamed Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake/fecth2: Ensure BB_FETCH_PREMIRRORONLY being set as false is handled ↵Richard Purdie2011-02-161-1/+2
| | | | | | correctly Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake/fetch2: Revert part of the unpack change until the issues with it ↵Richard Purdie2011-02-131-2/+2
| | | | | | are resolved Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* fetch2: unpack revisionMark Hatle2011-02-121-39/+53
| | | | | | | | | | | | Revise the unpack function to have a way to disable the unpack. This is based on the work from "Andreas Oberritter <obi@opendreambox.org>", see http://cgit.openembedded.net/cgit.cgi/openembedded/commit/?id=2bdfe8519eda8067845019a699acdf19a21ba380 In addition, the to_boolean function comes from the work of "Chris Larson <chris_larson@mentor.com>", see http://cgit.openembedded.net/cgit.cgi/openembedded/commit/?id=900cc29b603691eb3a077cb660545ead3715ed54 Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
* bitbake/fetch2: Add explict network access exception and handling to give ↵Richard Purdie2011-02-111-2/+18
| | | | | | users usable error messages Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake/fetch2: Fix message about md5 checksums when sha256 is incorrectRichard Purdie2011-02-111-1/+9
| | | | Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake/fetch2: Fix patch merge errorRichard Purdie2011-02-111-1/+1
| | | | Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake/fetch2: Add some debug output so its clear when PREMIRRORS, upstream ↵Richard Purdie2011-02-111-0/+3
| | | | | | and MIRRORS are being used Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake/fetch2: Ensure network access status is reset for each loop ↵Richard Purdie2011-02-111-0/+4
| | | | | | iteration in download() Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake/fetch2: Ensure failed fetch attempts are logged in the debug logsRichard Purdie2011-02-111-2/+4
| | | | Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake/fetch2: Correctly handle git mirror tarball fetchingRichard Purdie2011-02-111-4/+5
| | | | Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake/fetch2: Pass over malformatted (empty) mirror url linesRichard Purdie2011-02-111-1/+5
| | | | Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* fetch2: Correct the clean() mechanism for the fetcher2 codeSaul Wold2011-02-101-0/+34
| | | | | | | This create a clean() method in each of the fetcher modules and correctly cleans the .done stamp file and lock files Signed-off-by: Saul Wold <sgw@linux.intel.com>
* bitbake/fetch2: Fix negated if check for BB_FETCH_PREMIRRORONLYRichard Purdie2011-02-091-1/+1
| | | | Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* fetch2: Add SRPM knowledgeMark Hatle2011-02-081-24/+38
| | | | | | | | | | | | | | | | 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 Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
* bitbake/fetch2: Ignore UnboundLocalError in exception handler in try_mirrorRichard Purdie2011-02-081-2/+5
| | | | Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake/fetch2: Move symlink handling into try_mirror where is belongs ↵Richard Purdie2011-02-081-12/+21
| | | | | | instead of the main download function Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake/fetch2: When using BB_FETCH_PREMIRRORONLY, set BB_NO_NETWORK after ↵Richard Purdie2011-02-081-13/+15
| | | | | | premirrors as there could be data processing needed by the real fetcher Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake/fetch2: Ensure we only remove files, not directories when fetch ↵Richard Purdie2011-02-081-3/+5
| | | | | | failures occur Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake/fetch2: Ensure original ud is preserved in try_mirrorRichard Purdie2011-02-081-4/+4
| | | | Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* fetch2: add try/finally to ensure lockfile is unlocked on failureSaul Wold2011-02-071-42/+44
| | | | Signed-off-by: Saul Wold <sgw@linux.intel.com>
* bitbake/fetch2:Fetch Make using the fn based cache optionalRichard Purdie2011-02-071-3/+4
| | | | Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake/fetch2: Fix pickling issues with fetcher exceptionsRichard Purdie2011-02-071-14/+21
| | | | | | | See the problems in http://bugs.python.org/issue1692335, need to set self.args correctly. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake/fetch2: Update mirror processing to ensure we look for mirror tarballsRichard Purdie2011-02-071-16/+21
| | | | Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake/fetch2: Update forcefetch and mirror handling to clean up, simplfy ↵Richard Purdie2011-02-071-72/+47
| | | | | | and bug fix the code Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake/fetch2: Match Fetcher log domain to that in bb.msgRichard Purdie2011-02-071-1/+1
| | | | Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake/fetch2: Use True instead of integer valuesRichard Purdie2011-02-071-15/+15
| | | | Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake/fetch2: Drop name/override ordering backwards compatibility codeRichard Purdie2011-02-071-2/+0
| | | | Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake/fetch2: Define a new interface to the fetcher code though the ↵Richard Purdie2011-02-071-144/+169
| | | | | | 'Fetch' class Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake/fetch2: Fix typoRichard Purdie2011-02-071-1/+1
| | | | Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake/fetch2: Drop legacy CVSDATE supportRichard Purdie2011-02-071-3/+3
| | | | Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake/fetch2: Move getSRCDate to FetchData class where is more appropriateRichard Purdie2011-02-071-18/+16
| | | | Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake/fetch2: Make srcrev_internal_helper a normal function, doesn't ↵Richard Purdie2011-02-071-34/+31
| | | | | | belong in the FetchMethod class Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake/fetch2: Rename Fetch class to FetchMethodRichard Purdie2011-02-071-4/+4
| | | | Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake/fetch2: Drop old md5 handling codeRichard Purdie2011-02-071-30/+8
| | | | | | | | | | 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. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake/fetch2: Rewrite and improve exception handling, reusing core ↵Richard Purdie2011-02-071-38/+78
| | | | | | functions for common operations where possible Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake/fetch2: Have all fetcher exceptions derived from a common ↵Richard Purdie2011-02-071-7/+10
| | | | | | BBFetchException class Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake/fetch2: Drop unused parameter for localpath() and update commentsRichard Purdie2011-02-071-3/+2
| | | | Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake/fetch2: Simplfy setup_srcrevsRichard Purdie2011-02-071-13/+7
| | | | Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake/fetch2: Simplify localpath variable handling FetchData initRichard Purdie2011-02-071-34/+40
| | | | Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake/fetch2: Define a sane localpath function and remove code duplicationRichard Purdie2011-02-071-1/+2
| | | | 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: 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>
* fetch2: Allow multiple src rev to be used in one src_uriYu Ke2011-02-021-23/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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>
* 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>