summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb
Commit message (Collapse)AuthorAgeFilesLines
* bitbake: fetch2: Add fetch parameter to checkstatusyocto-1.9_M1Aníbal Limón2015-07-094-13/+13
| | | | | | | | | | In order to pass connection cache object to checkstatus function add fetch parameter. (Bitbake rev: fbb9c6f5538084e125b58118a86968908e6f895b) Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: fetch2/__init__.py: Add FetchConnectionCache classAníbal Limón2015-07-091-0/+36
| | | | | | | | | | FetchConnectionCache class acts as a container for socket connections useful when implement connection cache into fetcher modules. (Bitbake rev: 454da2cd17539ceb9caad6d76f034757e44ee12f) Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: knotty.py: Make sure bitbake.lock is unlocked before exitingLeonardo Sandoval2015-07-091-0/+20
| | | | | | | | | | | | Before exiting the UI, unlocks the bitbake.lock owned by cooker; this way consecutive bitbake executions can lock it again without trouble. [Yocto #7941] (Bitbake rev: 69ecd15aece54753154950c55d7af42f85ad8606) Signed-off-by: Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: command.py: Unlock function included into CommandsSync classLeonardo Sandoval2015-07-091-0/+6
| | | | | | | | | | Function which calls cooker's unlock method, which in turn unlocks bitbake.lock file. (Bitbake rev: e97a9f1528d77503b5c93e48e3de9933fbb9f3cd) Signed-off-by: Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: cooker.py: Lock/Unlock members function into BBCookerLeonardo Sandoval2015-07-091-3/+14
| | | | | | | (Bitbake rev: d66dccf9f9a33bfef5c28cc1c767bfc89faee532) Signed-off-by: Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: cooker: Improve DATE/TIME handlingRichard Purdie2015-07-081-3/+6
| | | | | | | | | | | | | | | | | | | | | | | | Currently, once set, DATE and TIME in the metadata remain unchanged. This is suboptimal for cases where cooker is reused. This ties setting the variables into the BuildStarted event which seems like a more appropriate time to do so. It also changes BUILDNAME to be based off DATE/TIME by default if not already set so that the data is more consistent. We therefore need to expand the value rather than the previous default of not doing so. This change does mean the date/time values are in sync across all variables too. It does mean bitbake now has special knowledge of DATE/TIME but that would seen unavoidable (other than doing this in event handlers which has its own set of downsides). [YOCTO #5187] (Bitbake rev: f883cf240266ee7be2cbd8971a8164cf4df9e372) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: main: add skeleton documentation for the recipe:do_task syntaxRoss Burton2015-07-071-1/+1
| | | | | | | | | | The incredibly useful recipe:do_task syntax on the command line isn't documented at all. This isn't much but it's better than nothing. (Bitbake rev: 7f4c07886ecff4ac77fdd2165bedd179099fcf19) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: fetch2: Checkout to correct ref begore init and update submodulesFelipe F. Tonello2015-07-071-0/+1
| | | | | | | | | | | | This is nessary when specified branch with submodules is different then default (master) branch. [YOCTO #7771] (Bitbake rev: f7b0b5e33e00f3ce0744322eee93835ee76bf184) Signed-off-by: Felipe F. Tonello <eu@felipetonello.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: Fix build execution regressionMichael Wood2015-07-021-0/+1
| | | | | | | | | | | | Make sure the error value is initialised and update the string match that we have to identify bitbake's current startup status. Patch contribution from Eduard Bartosh (Bitbake rev: 915ba08a8a3013e9787e564f2ffd8698c948f433) Signed-off-by: Michael Wood <michael.g.wood@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: codeparser: Add repr() methodsRichard Purdie2015-06-271-0/+5
| | | | | | | | | These aid when debugging parts of the codeparser cache since the object contents becomes identifiable. (Bitbake rev: 344b098c7eafc2bcc5c6b44ea47985bc0cb446b5) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: codeparser: Allow empty functionsRichard Purdie2015-06-271-0/+3
| | | | | | | | | | | | | | | | | The main parser and other code copes with empty python functions but the python codeparser does not. Fix this to avoid errors with code like: python do_build () { } which currently results in the obtuse: "Failure expanding variable do_build: IndexError: string index out of range" [YOCTO #7829] (Bitbake rev: e4f594c670189e04d58ce7d160fc1d86123620af) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: bitbake: fetch2/hg.py: fix unpack error and mirror tarballRobert Yang2015-06-271-13/+66
| | | | | | | | | | | | | | | | | | Fixed: * do_unpack error: abort: repository DL_DIR/hg/vim.googlecode.com/hg/vim not found! * The mirror tarball doesn't work - Add the build_mirror_data to create the tarball - Unpack the mirror tarball when needed * The hg files will put in the dir like git: DL_DIR/hg, it was DL_DIR/hg/path/to/src/uri/path in the past. (Bitbake rev: 378647281ae883dd726f1e1b775dd35ef6a0e8d1) Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: fetch/perforce: Fix single file checkoutsRichard Purdie2015-06-271-1/+1
| | | | | | | | | | | Fetching directories with p4 worked but single files did not. This patch from Helmut Auer (helmut.auer@harman.com) fixes that issue. [YOCTO #7891] (Bitbake rev: 39da6579901c62a83ed9319c2016c58fbbc108fe) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: event: Handle recursive events and the data store betterRichard Purdie2015-06-261-2/+6
| | | | | | | | | | | | | | Events can call each other recursively, e.g. an event handler can call bb.note which in turn generates another event. If these loop, it can lead to multiple deletions of 'd' from __builtins__ which can fail since __builtins__ is global scope. Add handling to only remove 'd' when we added it and it wasn't already present. (Bitbake rev: b45952650ce8f470f124df36185b79e0d3a1783a) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: cooker: Fire BuildCompleted before finishing the commandRichard Purdie2015-06-261-2/+2
| | | | | | | | | | | | | | | | | Some handlers hook on BuildComplete so it avoids certain event races to finish the command after the BuildComplete event is sent out. This means the UI is available to handle events until the command completes. What appears to be a race on one of the sanity tests for event handlers triggered this change although the failure is hard to reproduce. [YOCTO #7921] (Bitbake rev: e42d7c47a06fbb5981e0313478c8e3656b99f4e7) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toasterui: verify variable before usageAlexandru DAMIAN2015-06-261-4/+5
| | | | | | | | | | | This patch verifies that BRBE is set before trying to use it to read the checkout paths. This is needed for builds ran outside Toaster control. (Bitbake rev: e04807cd3135c9de96cc7f79245f329c24618b85) Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: refactor build modelAlexandru DAMIAN2015-06-262-23/+50
| | | | | | | | | | | | | | | | We remove the "timespent", "errors_no" and "warnings_no" fields in favor of computing the needed values at runtime. This prevents inconsistencies in the UI. Also removeing all references to BuildRequests from the interface - all build details now display in the build dashboard. Minor fixes related to data logging. (Bitbake rev: 44f37394ed3e4ca02f940be172fe4395b0ee0f7d) Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: fixes after replacing BuildRequest with BuildAlexandru DAMIAN2015-06-261-14/+10
| | | | | | | | | | | This is a set of fixes that repair the interface after we switched from displaying BuildRequest data to Build data in the formerly "managed" mode. (Bitbake rev: 57f790b0c56297af8c83d5def8461bd5d61fe4af) Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: fill in build data from buildrequestAlexandru DAMIAN2015-06-261-1/+15
| | | | | | | | | | | | | | This patch adds logic to complete changing the interface from showing BuildRequests to showing Build data. The BuildRequest data is now transformed in Build data with proper Toaster exceptions being recorded instead of listing problems during startup as build errors. (Bitbake rev: 51a41172d0b390370f9a38696b1ac65666ada4d2) Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: runqueue: Sanity check BB_NUMBER_THREADSRichard Purdie2015-06-231-0/+3
| | | | | | | | | | | | Bitbake does really weird things with negative or zero numbers of threads which is confusing to the user. Add a sanity check for this. When you have code doing arithmetic on the values and a VM reconfigures to only a single thread, negative numbers are easier than you'd think. (Bitbake rev: 32166ac3c85ff3c04081580ae76bd63590d6ff3e) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: runqueue: Handle BBHandledException correctlyRichard Purdie2015-06-231-0/+7
| | | | | | | | | | | | If we see a BBHandledException in runqueue, the understanding is the system handled it, printing a log and traceback is just confusing. Therefore only print these in the cases where its an unknown/unhandled exception. (Bitbake rev: 29d28e22ce431c3d3aabdb88ff4d8cca67a1cfad) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: server/process: Don't log BBHandledExceptionRichard Purdie2015-06-231-2/+3
| | | | | | | | | | | | If we see a BBHandledException in the idle handler, the understanding is the system handled it, printing a log and traceback is just confusing. Therefore only print these in the cases where its an unknown/unhandled exception. (Bitbake rev: d88ecc2bc44dce8fd92ca3a2c0fd4124a5e464fa) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: runqueue: Improve handling of fakeworker failing to startRichard Purdie2015-06-231-1/+6
| | | | | | | | | | | Currently if the fakeworker failes to start the output from bitbake is confusing. Improve the error handling to give a clear indication of what failed. Patch from Chris Larson. (Bitbake rev: ad286d6fed7a580bec36a92c7b7e205322ac407b) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: event: Inject 'd' into event handlersRichard Purdie2015-06-231-0/+2
| | | | | | | | | | | | | | | | | | | | | | | To quote Chris Larson: """ e.data.getVar() gets a bit old in a large event handler, and it means a simple handler has to be modified if switching between an event handler (e.g. RecipeParsed) and anonymous python. I think it would make sense to restore the 'd' convention here to align with python elsewhere. It'd just be a convenience, d==e.data, to avoid the common pattern of setting it at the top of the event handler. """ I couldn't find a way to inject 'd' via locals/globals due to the use of a function parameter so this left __builtins__ as the only way I could find to make this work. [YOCTO #7668] (Bitbake rev: 44ac81e5281fb62ad00e2f79a9d754118ea62526) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: bitbake: Add explict getVar param for (non) expansionRichard Purdie2015-06-2313-57/+57
| | | | | | | | | | | | | | Rather than just use d.getVar(X), use the more explict d.getVar(X, False) since at some point in the future, having the default of expansion would be nice. This is the first step towards that. This patch was mostly made using the command: sed -e 's:\(getVar([^,()]*\)\s*):\1, False):g' -i `grep -ril getVar *` (Bitbake rev: 659ef95c9b8aced3c4ded81c48bcc0fbde4d429f) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: bitbake: Bump version to 1.27.1Richard Purdie2015-06-091-1/+1
| | | | | | (Bitbake rev: 430f7a288b4446600b3a943c51f6711ffcf9e619) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: cooker/event: Add an event which lists all stamps reachable after ↵Richard Purdie2015-06-092-0/+15
| | | | | | | | | | | | parsing The metadata can potentially use such an event to clean up any "unreachable" data, solving several problems we currently have where obsolete data may continue to exist in the shared areas. (Bitbake rev: c5e6f929f3d5eeb7954660dea62611c58b795ff8) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: parse/BBHandler: Avoid repeatedly resetting FILERichard Purdie2015-06-051-2/+2
| | | | | | | | | | | | If we're not going to change the value of FILE, or we know it isn't going to have changed (ext == bbclass), don't set FILE. This avoids messy looking history of the variable as well as optimises parsing speed slightly. (Bitbake rev: 88e4600aa66dda2e6c807f9d97af8982bcd8817b) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster logger: assign projects to all buildsAlexandru DAMIAN2015-05-291-10/+27
| | | | | | | | | | | | | | | | Bitbake logger now sets a default project if the TOASTER_BRBE or TOASTER_PROJECT Bitbake variables are not set. This a necessary step in getting all builds under a project, as to unify the MANAGED and interactive modes. Other small fixes are included, related to the size of the fields in the database. (Bitbake rev: 5e0bf388f4e5c1cc493ac8264785e631bad2f672) Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster logger: refactor recipe and layer file pathsAlexandru DAMIAN2015-05-291-15/+32
| | | | | | | | | | | | | | | | | | | | | | | This refactoring brings the "local_path" of the layer from the Layer object to the Layer_Version object, which is more appropriate as different checkouts of the same Layer may live in different directories. This enables us to store Recipe file paths relative to a Layer_Version at all times, aleviating the need to store full file paths in the database. We also turn the prefix of the path (e.g. virtual:native path name space) into a pathflag field. In turn, this solves the problem of mis-identification of tasks based on the recipe file paths, since we can also match the namespace of the file paths on the recipe files. [YOCTO #7594] (Bitbake rev: ec43dc569e370767c709dec225cbee0c99151c19) Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: data: Make expandKeys deterministicRichard Purdie2015-05-291-1/+1
| | | | | | | | | | | | | At least in theory, the order the keys are expanded in can make a difference, particularly if there is key overlap. We also want to ensure that any underlying base key is processed before any overridden version of that variable (FOO before FOO_x) which helps the update_data removal code I've been testing. (Bitbake rev: 863b6add24c211d64ba7931647084321f2d65889) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: ConfHandler: Fix bogus dependency problemsRichard Purdie2015-05-291-1/+0
| | | | | | | | | | | | | | | | Adding a dependency when errors occur accessing a file when calling handle() is not the correct thing to do. THe handle() code calls resolve_file() which can raise an exception without ever touching "fn" itself, it has also already marked all the dependencies correctly. This leads to bogus files being resolved to the local cwd and hence triggers reparses for no good reason. The solution is to simply remove the bogus dependency. (Bitbake rev: 366af3be1cffd64e4a79c15990c1e05869022c14) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: BBHandler: Drop cwd from search pathRichard Purdie2015-05-291-2/+1
| | | | | | | | | | | | | | | | Whilst bitbake has done this for a long time, the behaviour of resolving class files against cwd is not desirable. This can be seen during base configuration parsing when looking for base.bbclass where a dependency on cwd is added. If cwd then changes, the cache is invalid and triggers a re-parse. The only real option is to drop this entry and if files can't be found, we fix BBPATH in the cases where it needs fixing. I didn't find any in the random selection of layers I tested parsing locally. (Bitbake rev: 508aad9d5db7e51328b1fd6ee53b4bc3720a30b7) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: cooker/utils: Improve parsing profilingRichard Purdie2015-05-292-5/+21
| | | | | | | | | | | | | | | Currently the cooker parsing processes each dump an individual profile which is ok, but means absolute numbers of function calls for a given load can be tricky to determine as parsing of recipes may go to different pool threads on different runs. This change collects up the individual thread parsing results and processes them into one profile output. The profile processing function in utils needed tweaks to allow this to work. (Bitbake rev: d3d2541aacd1ea560da0d8b25a3ea3f0563dee70) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: tests/data: Add key expansion unit testRichard Purdie2015-05-291-0/+14
| | | | | | | | | This ensures basic key expansion works and that overlapping keys generate a log message. (Bitbake rev: ed5a8954ac923eda9750a636c5bb5b95ffce664f) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: tests/data: Add log parsing test codeRichard Purdie2015-05-291-1/+24
| | | | | | | | | This allows us to write tests which ensure a particular action generates a particular log message. (Bitbake rev: b30ee0aba51a35a194a4338b988f93ece1ed281c) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: data: Revert expandKeys warning moveRichard Purdie2015-05-291-6/+5
| | | | | | | | | | | This was incorrect, it *must* be done next to the rename as a previous may overlap with the current one and we need to detect this case. I'll add a test case to better catch this problem in future. (Bitbake rev: 5e9d0911cd86e980ab310cc0d79c9383fbc2c844) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: data: Clean up expandKeys None value handlingRichard Purdie2015-05-291-2/+2
| | | | | | | | | | | This comparison is interesting even in the case of empty vales. Enabling this warning actually found a bug in the metadata in avahi. Make the code handle None specifically and also remove the dead code path in the second if statement. (Bitbake rev: a4cd4c56284812efb2a2bc0c8667ddad073f8e94) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: data: Move warning code to the first loop for performanceRichard Purdie2015-05-261-5/+5
| | | | | | | | | By doing this we can take advantage of the expansion cache before starting write operations on the data store. (Bitbake rev: 702b42a47904f2378dd819e7463b3206883c2651) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: siggen: Don't crash if number of task dependencies changeRichard Purdie2015-05-261-6/+10
| | | | | | | | | If the number of task dependencies change you currently get a traceback when using diffsigs. (Bitbake rev: c6798b431571aae18bb8699ac6e3ec75b731d719) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: cache: Clean up getVar usage to modern syntax/styleRichard Purdie2015-05-261-6/+6
| | | | | | | | No functional change. (Bitbake rev: 0eb75a34bd9731e9de7bc9600a7418a927561fdb) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: fetch/hg: Disable checksums for archived downloadsAsh Charles2015-05-261-0/+7
| | | | | | | | | | | | | | | | Like the Git fetcher, the Mercurial fetcher shouldn't expect recipes to provide a checksum. As described [1], recipes using a mercurial fetcher that don't provide a checksum will fail in a the repository has previously been downloaded and archived. Credit to Rafaël Carré for figuring out the bug. [1] https://www.mail-archive.com/openembedded-devel@lists.openembedded.org/msg41328.html (Bitbake rev: 2df35a25b4968f64adfa673d5b73442c1a30829d) Signed-off-by: Ash Charles <ashcharles@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: fetch2/git.py: Add gitpkgv_revision alternative version informationMike Looijmans2015-05-241-0/+25
| | | | | | | | | | | | | | | | gitpkgv_revision returns a sortable revision number that can be used in the PKGV variable for example. To mimic meta-openembedded gitpkgv behaviour to provide a sortable revision numner, one could set the following: PKGV = "1.0+${@bb.fetch2.get_srcrev(d, 'gitpkgv_revision')}" This would yield a package version like "1.0+69+fb5eb80". (Bitbake rev: 989c08f62aff7b707c25c692c23284f16506b7bc) Signed-off-by: Mike Looijmans <mike.looijmans@topic.nl> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: fetch2/__init__.py: Make get_srcrev output configurableMike Looijmans2015-05-241-3/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | The idea here is to support package version numbering similar to gitpkgv in meta-openembedded. This commit is the first step towards such functionality. The original plan was to add a "get_pretty_srcrev" method to the fetcher, as per Richard's suggestion [1]. While writing this, I noticed that it would become a copy of get_srcrev with only two lines changed. So to create something more Pythonic than a boolean argument and conditionals around the calls to the fetcher's sortable_revision, I just made the method to be called on the fetcher an argument to the method. Defaulting to 'sortable_revision' prevents affecting existing code. Now if the git fetcher were to implement, say 'gitpkgv_revision' one could set the following in a recipe: PKGV="1.2+${@bb.fetch2.get_srcrev(d, 'gitpkgv_revision')}" and this would yield the same result as gitpkgv's GITPKGV variable. See for the discussion leading to this change: [1] http://lists.openembedded.org/pipermail/openembedded-core/2015-January/100345.html (Bitbake rev: 2f1f4483493cc290f5d2c07f9906e90eaea2f4c1) Signed-off-by: Mike Looijmans <mike.looijmans@topic.nl> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: fetch/git: Fix uri in git checkstatusMarcin Smoczyński2015-05-191-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | Pass proper repository url without arguments after a semicolon. Executing checkuri on a rule with git repository in SRC_URI does not report errors when working offline because wrong repository url is passed to the ls-remote command. For example "bitbake -c checkuri glibc" command executes: "git -c core.fsyncobjectfiles=0 ls-remote git://sourceware.org/git/glibc.git;branch=release/2.21/master" command in a shell subprocess to determine if url is valid. Shell subprocess executes in fact 2 commands: "git -c core.fsyncobjectfiles=0 ls-remote git://sourceware.org/git/glibc.git" and "branch=release/2.21/master" First one returns 127 or 128 depending on error but second one returns 0 because it is just env variable setup. Therefore we're not catching connection error. [YOCTO #7558] (Bitbake rev: efa44d04137977f883db4a643b0f774e91514722) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: fetch2/hg.py: add clean functionRobert Yang2015-05-191-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixed when bitbake vim -ccleanall: File: '/path/to/bitbake/lib/bb/fetch2/__init__.py', lineno: 1462, function: clean 1458: def clean(self, urldata, d): 1459: """ 1460: Clean any existing full or partial download 1461: """ *** 1462: bb.utils.remove(urldata.localpath) 1463: 1464: def try_premirror(self, urldata, d): 1465: """ 1466: Should premirrors be used? File: '/path/to/bitbake/lib/bb/utils.py', lineno: 633, function: remove 0629: subprocess.call(['rm', '-rf'] + glob.glob(path)) 0630: return 0631: for name in glob.glob(path): 0632: try: *** 0633: os.unlink(name) 0634: except OSError as exc: 0635: if exc.errno != errno.ENOENT: 0636: raise Exception: OSError: [Errno 21] Is a directory: '/path/to/downloads/hg/vim.googlecode.com/hg/vim' (Bitbake rev: 02763306662e15a4750395e5eab64ba98d1f9939) Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: lib/bb/utils: fix and extend edit_metadata_file()Paul Eggleton2015-05-192-58/+451
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix several bugs and add some useful enhancements to make this into a more generic metadata editing function: * Support modifying function values (name must be specified ending with "()") * Support dropping values by returning None as the new value * Split out edit_metadata() function to provide same functionality on a list/iterable * Pass operation to callback and allow function to return them * Pass current output lines to callback so they can be modified * Fix handling of single-quoted values * Handle :=, =+, .=, and =. operators * Support arbitrary indent string * Support indenting by length of assignment (by specifying -1) * Fix typo in variablename - intentspc -> indentspc * Expand function docstring to cover arguments / usage * Add a parameter to enable matching names with overrides applied * Add some bitbake-selftest tests Note that this does change the expected signature of the callback function. The only known caller is in lib/bb/utils.py itself; I doubt anyone else has made extensive use of this function yet. (Bitbake rev: 20059e4d5ab9bf0f32c781ccb208da3c95818018) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: lib/bb/utils: fix several bugs in edit_metadata_file()Paul Eggleton2015-05-191-3/+11
| | | | | | | | | | | | * Fix unchanged assignments being dropped if other lines changed * Fix not passing variable name from single-line assignments to the function * Fix not trimming the trailing quote from values (Bitbake rev: 0b0c82f49cf2de887967d305768cbd95314bb171) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: lib/bb/utils: add function to get layer containing a filePaul Eggleton2015-05-191-0/+16
| | | | | | | | | | | | In certain contexts it can be useful to find the layer that a file (e.g. a recipe) appears in. Implements [YOCTO #7723]. (Bitbake rev: 3bf9c8830c5d5eea5502230d5af84ebd87ad5849) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: tests/parse: Add file missing from previous commitRichard Purdie2015-05-161-0/+69
| | | | | | (Bitbake rev: 76f095107a0eaf987a5a6a48eed7b98f87aea121) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>