aboutsummaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/fetch2/__init__.py
AgeCommit message (Collapse)Author
2011-02-11bitbake/fetch2: Fix patch merge errorRichard Purdie
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-02-11bitbake/fetch2: Add some debug output so its clear when PREMIRRORS, upstream ↵Richard Purdie
and MIRRORS are being used Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-02-11bitbake/fetch2: Ensure network access status is reset for each loop ↵Richard Purdie
iteration in download() Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-02-11bitbake/fetch2: Ensure failed fetch attempts are logged in the debug logsRichard Purdie
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-02-11bitbake/fetch2: Correctly handle git mirror tarball fetchingRichard Purdie
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-02-11bitbake/fetch2: Pass over malformatted (empty) mirror url linesRichard Purdie
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
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 Signed-off-by: Saul Wold <sgw@linux.intel.com>
2011-02-09bitbake/fetch2: Fix negated if check for BB_FETCH_PREMIRRORONLYRichard Purdie
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-02-08fetch2: 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 Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
2011-02-08bitbake/fetch2: Ignore UnboundLocalError in exception handler in try_mirrorRichard Purdie
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-02-08bitbake/fetch2: Move symlink handling into try_mirror where is belongs ↵Richard Purdie
instead of the main download function Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-02-08bitbake/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 Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-02-08bitbake/fetch2: Ensure we only remove files, not directories when fetch ↵Richard Purdie
failures occur Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-02-08bitbake/fetch2: Ensure original ud is preserved in try_mirrorRichard Purdie
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-02-07fetch2: add try/finally to ensure lockfile is unlocked on failureSaul Wold
Signed-off-by: Saul Wold <sgw@linux.intel.com>
2011-02-07bitbake/fetch2:Fetch Make using the fn based cache optionalRichard Purdie
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-02-07bitbake/fetch2: Fix pickling issues with fetcher exceptionsRichard Purdie
See the problems in http://bugs.python.org/issue1692335, need to set self.args correctly. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-02-07bitbake/fetch2: Update mirror processing to ensure we look for mirror tarballsRichard Purdie
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-02-07bitbake/fetch2: Update forcefetch and mirror handling to clean up, simplfy ↵Richard Purdie
and bug fix the code Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-02-07bitbake/fetch2: Match Fetcher log domain to that in bb.msgRichard Purdie
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-02-07bitbake/fetch2: Use True instead of integer valuesRichard Purdie
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-02-07bitbake/fetch2: Drop name/override ordering backwards compatibility codeRichard Purdie
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-02-07bitbake/fetch2: Define a new interface to the fetcher code though the ↵Richard Purdie
'Fetch' class Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-02-07bitbake/fetch2: Fix typoRichard Purdie
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-02-07bitbake/fetch2: Drop legacy CVSDATE supportRichard Purdie
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-02-07bitbake/fetch2: Move getSRCDate to FetchData class where is more appropriateRichard Purdie
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-02-07bitbake/fetch2: Make srcrev_internal_helper a normal function, doesn't ↵Richard Purdie
belong in the FetchMethod class Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-02-07bitbake/fetch2: Rename Fetch class to FetchMethodRichard Purdie
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-02-07bitbake/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. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-02-07bitbake/fetch2: Rewrite and improve exception handling, reusing core ↵Richard Purdie
functions for common operations where possible Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-02-07bitbake/fetch2: Have all fetcher exceptions derived from a common ↵Richard Purdie
BBFetchException class Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-02-07bitbake/fetch2: Drop unused parameter for localpath() and update commentsRichard Purdie
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-02-07bitbake/fetch2: Simplfy setup_srcrevsRichard Purdie
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-02-07bitbake/fetch2: Simplify localpath variable handling FetchData initRichard Purdie
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-02-07bitbake/fetch2: Define a sane localpath function and remove code duplicationRichard Purdie
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-02-07bitbake/fetch2: Drop horrible SRCREV hack which is no longer neededRichard Purdie
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-02-03bitbake/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. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-02-03bitbake/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. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-02-03bitbake/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. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-02-03bitbake/lib/bb/fetch2: Assign a default name in the names array as empty ↵Richard Purdie
strings as names cause problems for python Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-02-02bitbake/fetch2: Add missing parameter to localcount_internal_helperRichard Purdie
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-02-02fetch2: 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 Signed-off-by: Yu Ke <ke.yu@intel.com>
2011-02-01bitbake/fetch2: Ensure the local revision counter takes a default value of ↵Richard Purdie
0, not None Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-01-25bb.fetch2: add "BB_NO_NETWORK" optionYu Ke
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>
2011-01-25git.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. Signed-off-by: Yu Ke <ke.yu@intel.com>
2011-01-25bb.fetch2: rename "go" with "download" to better reflect its functionalityYu Ke
no functional change Signed-off-by: Yu Ke <ke.yu@intel.com>
2011-01-25bb.fetch: add fetch version to distinguish bb.fetch and bb.fetch2Yu Ke
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>
2011-01-25bb.fetch2: revise the Fetch.unpack APIYu Ke
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>
2011-01-25bb.fetch2: add unpack method in fetcherYu Ke
copy exactly the base.bbclass:oe_unpack_file() to bb.fetch2 as the code base Signed-off-by: Yu Ke <ke.yu@intel.com>
2011-01-12*: use utils.remove() some moreBernhard Reutner-Fischer
(Bitbake rev: d3489b141cac1197324661680fe38b8a88bc49b4) Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>