summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb
Commit message (Collapse)AuthorAgeFilesLines
* bitbake: Replace deprecated git branch parameter "--set-upstream"krogoth-nextAndre Rosa2017-11-071-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | Since 2017-08-17 (git version 2.14.1.473.g3ec7d702a) using deprecated git branch parameter "--set-upstream" causes a fetcher error. Replace it by "--set-upstream-to". https://git.kernel.org/pub/scm/git/git.git/commit/?id=52668846ea2d41ffbd87cda7cb8e492dea9f2c4d says, it's deprecated since 2012-08-30 so hopefully all still supported host distributions have new enough git to support "--set-upstream-to". ERROR: PACKAGE do_unpack: Fetcher failure: ...; git -c core.fsyncobjectfiles=0 branch --set-upstream master origin/master failed with exit code 128, output: fatal: the '--set-upstream' option is no longer supported. Please use '--track' or '--set-upstream-to' instead. ERROR: PACKAGE do_unpack: Function failed: base_do_unpack (Bitbake rev: 62a53e9dbb6dc7489e44c32340b0caddd4596f0a) Signed-off-by: Andre Rosa <andre.rosa@lge.com> Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 2ab50074c1a6c56a8a178755de108447d7b7acaf) Signed-off-by: Javier Viguera <javier.viguera@digi.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: siggen: Make calc_taskhash match get_taskhash for file checksumsyocto-2.1.3krogoth-15.0.3Richard Purdie2017-06-271-1/+2
| | | | | | | | | | | The code in these two functions is meant to be equivlanet in behaviour but isn't. Add in code to ensure files that don't exist are handled consistently by both functions. Users did report being able to generate tracebacks otherwise. (Bitbake rev: 51e913e178a02bb603ddf874669e3ce54f90bd5d) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: lib/bb/checksum: avoid exception on broken symlinksPaul Eggleton2017-05-181-2/+4
| | | | | | | | | | | | | | | | | | | | If using OE's externalsrc with a source tree that is not tracked by git and contains broken symlinks, you can receive "TypeError: unorderable types: NoneType() < str()" within the file checksum code due to: checksums.sort(key=operator.itemgetter(1)) Don't add files with no checksum to the checksums list in order to avoid this. (Bitbake rev: 484fe5a3f5b840e5422cbdff0eef9aecfe944a19) (Bitbake rev: c60f952a5adb1bcbab403779ce08927759bcfb63) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Armin Kuster <akuster808@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: fetch2/wget: attempt checkstatus again if it failsRoss Burton2017-05-181-4/+8
| | | | | | | | | | | | | | | | | | | Some services such as SourceForge seem to struggle to keep up under load, with the result that over half of the autobuilder checkuri runs fail with sourceforge.net "connection timed out". Attempt to mitigate this by re-attempting once the network operation on failure. (Bitbake rev: 54b1961551511948e0cbd2ac39f19b39b9cee568) (Bitbake rev: 0b48acbf0428975e67012877417b9f90d3e1778c) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Hand applied Signed-off-by: Armin Kuster <akuster808@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: siggen: Ensure taskhash mismatches don't override existing dataRichard Purdie2017-05-181-9/+9
| | | | | | | | | | | | | | | | | | We recalculate the taskhash to ensure the version we have matches what we think it should be. When we write out a sigdata file, use the calculated value so that we don't overwrite any existing file. This leaves any original taskhash sigdata file intact to allow a debugging comparison. (Bitbake rev: dac68af6f4add9c99cb7adcf23b2ae89b96ca075) (Bitbake rev: 03f6025a5b0cc4d883a9b2071e026769330752c8) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Minor fixup Signed-off-by: Armin Kuster <akuster808@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: siggen: Pass basehash to worker processes and sanity check ↵Richard Purdie2017-05-181-4/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | reparsing result Bitbake can parse metadata in the cooker and in the worker during builds. If the metadata isn't deterministic, it can change between these two parses and this confuses things a lot. It turns out to be hard to debug these issues currently. This patch ensures the basehashes from the original parsing are passed into the workers and that these are checked when reparsing for consistency. The user is shown an error message if inconsistencies are found. There is debug code in siggen.py (see the "Slow but can be useful for debugging mismatched basehashes" commented code), we don't enable this by default due to performance issues. If you run into this message, enable this code and you will find "sigbasedata" files in tmp/stamps which should correspond to the hashes shown in this error message. bitbake-diffsigs on the files should show which variables are changing. (Bitbake rev: 46207262ee6cdd2e49c4765481a6a24702ca4843) (Bitbake rev: aa873f982ae4a56b135abd9eee169794e4c3aadd) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Fixed up do to python3 changes not being in krogoth. Signed-off-by: Armin Kuster <akuster808@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: build: Ensure we preserve sigbasedata files as well as sigdata onesRichard Purdie2017-05-181-1/+1
| | | | | | | | | We don't remove sigdata files, we also shouldn't remove sigbasedata files as this hinders debugging. (Bitbake rev: 24611df046f798276e7aa3f5d65976249ee117d4) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: fetch: copy files with -HEnrico Scholz2016-11-081-1/+1
| | | | | | | | | | | | | | | | | | | | | When using a PREMIRROR with plain (non-unpack) files, a SRC_URI like SRC_URI = "file://devmem2.c" will cause devmem2.c to be a symlink in the WORKDIR pointing to the local PREMIRROR. Trying to apply a patch on this file will either modify the file on the PREMIRROR or will fail due to sanity checks: ERROR: devmem2-1.0-r7 do_patch: Command Error: 'quilt --quiltrc /cache/build-ubuntu/sysroots/x86_64-oe-linux/etc/quiltrc push' exited with 1 Output: Applying patch devmem2-fixups-2.patch File devmem2.c is not a regular file -- refusing to patch (Bitbake rev: e82862ba8fedb2c5cd478c731b3d259d16c6e3d8) Signed-off-by: Enrico Scholz <enrico.scholz@sigma-chemnitz.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: bb.event: fix infinite loop on print_ui_queueAníbal Limón2016-11-081-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | If bitbake ends before _uiready and bb.event.LogHandler was add to the bitbake logger it causes an infinite loop when logging something. The scenario is print_ui_queue is called at exit and executes the log handlers [2] one of them is bb.event.LogHandler this handler appends the same entry to ui_queue causing the inifine loop [3]. In order to fix a new copy of the ui_queue list is created when iterate ui_queue. [YOCTO #10399] [1] https://bugzilla.yoctoproject.org/show_bug.cgi?id=10399#c0 [2] http://git.openembedded.org/bitbake/tree/lib/bb/event.py?id=41d9cd41d40b04746c82b4a940dca47df02514fc#n156 [3] http://git.openembedded.org/bitbake/tree/lib/bb/event.py?id=41d9cd41d40b04746c82b4a940dca47df02514fc#n164 (Bitbake rev: bb56a8957255999b9ffd1408d249cc5b715b5a3a) Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: event: prevent unclosed file warning in print_ui_queueJoshua Lock2016-11-081-3/+3
| | | | | | | | | | | | | | | | Use logger.addHandler(), rather than assigning an array of Handlers to the loggers handlers property directly, to avoid a warning from Python 3 about unclosed files: $ bitbake Nothing to do. Use 'bitbake world' to build everything, or run 'bitbake --help' for usage information. WARNING: /home/joshuagl/Projects/poky/bitbake/lib/bb/event.py:143: ResourceWarning: unclosed file <_io.TextIOWrapper name='/home/joshuagl/Projects/poky/build/tmp/log/cooker/qemux86/20161004094928.log' mode='a' encoding='UTF-8'> logger.handlers = [stdout] (Bitbake rev: 775888307dc2917ef4b52799cc1600a6b3a01abe) Signed-off-by: Joshua Lock <joshua.g.lock@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: event.py: output errors and warnings to stderrEd Bartosh2016-11-081-3/+10
| | | | | | | | | | | | All logging messages are printed on stdout when processing UI event queue. This makes it impossible to distinguish between errors and normal bitbake output. Output to stderror or stdout depending on log level should fix this. (Bitbake rev: c4029c4f00197804511fc71e1190d34eb120212a) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: lib/bb/tests/fetch: remove URL that doesn't exist anymoreRoss Burton2016-09-131-1/+0
| | | | | | | | | | The CUPS ipptool URL we were checking now redirects to github where the tarball isn't present, so remove it from the test suite. (Bitbake rev: e64564bcaa7331f505baa5209fef1f50dfda1469) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: fetch2: Safer check for BB_ORIGENV datastoreLeonardo Sandoval2016-06-291-1/+2
| | | | | | | | | | | | | | | | | BB_ORIGENV value on the datastore can be NoneType thus raising an AttributeError exception when calling the getVar method. To avoid this, a check is done before accesing it. [YOCTO #9567] (Bitbake rev: f368f5ae64a1681873f3d81f3cb8fb38650367b0) (Bitbake rev: 25859009b710cb35ac8f9ee9eb3a7305f9e13402) Signed-off-by: Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Armin Kuster <akuster@mvista.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: fetch2: export DBUS_SESSION_BUS_ADDRESS to support authentication ↵Ross Burton2016-06-021-2/+3
| | | | | | | | | | | | | | | | | | | | agents Some users may want to use authenticated SSH connections with credentials stored in a keyring, such as gnome-keyring. These typically need a DBus session bus connection, so pass DBUS_SESSION_BUS_ADDRESS into the fetcher environment. To avoid the user needing to set it in their local.conf (which wouldn't be usable) or adding it to the environment-cleansing whitelist (which would potentially impact builds) allow the variables being passed to the fetchers to come from the data store (first) or the original environment (second). >From bitbake master rev: 20ad1ea87712d042bd5d89ce1957793f7ff71da0 (Bitbake rev: 26379ff2b686313c82af87a3a35b47adbc0183be) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: main: fix processing of BBEVENTLOGEd Bartosh2016-04-191-1/+1
| | | | | | | | | | | Fixed typo that caused incorrect processing of BBEVENTLOG environment variable. Even if variable is set it was ignored by bitbake. (Bitbake rev: 2705b5f59aef4a070e2df2752d27bd04ea747057) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: lib/bb/utils: add docstring for contains()Ross Burton2016-04-181-1/+19
| | | | | | (Bitbake rev: e9174723ea6d0dff5f7f3042009761cf42284947) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: providers: Add PREFERRED_RPROVIDER supportRichard Purdie2016-04-152-23/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Sometimes you can end up in a situation where you need to specify that a specific runtime entity should be provided by a specific entry. An example of this is bluez where you could end up in a situation where for example: NOTE: multiple providers are available for runtime libasound-module-bluez (bluez4, bluez5) NOTE: consider defining a PREFERRED_PROVIDER entry to match libasound-module-bluez NOTE: multiple providers are available for runtime bluez-hcidump (bluez-hcidump, bluez5) NOTE: consider defining a PREFERRED_PROVIDER entry to match bluez-hcidump The only option here is to set something like PREFERRED_PROVIDER_bluez4 = "bluez4" which is clearly not very informative. I've actually held off adding RPROVIDER support for a long while as this does have sigificant potential for misuse. It doesn't for example allow multiple runtime providers of the same name to coexist, that simply isn't supported. It therefore doesn't replace some of the name mappings such as busybox verses coreutils that OE-Core faces as that is a different problem with different constraints. This mechanism is simply to provide bitbake with a hint to decide what the dependency tree should look like. Also, this allows us to stop printing a confusing message telling the user to set PREFERRED_PROVIDER when the setting needed would be rather ambiguous. [YOCTO #5044] (Bitbake rev: 62eb39d1474d024b204634689071700605c6095c) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: providers: We don't depend on previous build resultsRichard Purdie2016-04-151-3/+3
| | | | | | | | | | Back in history the code did depend on previous build results. This was bad for determinism and we no longer do that. Update comments to match the current behaviour. (Bitbake rev: c3fa7e561c22786d3ac57d04c367aa50f1b3b820) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: cooker/knotty: Prefix parse logs with filename being parsedRichard Purdie2016-04-152-1/+10
| | | | | | | | | | | | | We now prefix log messages coming from worker task context with the PF and task info, however parsing messages all have to be manually prefixed which is ugly and error prone. This change modifies the log handler filter so this happens automatically, meaning we don't have to change every message to include that information. This makes error messages longer but more usable. (Bitbake rev: 1af0ccaac81e182c4ca520037dda362d180e5605) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: cooker: pass exception to finishAsyncCommandRichard Purdie2016-04-151-2/+2
| | | | | | | | | | | | | | | | An invalid task causes bitbake to exit incorrectly, firing a CommandCompleted event rather than a CommandFailed one. This means that clients listening for CommandFailed events are unable to detect the build failure even though one occurred. Passing an exception string to finishAsyncCommand when a task fails causes the CommandFailed event to be fired correctly. [YOCTO #9087] (Bitbake rev: 98a2c37e077b16e3bc8bb102bd18b293130d15a4) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: runqueue: Improve 'mulitiple .bb files are due to be built' messageRichard Purdie2016-04-121-2/+70
| | | | | | | | | | | | | | | | | | | | | | | | | When multiple recipes which both provide something are being built, bitbake informs us that most likely one of them provides something the other doesn't, which is usually correct, but unfortunately it's rather painful to figure out exactly what that is. This patch dumps two sets of information, one is the provides information for each recipe, filtered so only common components are removed. The other is a list of dependees on the recipe, since sometimes this can easily identify why something is being built. Its not straightforward for bitbake to obtain the information but since the warning/error code path isn't the normal one, we can afford to go through some less than optimal processing to aid debugging. Also provide the same information even if we're showing a warning since its still useful. [YOCTO #8032] (Bitbake rev: 96fc889b8e62ba4463c71158c4b7286c48d68cd8) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: data_smart: Restrict expansion regexp to not include : charactersRichard Purdie2016-04-091-1/+1
| | | | | | | | | | | | Bitbake variables don't include ":" characters so exclude these from the variable expansion regexp. This assists when parsing shell code which does A=${B:-C} as we don't want a dependency on a variable called "B:-C". (Bitbake rev: 14ed41a292123374d94f5c786a619881f2ddea42) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: tests/utils.py: test origvalue in a callback matches what is expectedRandy Witt2016-04-091-0/+22
| | | | | | | | | | | There were no tests that verified the value of origvalue in the callback routines used by edit_metadata(). This patch adds one for a simple multiline variable. (Bitbake rev: ece3a4d02d8162dee78c2062c10291b5fd625c36) Signed-off-by: Randy Witt <randy.e.witt@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: lib/bb/utils.py: Fix a bug in edit_metadata() that could corrupt varsRandy Witt2016-04-092-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | edit_metadata() would corrupt a variable that was multiline, but had the ending quotes on the same line as the last value. For example: TEST_VAR = " foo \ bar" would become " foo ba" because the code would always delete the last character on the line and then do it again if the line ended in the quote. This however doesn't show up if you have: TEST_VAR = " foo \ bar \ " which is how all the test cases were written. This patch fixes that bug and adds and fixes a test that matched the bugs behavior rather than the expected behavior. (Bitbake rev: 14f05cbdc2ad8d59a94af1c8816567d93c39c88c) Signed-off-by: Randy Witt <randy.e.witt@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: Update version to 1.30.0Richard Purdie2016-04-061-1/+1
| | | | | | (Bitbake rev: 292bffc8412cd0ddc0c6d16e872c7801e1a67890) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: buildinfohelper: work around unicode exceptionsJoshua Lock2016-04-061-4/+6
| | | | | | | | | | | | | | | | | | | We have been seeing UnicodeDecodeErrors when handling the ImagePkgList MetadataEvent in ORMWrapper's save_target_file_information() if the event includes filenames that include non-ASCII characters. In the short term work around this by converting paths to the unicode type when passing them to Django's ORM. This is a bit of a hack but it's too late in the cycle to do anything more invasive. [YOCTO #9142] (Bitbake rev: f50fff03b3de02e73a3cc2eb9935f7c345dbddc4) Signed-off-by: Joshua Lock <joshua.g.lock@intel.com> Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toasterui: update build in internal stateEd Bartosh2016-04-061-0/+1
| | | | | | | | | | | | | | | | | | | | | | buildinfohelper stores current Build object in its internal state. Any changes to Build object will be lost if internal state is not updated as current buildinfohelper code saves Build object from internal state when build is completed. This bug causes incorrect build state when build is cancelled. Updating internal state should fix it. Note, that this commit updates internal state after status of the build is changed to Build.CANCELLED. There are several other places in the code where Build object is updated without updating internal state. They should be carefully analyzed and fixed. (Bitbake rev: d056cf40fc55530cb1736aedfb9a3c355884991e) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Michael Wood <michael.g.wood@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: buildinfohelper: fix KeyErrorEd Bartosh2016-04-061-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | When bitbake doesn't need to build anything it still sends ImagePkgList event with empty 'pkgdata', 'imgdata' and 'filedata' fields. This causes crash in buildinfohelper code as it's assumed that above mentioned fields always have data keyed by build target: ERROR: u'core-image-minimal' Traceback (most recent call last): File "toasterui.py", line 423, in main buildinfohelper.store_target_package_data(event) File "buildinfohelper.py", line 1218, in store_target_package_data imgdata = BuildInfoHelper._get_data_from_event(event)['imgdata'][target.target] KeyError: u'core-image-minimal' Fixed this by using dict.get method with empty dictionary as default return value instead of trying to get value without checking if target key is in the data. (Bitbake rev: c39cc463e6d9594bf2c5ac8bb74e834f6f2cf7c8) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Michael Wood <michael.g.wood@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: buildinfohelper: Add handler for cancelling a buildMichael Wood2016-04-061-1/+18
| | | | | | | | | | | When a build is cancelled the build (action) is complete if it has been caused the request being cancelled then update the build outcome accordingly. (Bitbake rev: d94d12914d351bf560b06d6f4e45c294b04ecaa3) Signed-off-by: Michael Wood <michael.g.wood@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toasterui: shutdown on BuildCompleted eventEd Bartosh2016-04-061-5/+8
| | | | | | | | | | | | | | | | | | | | | toasterui exits event loop on one of the following events: CommandCompleted, CommandFailed or CommandExit. Unfortunately none of them come from bitbake when build fails. This is normai if toasterui runs in observer mode. However, if it's in build mode this causes toasterui to stuck in the infinite loop waiting for new events. The only event we can rely on is BuildCompleted as it always comes from bitbake unlike 3 above mentioned events. Modified the code to always shutdown toasterui in build mode on BuildCompleted event. (Bitbake rev: 9cd60f98b13cf7b1c518851a51e1cbaa596d8f81) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Michael Wood <michael.g.wood@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: fix jethro buildEd Bartosh2016-04-061-8/+10
| | | | | | | | | | | | | | | The keys 'started', 'ended', 'cpu_time_user', 'disk_io_read' and 'disk_io_write' were added to the event recently, so they don't exist in the events generated by bitbake server from older releases. Checking if task_to_update structure has these keys before using them should fix build of older releases. (Bitbake rev: 79611d0ea742263074fbb0bf5f1e39df75fd9f55) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Michael Wood <michael.g.wood@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toasterui: fix brbe reportingEd Bartosh2016-04-061-3/+3
| | | | | | | | | | | | | | | | | buildinfohelper.brbe is lost when buildinfohelper is closed. This causes incorrect report of brbe when build is done. Saved brbe attribute before closing buildinfohelper and used it to report correct brbe. Got rid of useless and confusing 'ToasterUI build done 1' log message. (Bitbake rev: 5d7cce0d0ed70f6b3ebd6cbad300d86964a13398) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Michael Wood <michael.g.wood@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: buildinfohelper: improve handling of providermapEd Bartosh2016-04-061-2/+1
| | | | | | | | | | | | | DepTreeGenerated event doesn't contain 'providermap' data in jethro. Modified buildinfohelper to handle events without this data. This should make it possible to handle jethro events coming from jethro bitbake server by the latest buildinfohelper. (Bitbake rev: f6dcb1c9967f042beae024146781cb8235a9e1f2) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Michael Wood <michael.g.wood@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: uievent: improve BBUIEventQueue codeEd Bartosh2016-04-061-2/+8
| | | | | | | | | | | | | Return value of self.BBServer.registerEventHandler differs between jethro and master. To be able to build jethro toaster should be able to communicate with jethro bitbake server i.e. it must work with both old and new registerEventHandler call. (Bitbake rev: f356c154016c428a3b53af61a075de6f14d9d1d9) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Michael Wood <michael.g.wood@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toasterui: add brbe parameter to buildinfohelperEd Bartosh2016-04-062-3/+4
| | | | | | | | | | | | | | | | | | | In current toaster code BRBE(build request:build environment) value is passed from toaster to buildinfohelper through the 'SetBRBE' event. Passing it through environment variable is easier as it doesn't involve rpc communication between toaster and bitbake server. It also eliminates the need in running bitbake observer process. Added parameter 'brbe' to BuildInfoHelper.__init__ Used environment variable TOASTER_BRBE to set brbe for buildinfohelper object. (Bitbake rev: a0c8e2b309055e5927a8ff729d292ccaa69d0575) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Michael Wood <michael.g.wood@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: fetch2/git.py: remove .indirectiondir workaroundRobert Yang2016-04-061-17/+1
| | | | | | | | | | | It was used for workaround git 1.7.9.2 which was released in 2012 which should not be existed on nowadays host, so remove it to avoid confusions. (Bitbake rev: 6140d0cc9aecf1029ca16fed47071dfcc92f4269) Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: persist_data: Return str instead of unicode for sqlite3 text queriesKlauer, Daniel2016-04-061-0/+1
| | | | | | | | | | | | | | | | | | Python 2's sqlite3 module defaults to returning Unicode strings for SQL text queries, which could trickle down to other parts of bitbake code and cause unexpected Unicode conversions. Using byte strings avoids this issue. For example, the git fetcher's AUTOREV support caches HEAD SHA1's using bb.persist_data, so sometimes the git command strings passed to fetch2's runfetchcmd() were unicode, potentially causing UnicodeDecodeErrors when it appended the values of environment variables containing non-ASCII chars. [YOCTO #9382] (Bitbake rev: 09623a0811c613a47a01ae465b822d8156faca30) Signed-off-by: Daniel Klauer <daniel.klauer@gin.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: siggen: Ensure tainted stamps are accounted for with writing custom ↵Richard Purdie2016-04-031-3/+7
| | | | | | | | | | | stamps sstate.bbclass for example writes siginfo files to a separate location but we need to read taint data from the standard path. (Bitbake rev: da444c9761ee15a59ea8880e3f812a5d3f1a1aaa) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: siggen: Fix nostamp taint handlingRichard Purdie2016-04-031-3/+7
| | | | | | | | | | | The taint values need to be passed from the server to the workers to ensure they see the same stamp values. Also ensure that the "nostamp:" prefix isn't included in the checksum value to match the server calculation. This ensures the checksums are all consistent. (Bitbake rev: f80ba20e90f3746f7faee3e0ff7f249025fec8ee) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: siggen: Add checksum recalculation/checking codeRichard Purdie2016-04-031-11/+49
| | | | | | | | | | | | | | | | | | | | | | | | | | In theory all the information to recalcuate the task signatures was written into the siginfo/sigdata files. In reality, some of the information was written into the filename. Firstly this patch duplicates that info into the file itself just for easy of use since its small. Secondly, we abstract out the existing "calculate the checksum" code for the taskhash, and add a function to calculate the bashhash based on the informaiton within the file. Finally, we call these functions when we're writing out the data to check that the data we're writing is consistent. I've found a couple of places it wasn't and its good to know about these in advance, rather than having a siginfo/sigdata file which a given hash in its filename but a contents which give a different result. This should all combine to avoid a certain class of checksum bugs making it into world, and identifying problems in advance. (Bitbake rev: 0f50a18d7a0ea0d68edd8e5217e29111f4b1ea0b) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: siggen: Fix check calculation problem with file_checksumsRichard Purdie2016-04-031-3/+4
| | | | | | | | | | | | When I enabled debugging of the checksum code, I found the value calculated from siginfo/sigdata files for do_fetch tasks never matched. This was due to an error in the way the data was being stored for these, it wasn't ordered correctly. This patch fixes things so the checksums calculated from siginfo/sigdata files is correct when file checksums are present. (Bitbake rev: 046c1be7594fae2eec3d1f242ba3e9a85f1a1880) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: siggen: Drop misleading duplicate methodRichard Purdie2016-04-031-3/+0
| | | | | | | | | The real method is a few lines later, this one is incorrect and just causing confusion. Remove it. (Bitbake rev: a896f263300f069400eae533be0daf5dedf41c95) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: tests/fetch.py: Improve unit tests for trusted network checkOlof Johansson2016-04-031-35/+42
| | | | | | | | | | | | The tests were skipped when running without network even though they didn't require network. This commit also adds a test case for URLs with ports in them (the ports should not be considered when doing trusted network checks). (Bitbake rev: 77747de6b20538063eef3b188489a35bef225359) Signed-off-by: Olof Johansson <olof.johansson@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: fetch2: BB_ALLOWED_NETWORKS should not care about port numbersOlof Johansson2016-04-031-0/+1
| | | | | | | | | | | | | | | | | Bitbake would fail to classify the following URL as belonging to a allowed network, because of the port number in the url. BB_ALLOWED_NETWORKS = "*.example.com" SRC_URI = "http://git.example.com:8080/foo.tar.gz" Since protocols aren't specified in the BB_ALLOWED_NETWORKS variable, it's reasonable to believe that this should work regardless of protocol being used. (Bitbake rev: ff603df23037e10fb2cfdf150429cba3f65072cd) Signed-off-by: Olof Johansson <olof.johansson@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: buildinfohelper Add additional metadata to the built layerMichael Wood2016-04-031-11/+23
| | | | | | | | | | | | | | | | | Add additional metadata to the layer created for build history to be able to identify the layer and recipe later on. Specifically this is the branch and release to which the recipe and layer are associated with enabling differentiation of two recipes which are local release and master and 'master' release. [YOCTO #8528] [YOCTO #8545] (Bitbake rev: 3deebd887bddbbd02fd9829a180aab494b1af7c4) Signed-off-by: Michael Wood <michael.g.wood@intel.com> Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: cookerdata.py: remove slash in the endRobert Yang2016-03-311-0/+2
| | | | | | | | | | | | | | | It's very possible that we added layer as: BBLAYERS += "/path/to/meta/" then there would be warning: WARNING: No bb files matched BBFILE_PATTERN_core '^/path/to/meta//' This patch can fix the problem. (Bitbake rev: 2b1cb21d18fb18399e682021b866babeced9a4aa) Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: Bump version to 1.29.1Richard Purdie2016-03-311-1/+1
| | | | | | (Bitbake rev: 2f6be16c274974be5eb07641374d691ef049fe76) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: build/utils: Allow python functions to execute with real exception ↵Richard Purdie2016-03-312-5/+14
| | | | | | | | | | | | | | | | | | handling With the code as it stands today it not possible to execute a python function and get "normal" python exception handling behaviour. If a python function raises an exception, it forces a traceback to be printed and the exception becomes a FuncFailed exception. This adds in a parameter 'pythonexception' which allows standard python exceptions to be passed unchanged with no traceback. Ultimately we may want to change to this convention in various places but at least it means we can start to add sane functions now. (Bitbake rev: 85cf22fd0ed26bb7dc7738ef2a10441891f38ae2) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: fetch2: Ensure that incorrect checksumed files are always renamedRichard Purdie2016-03-311-8/+21
| | | | | | | | | | | | | | There are some codepaths where the file checksum is verified and can be found to mismatch but the 'rename' logic doesn't kick in. If code relies on the presence of a file for the checksum having been checked (e.g. uninative.bbclass) then it can be used when the checksum hasn't matched. Therefore rename the file whenever an invalid checksum is encountered. (Bitbake rev: 69ef6c8a9db02bfa0e3fac72481ec26586a29a01) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: cooker: fix CookerParser.shutdown()Markus Lehtonen2016-03-311-1/+0
| | | | | | | | | | | | | | Prevent a hang when shutdown() is called during parsing (e.g. after SIGINT). We must not append 'None' to the jobs queue. Otherwise the worker loop inside Parser.realrun() may break out at the wrong point, causing the results queue thread blocking bitbake indefinitely. [YOCTO #9319] (Bitbake rev: 7ebea3e9a60232222efa8a546a0ff28a53029949) Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>