summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/fetch2
Commit message (Collapse)AuthorAgeFilesLines
* bitbake: fetch2: fix unpack of .xz filesAndré Draszik2013-07-311-1/+1
| | | | | | | | | | | | | | | | | | If a file ends with .xz, it currently gets overwritten during unpack: The decompress command for .xz files is: 'xz -dc %s > %s' % (file, efile) and as efile == file, we end up overwriting file (the source). Fix this by adding .xz to the list of suffixes that that need to be removed from a file name for an extract command, leaving the bare file name. Now, for a given file foo.xz, file == foo.xz and efile == foo, similar to how .gz .bz2 and .Z files are treated. (Bitbake rev: 2cd2d0a48e12ab4358fb967eaf7a56c17993f48d) Signed-off-by: André Draszik <andre.draszik@linaro.org> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: Correct a typoPeter Kjellerstedt2013-06-201-1/+1
| | | | | | (Bitbake rev: 087ec3a1b2dde04a8e5ce2943802fccd424ab3f3) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: Allow checksums to be used for files retrieved using SFTPPeter Kjellerstedt2013-06-201-2/+2
| | | | | | (Bitbake rev: fd438a334d1f90ff07dded61c9648987da42c34f) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: fetch2: Enhance error message for BB_NO_NETWORKRichard Purdie2013-06-201-1/+1
| | | | | | | | | | | | BB_NO_NETWORK can be set by bitbake internally by the use of BB_FETCH_PREMIRRORONLY so update the error message to give users a hint about this. [YOCTO #3222] (Bitbake rev: cac3060d0bf8c7deeacda18d06d92787911380d0) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: fetch2: Fix AUTOINC handlingRichard Purdie2013-06-141-3/+3
| | | | | | | | | | | | | AUTOINC was meant to appear once at the start of the version string. The list of names may not be sorted meaning it could get inserted in the middle. This patch simplifies the code and ensures it appears at the start. Include cache version bump to ensure the cache picks up these changes. (Bitbake rev: ad8bf10d873abb94d987860a3f6d06b134fb8a99) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: fetch2: Fix missing function callRichard Purdie2013-05-301-14/+15
| | | | | | | | | | | | | | | | | | | | Fix the issue: File: '/srv/home/pokybuild/yocto-autobuilder-new/yocto-slave/build-appliance/build/bitbake/lib/bb/fetch2/__init__.py', lineno: 813, function: try_mirror_url 0809: except bb.fetch2.BBFetchException as e: 0810: if isinstance(e, ChecksumError): 0811: logger.warn("Mirror checksum failure for url %s (original url: %s)\nCleaning and trying again." % (newuri, origud.url)) 0812: logger.warn(str(e)) *** 0813: self.rename_bad_checksum(ud, e.checksum) 0814: elif isinstance(e, NoChecksumError): 0815: raise 0816: else: 0817: logger.debug(1, "Mirror fetch failure for url %s (original url: %s)" % (newuri, origud.url)) Exception: NameError: global name 'self' is not defined (Bitbake rev: 5f960017bb1d4274a5bd5b598971f38c12fc0f11) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: fetch2: Fix missing assignmentRichard Purdie2013-05-241-1/+1
| | | | | | | | The assignment to True was missing from the code, well spotted Saul! (Bitbake rev: e493fe8cb4953935f01361ffc0240e5818ebb283) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: fetch2: Shorten long srcrevsRichard Purdie2013-05-221-0/+4
| | | | | | | | | | | | | | | | | | | | | The long srcrevs are mainly used or the workdir construction as well as the package version. The long entries are hashes generated by the git fetcher and other scms using a similar revision mechanism. We need these to change when the package changes however collisions are unlikely to happen within the domains we care about. The long revisions have generated negative user feedback due to the use in path and file names. This patch therefore truncates the revisions to 10 characters maximum. This should be safe in the contexts where these revisions are used as the chances of spatially close collisions is very low (distant collisions are not a major issue in the way we use these). (Bitbake rev: 43a8319cda7fae37862dae323eeb24cb39ca21b7) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: fetch2/git: Clean up sortable_revisionRichard Purdie2013-05-223-21/+14
| | | | | | | | | | | Now we no longer try and provide increasing values from the fetcher, we can simplify the function structure for the sortable_revision pieces and move the AUTOINC handling directly into the function which needs it, simplifying the code. (Bitbake rev: fb068bee47bb1a06f02447daf16c2b2a79c03288) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: fetch2/utils: Clean up importsRichard Purdie2013-05-171-7/+4
| | | | | | | | | Move various random imports to the start of the modules as cleanup and avoid an import issue with bb.process on python 2.6. (Bitbake rev: aed4adfbe3a591ca4f8e41fb763c9f961bf2e6d5) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: git: remove symling before updating mirror tarballMartin Jansa2013-05-091-0/+4
| | | | | | | | | | | | | | | | | | * with read-only PREMIRROR (e.g. mounted over NFS or CIFS and referenced as file:///mnt/premirror) we cannot use BB_GENERATE_MIRROR_TARBALLS because all git2_abc.git.tar.gz files later became just symlinks to read-only location in PREMIRROR (it works fine on first build and for new components, because at that time there isn't tarball on PREMIRROR yet). ERROR: Fetcher failure: Fetch command failed with exit code 141, output: tar (child): /build/downloads/git2_abc.git.tar.gz: Cannot open: Read-only file system tar (child): Error is not recoverable: exiting now (Bitbake rev: 3627b02f77c78beedadadd77c619b9e5edaae076) Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: fetch2/svn: Do not save authenticationVanveerdeghem, Simon2013-05-031-0/+2
| | | | | | | (Bitbake rev: a9b1e7c2ad13ff47acb629bae082d4f96e174f99) Signed-off-by: Simon Vanveerdeghem <simon.vanveerdeghem@barco.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: fetch2: rename file with bad checksum instead of removing it completelyMartin Jansa2013-04-151-1/+18
| | | | | | | | | | * this can be useful when someone wan't to compare old file with bad checksum and new one (Bitbake rev: 33c6b93597dd43ab03ce7b62ba3eeb1893a68c38) Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: bitbake/fetch: Add git submodules fetcherRichard Purdie2013-03-253-1/+81
| | | | | | | | | | | | | | | | | 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>
* bitbake: perforce.py: fix the perforce fetcherRobert Yang2013-02-251-1/+1
| | | | | | | | | | | | | | | | | | | The bb.process.run() will return one tuple, e.g: p4file = ('strA\nStrB\nstrC\n'), then there will be an iteration on p4file: for i in p4file: [snip] The i will be 's t r A ...', this is incorrect. use splitlines() to fix the problem. [YOCTO #3619] (Bitbake rev: b7440fb36b419996046f607e66434ce34722272b) Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: Revert "fetch2: Adapt encode/decode url to use URI class"1.4_M4.rc11.4_M4.final1.4_M4Richard Purdie2013-02-191-17/+49
| | | | | | | | This reverts commit 21fe2683aefde10e847e66c11c26d4f4c1e07cfd since bitbake-selftest doesn't pass when this is applied and we're seeing multiple build failures from this change. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: bitbake/fetch2: workaround urlparse in older python not support gitMatthew McClintock2013-02-191-0/+3
| | | | | | | (Bitbake rev: 7e479dc6a574a8f3bd9f24d2ed1c3ceef91f3828) Signed-off-by: Matthew McClintock <msm@freescale.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: wget: Improve mkdir handlingRichard Purdie2013-02-191-2/+3
| | | | | | | | | If there there isn't a subdirectory to the downloadfilename, this was failing. This patch avoids that issue. (Bitbake rev: 58bfd8d88495d4cae808e23b7af40e65ad05450f) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: fetch2: Add SFTP fetcherOlof Johansson2013-02-172-0/+131
| | | | | | | | | | | This fetcher differs from the SSH fetcher in that it adheres more strictly to the SECSH URI internet draft --- it uses the sftp:// instead of the ssh:// scheme, and it uses sftp instead of scp. (Bitbake rev: d240baeb7a4107d2eba3f08c411c0f086674d8e2) Signed-off-by: Olof Johansson <olof.johansson@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: fetch2: Adapt encode/decode url to use URI classOlof Johansson2013-02-171-49/+17
| | | | | | | (Bitbake rev: 21fe2683aefde10e847e66c11c26d4f4c1e07cfd) Signed-off-by: Olof Johansson <olof.johansson@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: fetch2: Add a class representing a generic URIOlof Johansson2013-02-171-0/+194
| | | | | | | | | | | | | | A class representing a generic URI, with methods for accessing the URI components, and stringifies to the URI. This class should be a bit more flexible than the existing {encode,decode}_url functions in that it supports more components (e.g. port) and that it does not rely on a specific order on the return values. This makes it easy to add new properties without affecting the API. (Bitbake rev: bd824da8a7eafe27310e410807319628378caeca) Signed-off-by: Olof Johansson <olof.johansson@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: fetch2: Remove unused code in wget fetcherOlof Johansson2013-02-171-5/+0
| | | | | | | (Bitbake rev: 6d88fcee16ced3a8c1ab1daf8e88d36f70f13346) Signed-off-by: Olof Johansson <olof.johansson@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: fetch2: Ensure directory for stampfile exists before trying to ↵Richard Purdie2013-02-151-0/+1
| | | | | | | | create it (Bitbake rev: cf510e3da36e53f98ca86501747364bf4699ecc1) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: fetch2: Improve lock/done stamp file paths for local filesRichard Purdie2013-02-151-2/+9
| | | | | | | | | | | Currently stamps end up at the top level of DL_DIR even if the files themselves are in a directory structure. This patch preserves path components allowing the top level directory to be less populated which is an advantage for large sstate caches. (Bitbake rev: 59921ce3ed7a4c0b7f8ef1a101ad9127469bf1fd) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: fetch2: Ensure expansions happen in URL parameters in uri_replaceRichard Purdie2013-02-151-0/+2
| | | | | | | | | For example, this allows us to specify downloadfilename=PATH in sstate mirror urls to improve directory structures in DL_DIR when using sstate. (Bitbake rev: 7850a1364b6b37c58664d84f9c14806b4479b45c) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: wget: Only use -O option when not spideringRichard Purdie2013-02-151-1/+2
| | | | | | | | | | If we pass the -O option whilst spidering, empty files are created which is not desired. We also need to ensure any subdirectories are created when using the downloadfilename parameter. (Bitbake rev: d5f78e98d5aba36c95288fbaac267c2d54537b02) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: fetch2: Remove broken git variables from the environmentDarren Hart2013-02-061-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The following variables perform no function outside of bitbake: GIT_CONFIG GIT_PROXY_HOST GIT_PROXY_PORT GIT_PROXY_IGNORE GIT_CONFIG only affects the git-config command which is not relevant to the fetcher. This was previously used with the OE GIT_CORE_CONFIG variable which would provide a basic git config to use instead of the user's config. This usage was deprecated by git for over a year now: http://git.661346.n2.nabble.com/Overriding-gitconfig-using-GIT-CONFIG-td6680977.html GIT_PROXY_HOST and GIT_PROXY_PORT are not used by git. GIT_PROXY_IGNORE was an OE construct used to create the custom git config and had no meaning outside of the OE environment. It is not used by git. Remove these variables from the fetcher environment. Users wishing to configure git to work with a proxy should define the GIT_PROXY_COMMAND environment variable to use an external script. NO_PROXY can be used within this script to skip the proxy for certain hosts. (Bitbake rev: e60270bdce6b8c2f8da1a4838aa374da9db3c86a) Signed-off-by: Darren Hart <dvhart@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: fetch2: Export upper and lower case environment variablesDarren Hart2013-02-061-2/+7
| | | | | | | | | | | | | | | | | Applications are inconsistent in their use of upper and lower case proxy variables. Curl, for example, specifies NO_PROXY (not no_proxy) in the man page (changed in 2009 [1]). Avoid proxy issues by ensuring both the upper and lower case versions of each proxy variable is available in the environment for the fetcher commands. Add FTPS_PROXY and ftps_proxy to the list as well. 1. http://curl.haxx.se/mail/tracker-2009-04/0012.html (Bitbake rev: c3e6b2c5ec81d5ad7dcf606fff16fd5552bd267c) Signed-off-by: Darren Hart <dvhart@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: bitbake: fetch2: Print the complete SRCREV variable name when INVALIDDarren Hart2013-02-051-2/+5
| | | | | | | | | | | | | | | | | | | | If a particular SRCREV (say for a particular branch) is missing, the fetcher will currently just report an obtuse error about the "SRCREV" being invalid. If there is more information is to be had (say from name, i.e. branch, and pn) then display that as well. The new error looks something like this: ERROR: ExpansionError during parsing /home/dvhart/source/poky/meta/recipes-kernel/linux/linux-yocto_3.4.bb: Failure expanding variable do_patch: ExpansionError: Failure expanding variable SRCPV, expression was ${@bb.fetch2.get_srcrev(d)} which triggered exception FetchError: Fetcher failure for URL: 'git://otcgit.jf.intel.com/dvhart/linux-yocto-minnow-3.4.git;protocol=git;nocheckout=1;branch=standard/minnow,meta,emgd-1.14;name=machine,meta,emgd'. Please set SRCREV_emgd_pn-linux-yocto to a valid value Note the variable listed as invalid is "SRCREV_emgd_pn-linux-yocto", making it explicit what is wrong. (Bitbake rev: 63774f5b4edb999300bddd891233f6050f4af877) Signed-off-by: Darren Hart <dvhart@linux.intel.com> Cc: bitbake-devel@lists.openembedded.org Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: ssh.py: add example SRC_URIMartin Jansa2013-01-311-0/+6
| | | | | | | (Bitbake rev: f838af8e7afebf279ffb00a3afa6592f061b703f) Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: ssh.py: throw ParameterError when someone tries ssh://foo; protocol=gitMartin Jansa2013-01-311-0/+5
| | | | | | | | | | * taken from SFTP fetcher: http://patchwork.openembedded.org/patch/43027/ (Bitbake rev: 88e565855b52e905156d85c3f45b341cddfe2f55) Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: ssh: fix fetcherMartin Jansa2013-01-311-14/+7
| | | | | | | | | | | | | | | | | | | * set localpath in urldata_init otherwise localpath and basename were None, when fetcher was trying to define .lock and .done paths basepath = d.expand("${DL_DIR}/%s" % os.path.basename(self.localpath or self.basename)) * remove "host" from localpath .done and .lock files are always using just basename, so if someone has 2 recipes with: SRC_URI = "ssh://foo/file.txt" SRC_URI = "ssh://bar/file.txt" then there will be only one file.txt.done in downloads anyway (and only first file.txt from first server will be returned on do_fetch (Bitbake rev: 41208760d70a657297f9ecfb48b74e2c3b594e70) Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: hg.py: Fixed fetch failure that occurs when SRCREV is a tag.Jon Szymaniak2013-01-181-1/+6
| | | | | | | | | | | | Removed "-r REV" from hg clone invocation to fetch the entire repo, rather than just the subset at the specified revision. This will ensure that the specified tag exists for successive commands (e.g., the update built on line 149.) (Bitbake rev: f0a6261d3a8ede9ebdb6383e02cb2c2de1690640) Signed-off-by: Jon Szymaniak <jon.szymaniak@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: fetch2: Sort file checksums by value, not pathTyler Hall2013-01-181-1/+2
| | | | | | | | | | | | | | | | | | | Changing the path to a file could change the task hash even if the file still has the same checksum. This occurs when the task depends on multiple files and the sort order of their paths changes. Usually the sorting is consistent because layers tend to have the same relative paths, but this should take care of other configuations. The problem arose when using a .bbappend to add files to a recipe in another layer. If the layer is located alongside the other layers and their parent directory is moved, the hash does not change. However, moving the .bbappend layer outside of the common directory can change the path sort order and the task hash. (Bitbake rev: 22bd19d208f0251f5a1f9b98f3cac66181f3fc07) Signed-off-by: Tyler Hall <tylerwhall@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: fetch2: remove localcount and use AUTOINC insteadConstantin Musca2012-12-172-83/+11
| | | | | | | | | | | | | | | | - do not use the BB_URI_LOCALCOUNT database for computing revision incremental numbers anymore - sortable_revision now generates "AUTOINC+${latest_rev}" - use one incrementing value rather than several - PV becomes 0.1+gitAUTOINC+deadbeefdecafbad_decafbaddeadbeef - remove all localcount code and simplify the fetcher - this patch addresses the following proposal: http://lists.linuxtogo.org/pipermail/bitbake-devel/2012-November/003878.html (Bitbake rev: 61cf01c5c236b4218f40cfae7c059c2b86765dbd) Signed-off-by: Constantin Musca <constantinx.musca@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: git.py: A bit of tidying up regarding grammar and supported protocols.Robert P. J. Day2012-12-141-5/+5
| | | | | | | | | Doc cleanup, no functional change. (Bitbake rev: 5161a84f5dcfe748382a5073349bf10ed21641f9) Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: fetch2/wget: Fix for mixed-up wget commandsCristian Iorga2012-11-261-2/+2
| | | | | | | | | | | | | | | | | | wget commands for check and resume were mixed-up, leading to the following issues: 1. long running "NOTE: Preparing runqueue" reason: objects were downloaded, not spidered on the mirror 2. Failing network test in Build Appliance, because wget 1.14 (in use in BA) will fail if a file already exists. During the network connectivity test, index.php file was actually downloaded, not spidered (checked for existence on yoctoproject.org website), leading to wget failure. (Bitbake rev: d7a5185cae975eaca50a9785c6605e895dc7bb51) Signed-off-by: Cristian Iorga <cristian.iorga@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: fetch2/local: Fix bug introduced by expression ambiguityRichard Purdie2012-11-261-1/+1
| | | | | | | | | The last changes introduced an error in some of the logic. Add brackets to clarify the meaning of the expression and fix certain build failures. (Bitbake rev: 87aea65bd5d553bd0495b0f1efe6d41d0bb2810f) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: fetch2: Avoid using FILESDIR in unpackRichard Purdie2012-11-262-7/+11
| | | | | | | | | | | | | Currently there is code which uses FILESDIR in unpack to ensure parent directories are created, leading to differing behaviour depending on which search path is used to locate the directory. This change standardises the code and takes the data from the fetcher in question meaning we can standardise the code and deprecate FILESDIR. (Bitbake rev: 1cccb3bd01ed82e4978acfef0fda1bd797eef72a) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: fetch2/local: Improve handling of wildcard matchesRichard Purdie2012-11-261-1/+6
| | | | | | | | | | | | Currently wildcard matches end up working by FILESDIR being defined in the metadata to a default of "." in FILESPATH which is hacky at best. This patch adds the behaviour into the fetcher so its at least slightly more explicit. (Bitbake rev: 07b5f84133ac79aac4e939ea5f24390ad7f940a5) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: fetch2: raise an exception if user specifies protocol=git with http://Paul Eggleton2012-10-031-0/+3
| | | | | | | | | | | | It is a common mistake to use http:// and protocol=git when attempting to fetch from a git repository using the http protocol; if this is detected then throw an error explaining that you need to use git:// with protocol=http instead. (Bitbake rev: 5bc4930c1638db16bcd5f9c8cfc4081f9ffc192b) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: fetch2: add "-d" option to cpioRobert Yang2012-09-271-2/+2
| | | | | | | | | | | | | | Add "-d" option to cpio since it is useful: -d --make-directories Create leading directories where needed. [YOCTO #3137] (Bitbake rev: a78f9ded7896432b107f34c0bb608b389fdb676a) Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: fetch2/git: Don't use deprecated API1.3_M5.rc2Richard Purdie2012-09-251-1/+1
| | | | | | (Bitbake rev: 8e650b3307b60cfe8e7439ea6891c3a85f785af9) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: fetch2/git: Add missing mkdirRichard Purdie2012-09-241-0/+1
| | | | | | | | | | bitbake-selftest is failing due to directories not being created. This adds in an appropriate mkdir so the tests can complete. Presumably in general OE use, something else is ensuring the parent directory is created. (Bitbake rev: 1270a07713e2a6c6e6fadcc61b785aebc99ae17b) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: fetch2: improve error output for checksum failuresPaul Eggleton2012-09-241-3/+6
| | | | | | | | | | | | | | | | | | | * Don't print the full exception in the initial warning - if we later succeed in fetching the file from a mirror, we won't usually need the details (which are in the fetch log if they are needed); otherwise the full error will be printed when the fetch operation fails. Also adjust the conditional block so that we don't print another warning just mentioning we're going to try mirrors. * Call logger.error() so that with knotty the full log is not printed * Provide an explanation around the lines we print for easily updating the checksums in the recipe. We don't want users to be just blindly updating the recipe in case of a transient failure or deliberately altered remote file. (Bitbake rev: 2793413106c925b06783beb7413aa87cbcf246c3) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: fetch2: make fetch failure errors more readablePaul Eggleton2012-09-241-1/+7
| | | | | | | | | | | | | Most of the time we don't need to see the fetch command; the fetch log includes the command as a debug message in any case, so omit it. Also adjust the way command output is printed (we don't need stderr/stdout labelled, and print "no output" instead of "output:\nNone" when there is no output. (Bitbake rev: a75505a52e4da918222100221f79e8a658f90446) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: fetch2/cvs: Fix parameter spacingRichard Purdie2012-09-201-2/+2
| | | | | | | | | Add in misssing space between the parameters. Reported by Jate Sujjavanich <Jate.Sujjavanich@myfuelmaster.com>. (Bitbake rev: 55382f0aac84b8f81cad0b82053c0b8295c33e54) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: fetch2/cvs: Clean up various data store referencesRichard Purdie2012-09-201-12/+8
| | | | | | | | | The code in the CVS fetcher is elderly and there are simpler ways of using the data store. This updates to use the modern APIs. (Bitbake rev: 78eee8c70a80997293df99475153aed0b2ad0a17) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: fetch2/cvs: Fix localdata variable referenceRichard Purdie2012-09-201-1/+1
| | | | | | | | The localdata variable was removed, fix up a lost reference to this. (Bitbake rev: 02ccc1396005ce0b7a2150a5ce12b723df21d464) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: fetch2: fix malformed URL causing a useless tracebackPaul Eggleton2012-09-101-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The implementation of NoMethodError and MalformedUrl was broken - if you just set self.args in an exception class to a string it treats it as a list and then fails later on with a TypeError due to the number of arguments not matching up. This nasty exception during exception handling was breaking the normal exception flow (fixed separately), which meant that if you had a malformed URL or invalid protocol in SRC_URI you would get the following: ERROR: Command execution failed: Traceback (most recent call last): File "/home/user/poky/poky/bitbake/lib/bb/command.py", line 84, in runAsyncCommand self.cooker.updateCache() File "/home/user/poky/poky/bitbake/lib/bb/cooker.py", line 1207, in updateCache if not self.parser.parse_next(): File "/home/user/poky/poky/bitbake/lib/bb/cooker.py", line 1694, in parse_next logger.error('Unable to parse %s', value.recipe, AttributeError: 'exceptions.TypeError' object has no attribute 'recipe' A specific fix for [YOCTO #2977]. (Bitbake rev: 9d4150d99051d24ff218e8a43664ceaf524b19c7) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>