aboutsummaryrefslogtreecommitdiffstats
path: root/bitbake
AgeCommit message (Collapse)Author
2016-05-20bitbake: toaster-tests: tests for project configSujith H
Add basic tests to validate the value user types in the text box for IMAGEFS_TYPES. Added a test case to show the checkbox get automatically selected when user types value available in the check list. Added a test case to verify if the check box is enabled then the text box should also get updated accordingly. [YOCTO #7828] (Bitbake rev: 62c74eb38f44d98b40427edf56e40785b076a938) Signed-off-by: Sujith H <sujith.h@gmail.com> Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-05-20bitbake: toaster: projectconf Small tweaks to IMAGE_FSTYPES formBelen Barros Pena
Add a label to clarify the purpose of the first input field, replace <p> with <label> for the second set of controls, and give some top margin to the validation message. (Bitbake rev: 99b1b52fe4f2b593d7835d2db64eb028ed42600a) Signed-off-by: Belen Barros Pena <belen.barros.pena@linux.intel.com> Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-05-20bitbake: toaster: handle multiple imagefs typesSujith H
This functionality helps users to add custom image fs types available other than the checkboxes in the UI. User can add imagefs types in the text box and use them in the build. [YOCTO #7828] (Bitbake rev: c14cbb026598be064f08f46bb513456c7a3089f5) Signed-off-by: Sujith H <sujith.h@gmail.com> Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-05-19bitbake: cooker: Improve taskgraph file handlingRichard Purdie
Use open() instead of file() and close files when finished with them. (Bitbake rev: 033c5a16ff19781ed793c2d97d285884017a2a4e) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-05-19bitbake: codeparser: Increase cache version after code parser dependency changesRichard Purdie
(Bitbake rev: 4d880f1d5794f569b6eb5f6e7e3001dd671633c0) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-05-19bitbake: bb.codeparser: track variable flag referencesChristopher Larson
Previously we only tracked the flags (minus excluded) of variables we depend on, but not the flags we use explicitly. (Bitbake rev: bdeb3dcd7c92e62a7c079e7b27048c4114f24a3a) Signed-off-by: Christopher Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-05-19bitbake: Provide LAYERDIR_RE for layer.confChristopher Larson
This variable is a regex-escaped version of LAYERDIR, for safer use in BBFILE_PATTERN, so as to avoid issues with regex special characters in the layer path. [YOCTO #8402] (Bitbake rev: 72900522778b6ff08b135bf8bb97dff3f1a20bd9) Signed-off-by: Christopher Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-05-19bitbake: cache: Increase cache version after task checksum calculation changesRichard Purdie
(Bitbake rev: 6df0425a9d5c4c520eb7845d8f6175d9641779a7) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-05-19bitbake: Implement support for per-task exportsChristopher Larson
(Bitbake rev: 4506ccf1495c6ed6e8ed678f4baa166bc94d1761) Signed-off-by: Christopher Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-05-19bitbake: bb.cooker: show limited traceback for parsing ExpansionErrorChristopher Larson
It's useful to see tracebacks for ExpansionErrors, but only if we skip the leading bitbake-internal elements, otherwise we see elements of the expansion process. As one example: Before: ERROR: ExpansionError during parsing /scratch/yocto-new/external-as-needed/poky/meta/recipes-core/glibc/glibc-locale_2.23.bb: Failure expanding variable PV[:=], expression was ${@get_external_libc_version(d)} which triggered exception AttributeError: 'module' object has no attribute 'external' After: ERROR: ExpansionError during parsing /scratch/yocto-new/external-as-needed/poky/meta/recipes-core/glibc/glibc-locale_2.23.bb Traceback (most recent call last): File "PV[:=]", line 1, in <module> File "/scratch/yocto-new/external-as-needed/meta-sourcery/recipes-external/glibc/glibc-external-version.inc", line 3, in get_external_libc_version(d=<bb.data_smart.DataSmart object at 0x7f05d2566950>): sopattern = os.path.join(d.getVar('base_libdir', True), 'libc-*.so') > found_paths = oe.external.find_sysroot_files([sopattern], d) if found_paths: ExpansionError: Failure expanding variable PV[:=], expression was ${@get_external_libc_version(d)} which triggered exception AttributeError: 'module' object has no attribute 'external' (Bitbake rev: 7ff5b9eed82b7f4fd138fc6d746a0b79efbea98a) Signed-off-by: Christopher Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-05-17bitbake: bitbake-layers: convert to plugin-basedChristopher Larson
This uses bb.utils.load_plugins, based on the plugin handling in recipetool and devtool in oe-core. (Bitbake rev: 5e542df9b966a99b5a5b8aa7cf6100174aff54b2) Signed-off-by: Christopher Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-05-17bitbake: knotty: Fix output buffering issuesRichard Purdie
We need to flush the footer removal, else it may not be outputted until the buffer is flushed as part of StreamHandler and this would lead to it removing the ERROR output just printed which is extremely confusing. Also ensure the footer is cleared before printing a summary as in some cases it wasn't being removed, also leading to user confusion. (Bitbake rev: 0e030c4d074c41859608dab5f3ad26b05f56b306) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-05-17bitbake: siggen: Fixes to handle sigdata/siginfo files only containing ↵Richard Purdie
basehash data The signature data file comparison functions are meant to be able to handle data files containing just the base hash data. This had regressed in some places so add fixes to allow these comparisons to be made. The runtime components in the data files are optional. (Bitbake rev: 2a6659fd748e255a02c2f9d047829d6edfe65317) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-05-17bitbake: toaster: don't show "Rebuild" button for cancelled cli buildsElliot Smith
[YOCTO #8515] (Bitbake rev: 71a45c600e47af5a19412bc3c5a9ba242bfb4638) Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: Michael Wood <michael.g.wood@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-05-17bitbake: toasterui: capture keyboard interrupts the same way as knottyElliot Smith
knotty captures two levels of keyboard interrupt: a single interrupt or two interrupts in a row. These then trigger stateShutdown and stateForceShutdown respectively. toasterui doesn't have an equivalent way of capturing interrupts and using them to shut down bitbake. Now that we are no longer using knotty + XMLRPCServer for our command line builds (since switching to per-project build directories), we see some odd side effects of this, such as builds continuing after they have been interrupted on the command line. Bring toasterui in line with knotty (copy-paste most of the code in knotty.py which deals with interrupts) so that a keyboard interrupt actually shuts down the bitbake server (if not in observe only mode). Additionally use the cancel_cli_build() method to set the Build status to CANCELLED in Toaster's db when we get keyboard interrupts. This means that builds interrupted on the command line show as cancelled (same as if they'd been cancelled from the Toaster UI), as specified in the UI designs. [YOCTO #8515] (Bitbake rev: d39d2edca95900da433074ee95a192d7bfe7090d) Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: Michael Wood <michael.g.wood@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-05-17bitbake: buildinfohelper: add method to set current build as CANCELLEDElliot Smith
This will be used from toasterui to cancel the current command-line build when a keyboard interrupt is captured. [YOCTO #8515] (Bitbake rev: 1486c770327b53bb5e04baa5f3ea26d8154aed63) Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: Michael Wood <michael.g.wood@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-05-17bitbake: toaster: toastergui tests Fix toastertable testsMichael Wood
After clean ups remove api assumptions. Our table data often contains html snippets to display certain things such as dependency pop overs or simply links to other parts of the UI. Take these into account when testing the values of the table data. (Bitbake rev: 7f61a68f2caba538e302ca9c2727bb43a6c77c64) 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>
2016-05-17bitbake: toaster: toastertables: Clean up and fix up a number of itemsMichael Wood
- Remove the unused 'computation' field - Remove the code to try to make the tables behave like an api - Remove custom JSON encoder in favour of DjangoJSONEncoder - Simplify get_data and add comments - Add exception type instead of using generic Exception - Clean up python style warnings (Bitbake rev: 16d8198e8f6668c5fa5467ff4bda86c5d66a6cad) 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>
2016-05-14bitbake: toaster: use new syntax of except statementEd Bartosh
Used except 'except (<exception1>, <exception2>):' syntax as it's supported by python 2 and pythone 3. Old syntax 'except <exception1>, <exception2>:' is not supported by python 3. [YOCTO #9584] (Bitbake rev: d19e305ffa44a848b02ede63dc5de8d2640089e6) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-05-14bitbake: toaster: use print function in toaster scriptEd Bartosh
Used print() function instead of print statement to make toaster script to work with both python 2 and python 3 [YOCTO #9584] (Bitbake rev: 09d37ee51219edcd0be6fd24c82fce392533b39b) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-05-14bitbake: toaster: use 'in' instead of has_keyEd Bartosh
Dictionary method has_key is deprecated in python 2 and absent in python 3. Used '<key> in <dict>' statement to make the code working on both python 2 and python 3. [YOCTO #9584] (Bitbake rev: 3d7ad7ba0d1a6f688ae885817c049f2a8ced11b5) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-05-14bitbake: server/process: Fix missing log messages issueRichard Purdie
Currently if the server dies, its possible that log messages are never displayed which is particularly problematic if one of those messages is the exception and backtrace the server died with. Rather than having the event queue exit as soon as the server disappears, we should pop events from the queue until its empty before exiting. This patch tweaks that code so that even if the server is dead and we're going to exit, we return any events left in the pipe. This makes debugging certain failures much easier. (Bitbake rev: 29f6ade68fb2b506a23a7eb3a00cdcffa291b362) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-05-14bitbake: cooker/toasterui: Drop SEND_DEPENDS_TREE UI featureRichard Purdie
Now the event is sent unconditionally we can drop this feature as its no longer needed. (Bitbake rev: 473deeb0fc6065693e1fcfcbb8b79753103db537) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-05-14bitbake: runqueue.py: always emit bb.event.DepTreeGeneratedPatrick Ohly
The data included in the event is useful for implementing a pre-build check that warns about unexpected components, for example because of an incorrect configuration or changed dependencies. Such a check can be done in a .bbclass that gets inherited globally. But in contrast to a UI, such a class cannot request that the event shall be emitted, and thus the event has to be emitted whether there is a consumer or not. This was done conditionally earlier out of concerns about the performance impact. But now events are handled more efficiently, so that concern no longer seems valid: in some simple testing (admittedly on a fast build workstation), the two lines (generating the data and emitting the event with it) only took about 0.05 seconds (measured with timeit). That was for a build with roughly 500 recipes (from pn-buildlist aka depgraph['pn']), triggered via the command line. That was even with a consumer of the data active and doing some work, so it should be even faster when there is no consumer. (Bitbake rev: 5ddaf5b7ed1001d2dd3f67e7a6d704afa85479d2) Signed-off-by: Patrick Ohly <patrick.ohly@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-05-13bitbake: toaster: fix progress bar in MySQL environmentElliot Smith
When using MySQL, the project builds info delivered by MySQL differs from that delivered by SQLite: the former returns text values from the enumeration for Build outcomes, while the latter returns the integer value. This causes the progress bar JS to break, as it is expecting outcome strings. Modify the recent_build() method to include an outcomeText property for each Build object, then use this in the conditionals in the progress bar JS. [YOCTO #9498] (Bitbake rev: 7ac374adf1cc70173ff6cc492bc078bba1cf500b) Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: Michael Wood <michael.g.wood@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-05-13bitbake: main: Ensure exceptions are correctly displayedRichard Purdie
If the cooker fails to start, ensure a correct exception is displayed to the user. After handling any queued events simply re-raise the original exception else the output can be unclear. (Bitbake rev: 9a4db1aa608c17d31bf5ea1cab5a99beb565dd83) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-05-13bitbake: cookerdata: Fix log messages and ensure we exitRichard Purdie
The string formatting wasn't correct and we should exit if we hit errors here similar to the other exception handlers. (Bitbake rev: b90a16408a5c45ce5312384f278e19d09f8dda4d) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-05-13bitbake: event/msg: Pass formatted exceptionsRichard Purdie
python3 can't cope with the previous approach we were using to pass exceptions through the RPC. Avoid this by creating a formatted exception on the sender side. (Bitbake rev: d7db75020ed727677afbad07a90fb3eac0bf2c45) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-05-13bitbake: fetch: Use OrderedDict for url parametersRichard Purdie
Without this, the dict can reorder causing sanity test failures. (Bitbake rev: ca8c91acc9396385834b266d4e8b84d917e5e298) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-05-13bitbake: main: Change warn() -> warning()Richard Purdie
This avoids a deprecation warning in python 3. (Bitbake rev: bf1a92d0c002d73e8a34472dced1343dc4a4251a) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-05-13bitbake: cooker: Fix log message syntaxRichard Purdie
Ensure we pass the string parameter correctly. (Bitbake rev: 7ed82bd1fe7bdd93b0614119c42eb218dc5d83e6) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-05-13bitbake: utils: Force bitbake to en_US.UTF-8 locale setting everywhereRichard Purdie
Under python 3, if we spawn python processes, we need to have a UTF-8 locale, else python's file access methods will use ascii. You can't change that mode once the interpreter is started so we have to ensure a locale is set. Ideally we'd use C.UTF-8 since OE already forces the C locale but not all distros support that and we need to set something. Was tempted to choose en_GB so colour gets spelt correctly :). This is in some ways pretty nasty, forcing it into the environment everywhere however we only have a limited number of ways of making everything work correctly and this beats having to add utf-8 encoding to every file access command. A similar change will be needed to bitbake.conf in OE. (Bitbake rev: 8902c29638411d312e6fc4a197707e5742652e15) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-05-13bitbake: bin/bitbake-worker: Fix invalid bb.msg.fatal usageRichard Purdie
The logging domain specified to bb.msg.fatal was invalid. Replace with a logger.critical() call instead. (Bitbake rev: 1ffd8737e065a3cd634c74cd67e634d785ea93a5) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-05-13bitbake: contrib/dump_cache.py, cache: Fix to use python 3 syntaxRichard Purdie
Some tweaks to use python 3 syntax in a python 2 compatible way. (Bitbake rev: 322949c77dbaa4db01b5a43d85b39a2af67ba7b2) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-05-13bitbake: knotty: Ensure consolelog file handle is closedRichard Purdie
If we don't close the console log file handle, python prints a warning about unclosed file handles upon exit which is annoying. (Bitbake rev: 624dd92952b2fc736fd86abe5f2390b87b3a7dd3) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-05-13bitbake: runqueue: Improve timestamp comparisonsRichard Purdie
python3 cares more about invalid type comparisons. Add break statements and better tests to make the code paths clearer and avoid type issues in python3. No code functionality change. (Bitbake rev: 2c39ebdd2762d027f007a6a769fdf023cdf3da2b) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-05-13bitbake: daemonize/prserv/tests/fetch: Convert file() -> open()Richard Purdie
Use python3 compatible functions. (Bitbake rev: e6a0296ba29c3fbc8417d1df7a01d50562668a41) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-05-11bitbake: toaster: tests browser Add test for creating a projectMichael Wood
Add browser tests for creating a project and test validation of duplicate project names. (Bitbake rev: 8055fbe840db426d6859ee2248f86abd44244b30) Signed-off-by: Michael Wood <michael.g.wood@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-05-11bitbake: toaster: models Add missing import sysMichael Wood
(Bitbake rev: b2fba7a0820d77e1076c05b8ffcd960d4fc883a5) Signed-off-by: Michael Wood <michael.g.wood@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-05-11bitbake: toaster: ui handles duplicate project name in project pageSujith H
When already existing project name is typed by user, the ui pops up message regarding the existance of the project name. When an existing project is typed the save button will be disabled. Else user can proceed ahead by modifying the project name. [YOCTO #7005] (Bitbake rev: 05ddf48cda6690adab4c097b16387578523e751b) Signed-off-by: Sujith H <sujith.h@gmail.com> Signed-off-by: Michael Wood <michael.g.wood@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-05-11bitbake: toaster: ui handles duplicate project name in new project pageSujith H
When already existing project name is typed by user, the ui pops up message regarding the existance of the project name. [YOCTO #7005] (Bitbake rev: 83e5be7e74850f1bb019668de07f3f745063fe38) Signed-off-by: Sujith H <sujith.h@gmail.com> Signed-off-by: Michael Wood <michael.g.wood@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-05-11bitbake: toaster: projectNameValidation API addedSujith H
The projectNameValidation API would help users to validate if a project name exists or not. This API is added to libtoaster. [YOCTO #7005] (Bitbake rev: 3b1843553f23d78f1ddfec9f7865895ee42356a3) Signed-off-by: Sujith H <sujith.h@gmail.com> Signed-off-by: Michael Wood <michael.g.wood@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-05-11bitbake: runqueue: Fix missing fakeworker under dry runRichard Purdie
We shouldn't try and use fakeworker when performing a dry_run. This makes the core match the other fakeworker execution points. (Bitbake rev: 49bea821a2edad5e19c3a566d1a80c23718dede9) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-05-11bitbake: lib/bb/utils.py: Fix explode_dep_versions2() determinism issueRichard Purdie
When we pass data into explode_dep_versions2(), we need to result to be able to be processed in a deterministic way so that we end up with consistent hash values. This means we need an ordered structure rather than an unordered one. To do this, return an OrderedDict() rather than a dict(). (Bitbake rev: 0737e003ca549d08a7dfe13452ae982f2e11fecd) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-05-11bitbake: bin, toaster: Fix print and exception syntaxRichard Purdie
This updates the print "" syntax to print() and fixes some exception handling syntax such that its compatible with python v2 and v3. (Bitbake rev: 58304fcce9727fd89564436771356c033ecd22a3) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-05-11bitbake: tests: assertEquals -> assertEqualRichard Purdie
The preferred form is assertEqual, assertEquals is deprecated and not present in python v3. This is v2.7 safe. (Bitbake rev: b60261bf8ade14aca31238b50c243c01adcabc59) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-05-11bitbake: bitbake: Update logger.warn() -> logger.warning()Richard Purdie
python deprecated logger.warn() in favour of logger.warning(). This is only used in bitbake code so we may as well just translate everything to avoid warnings under python 3. Its safe for python 2.7. (Bitbake rev: 676a5f592e8507e81b8f748d58acfea7572f8796) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-05-06bitbake: bb.{cooker, data}: only emit a var as python if 'func' is setChristopher Larson
This avoids a common issue where PACKAGECONFIG is emitted as a function in bitbake -e when the 'python' flag exists. It isn't a python function unless both 'func' and 'python' are set. This aligns with the behavior of emit_func_python. (Bitbake rev: c5e45063cb3ae17bbe3304ea5e712bd76e686c4a) Signed-off-by: Christopher Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-05-06bitbake: bb.utils: let loaded plugins provide a plugin objectChristopher Larson
This lets us avoid treating the module like an object, so no globals are needed, if one chooses to do so. (Bitbake rev: 71bfd5beb0d0ed88c7c14bbfd5ca1a1b56122bc1) Signed-off-by: Christopher Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-05-06bitbake: bb.utils: use imp.get_suffixes for load_pluginsChristopher Larson
Rather than hardcoding .py, use python's knowledge of its file extensions. (Bitbake rev: 09f838dbaefdaedc01a1f4818ed38280b38db744) Signed-off-by: Christopher Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>