summaryrefslogtreecommitdiffstats
path: root/bitbake
Commit message (Collapse)AuthorAgeFilesLines
...
* bitbake: toaster: bump django version to match build toolsDavid Reyna2018-10-181-1/+1
| | | | | | | | | | | | The version of django in the 2.6 release got bumped to 1.11.14. The toaster requirements file needs to be updated to accept it. [YOCTO #12958] (Bitbake rev: b081b78a330fee30b172c2c8bdc9c196a65be9af) Signed-off-by: David Reyna <David.Reyna@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: bad link for distro conf fileDavid Reyna2018-10-182-6/+4
| | | | | | | | | | | | The distro source path link is missing "conf/distro/", and the display is using the machine link instead of the distro link. [YOCTO #12957] (Bitbake rev: e43ff061b03878057e49c44aa3ee2e4c7a5d5503) Signed-off-by: David Reyna <David.Reyna@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: data: Fix whitespace on _remove operationsRichard Purdie2018-10-183-9/+22
| | | | | | | | | | | | | | | | | | | | We have some slightly odd behaviours with the current implementation of _remove operations. For example: TEST = " A B" TEST_remove = "C" would trigger TEST to become "A B" even thought it doesn't contain "C". In particular, this means that an inactive remove operator added in a bbappend could change the task checksum which is not desireable. Fix the operation to preserve whitespace, adding new tests to make this explict and test further corner cases. Also update the manual to match. (Bitbake rev: c0a23dd9155c50a6b7df796980bc7b612cac7994) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: data_smart: Preserve history when renaming variablesRichard Purdie2018-10-181-0/+11
| | | | | | | | | | | | | Currently when a variable is renamed, all the variable history is lost. This makes it hard for users to understand/debug where values came from. Improve the code so that history is preserved across renamed variables. (Expanded variable key names are a special case of variable renaming) (Bitbake rev: 11722c989077a8751a5d0653c523760bf91e6efa) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: main: Fix environment handling for UI module importsRichard Purdie2018-10-101-3/+4
| | | | | | | | | | | | | | | The environment was being cleared before the UI imports occurred which caused problems for graphical UIs like taskexp. The full environment was intended to be available to UI clients and it was only meant to be cleared for the server/cooker, so tweak the code order so this is the case. This fixes problems reported for taskexp. [YOCTO #12670] (Bitbake rev: ac15028391fdcc3fec2dd0e64a4f763ce63e5449) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: gitsm: Allow relative URIs when fetchingMark Hatle2018-10-041-0/+5
| | | | | | | | | | | Some repositories may specify a relative submodule path. If this happens, it is our responsibility to use the parents URL (ud) and handle any relative processing ourselves. (Bitbake rev: fd9893c338df7828b2c01f1d548aa86dfcf7c50a) Signed-off-by: Mark Hatle <mark.hatle@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: fetch2/gitsm: checkout submodules recursivelyLaurent Bonnans2018-10-041-30/+38
| | | | | | | | | The new fetcher did not run 'git submodule update' recursively. (Bitbake rev: 377ed943357b6d47d41d84edbf971741f44affa9) Signed-off-by: Laurent Bonnans <laurent.bonnans@here.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: fetch2/gitsm: handle submodules nested inside subdirsLaurent Bonnans2018-10-041-6/+9
| | | | | | | | | | | | | | The new gitsm fetcher assumed that submodules were living directly in the 'modules' directory, whereas they can be arbitrarily nested inside subdirectories. Solve it by first creating the parent of the destination directory for the symlink and copy steps. (Bitbake rev: 3dbc84e9c572f43209b79f3656d7dc35a6d982ba) Signed-off-by: Laurent Bonnans <laurent.bonnans@here.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: custom image enable layer add, protect pre-cloned layersDavid Reyna2018-10-045-5/+23
| | | | | | | | | | | | | | | When creating custom image recipes, the layer add for new layers needs missing xhrLayerUrl data. Also, code is needed to check and inform user if the newly added layer has not been cloned yet, and provide helpful error message instead of the current frozen dialog. [YOCTO #12887] (Bitbake rev: b310031972a53d0881a87a627f07bdcf7d9c6b79) Signed-off-by: David Reyna <David.Reyna@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: disable git remote check to allow for firewallsDavid Reyna2018-10-041-2/+5
| | | | | | | | | | | | | | | | | | | Toaster users behind firewalls that block "git" access usually require developers to add remap rules in their "~/.gitconfig" to remap GIT accesses to HTTP* access. However, there is a "git remote" test in Toaster that is not aware of such remaps, resulting in a false error. For now, disable this nice-to-have check to support this release, and re-enable when we can add remapping accommodations for this test. [YOCTO #12944] (Bitbake rev: abccd40536b366a418802c5ba8427454c2e3bb2c) Signed-off-by: David Reyna <David.Reyna@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: add 'thud' release to ToasterDavid Reyna2018-10-042-11/+11
| | | | | | | | | | | Toaster needs to include new YP-2.6 "Thud" release. [YOCTO #12943] (Bitbake rev: 97be301c87a29921b6d9e5029928f8a2871ed127) Signed-off-by: David Reyna <David.Reyna@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: error logs missing for cli buildsDavid Reyna2018-10-041-4/+5
| | | | | | | | | | | | | The method 'store_log_event' in 'buildinfohelper.py' always puts log messages from CLI builds into the backlog but never takes them out. The "close" method now forces all backlogged CLI events to be registered. [YOCTO #12813] (Bitbake rev: 6458cc4234337f551dfe189b6f8800d8da886c24) Signed-off-by: David Reyna <David.Reyna@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: fetch2/gitsm: fix a typoLaurent Bonnans2018-10-041-1/+1
| | | | | | | | | 'qbareclone' in place of 'bareclone' (Bitbake rev: 90a3181f1397ae05862f4e89a9bbac606e74504e) Signed-off-by: Laurent Bonnans <laurent.bonnans@here.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: fetch2/git: use correct check to decide if the shallow tarball ↵Urs Fässler2018-10-041-1/+1
| | | | | | | | | | | | | should be unpacked The shallow_tarball check is never true due a check on the caller side. The tarball check is not related to the code on the caller side. (Bitbake rev: 086eddcf8c7520ff5c52ce2a11ca9bf5b5fe5d7e) Signed-off-by: Urs Fässler <urs.fassler@bbv.ch> Signed-off-by: Pascal Bach <pascal.bach@siemens.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: fetch2/git: prevent access to non-existing fullshallow tarballUrs Fässler2018-10-042-1/+15
| | | | | | | | (Bitbake rev: b7f00a8c11672a2ee0408e210fb174cda3384e3f) Signed-off-by: Urs Fässler <urs.fassler@bbv.ch> Signed-off-by: Pascal Bach <pascal.bach@siemens.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: fetch2/git: improve readability of method need_updateUrs Fässler2018-10-041-4/+9
| | | | | | | | | | | To improve the readability we extract the different scenarios of why the clonedir needs an update. (Bitbake rev: 9038e029f4f0ab413727de76c74248cbb3cdc9ea) Signed-off-by: Urs Fässler <urs.fassler@bbv.ch> Signed-off-by: Pascal Bach <pascal.bach@siemens.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: bitbake-user-manual: Added section on multicong dependenciesScott Rifenbark2018-10-041-0/+76
| | | | | | | | | | | Created a new section to show how to handle dependencies when you are doing a multiple configuration build. Put it in the "Examples" section. (Bitbake rev: fa42212a6cb7b64add4d6ca0f723a95c908c6b87) Signed-off-by: Scott Rifenbark <srifenbark@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: bitbake-user-manual: Added BBMULTICONFIG supportScott Rifenbark2018-10-042-7/+58
| | | | | | | | | | | | The BBMULTICONFIG variable is a variable used for BitBake and was not documented in the BitBake Manual glossary. I added the definition. I also added the variable to the example in the section describing how to execute builds for multiple configurations. (Bitbake rev: 836f994ec530ba82c935cb41e006d1f128885dc2) Signed-off-by: Scott Rifenbark <srifenbark@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: bitbake-user-manual: Added new section on multiconfig buildsScott Rifenbark2018-10-042-0/+69
| | | | | | | | | | Created a new example. Also added a figure for the separate configuration file hierarchy (Bitbake rev: f2d432674b187685591f60cec3b2980b377c63fe) Signed-off-by: Scott Rifenbark <srifenbark@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: test/fetch: use canonical GitLab URLsRoss Burton2018-10-041-2/+2
| | | | | | | | | | | GitLab returns a redirect from /foo to /foo.git which older releases of Git don't handle when cloning. These tests don't clone so the redirect works, but let's be consistant with the structure of these URLs and add the .git suffix. (Bitbake rev: d47febbae4ff24be259037f12bafbc14b9e2d6a8) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: fetch2/gitsm.py: Rework the git submodule fetcherMark Hatle2018-09-262-123/+159
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The prior fetcher did not know how to work with MIRRORS, and did not honor BB_NO_NETWORK and similar. The new fetcher approach recursively calls 'gitsm' download on each submodule detected. This ensures that it will go throug the standard download process. Each downloaded submodule is then 'attached' to the original download in the 'modules' directory. This mimics the behavior of: git submodule init but there is no chance it will contact the network without permission. It then corrects upstream reference URIs. The unpack steps simply copies the items from the downloads to the destdir. Once copied the submodules are connected and we then run: git submodule update According to the git documentation, git submodule init can and will modify the project configuration and may connect to the network. Doing the work manually prevents this. (This manual process is allowed based on my reading of the documentation.) See: https://git-scm.com/book/en/v2/Git-Tools-Submodules The small change to the existing test is due to this new code always assuming the code is from a remote system, and not a 'local' repository. If this assumption proves to be incorrect -- code will need to be added to deal with local repositories without an upstream URI. (Bitbake rev: 9c6b39adf9781fa6745f48913a97c859fa37eb5b) Signed-off-by: Mark Hatle <mark.hatle@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: lib/layerindexlib/tests/restapi.py: Fix test cases when ↵Mark Hatle2018-09-261-77/+87
| | | | | | | | | | | | | | | BB_SKIP_NETTETS=yes Change the way the network related tests are skipped, based on how the fetch tests are handled. We introduce a 'skipIfNoNetwork()' function that will report skipped tests through the standard unit test reporting system. [YOCTO #12928] (Bitbake rev: 7d5af23d560b38fb5558d4ac51c3c9611d6d904f) Signed-off-by: Mark Hatle <mark.hatle@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: lib/bb/tests/parse.py: Test case was changing chdirMark Hatle2018-09-261-0/+4
| | | | | | | | | | The test case was changing the current directory, but was never restoring it to the original location. This causes occasional failures in later test cases. (Bitbake rev: 8c222c45148d1f21c2390d66ddd9d3e33b397f05) Signed-off-by: Mark Hatle <mark.hatle@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: lib/layerindexlib/tests/cooker.py: Fix topdir to use an absolute ↵Mark Hatle2018-09-261-1/+1
| | | | | | | | | | | | | (real) path The test case needs to access test case files. Different versions of python may return absolute or relative locations in __file__. Use the same approach as other test cases in determining the location of the test files. (Bitbake rev: 80fe44889a858bddaca230c2d49ccabfcbc236a3) Signed-off-by: Mark Hatle <mark.hatle@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: utils: lockfile: Fix infinite loopIoan-Adrian Ratiu2018-09-251-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | A nasty corner case leads to a hang when utils.lockfile is called from oe-core's package-manager:deploy_dir_lock (in turn called from rootfs:_create further up the call stack) with "name" owned by root and the user running bitbake has no write access. Because this code runs under pseudo, the UID and EUID of the bitbake worker process are 0, so the os.access(dirname, os.W_OK) returns True i.e. it thinks the path is writable when in fact it's not writable. Only later when trying to open the file an Exception it thrown because the OS prohibits writing, but the Exception is ignored and the open is retried leading to an infinite loop. So this fix is to not ignore the "Permission Denied" exception. An alternative fix would be to replace the os.access() call with an try: open() except() at the beginning of the function. (Bitbake rev: 0cb64d0f85b41b2fa764baf6ff7ea1b13f95004e) Signed-off-by: Ioan-Adrian Ratiu <adrian.ratiu@ni.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: daemonize/build: Clean up /dev/null fd handlingRichard Purdie2018-09-222-7/+4
| | | | | | | | | | | | | | | | At the end of bitbake selftest we see: sys:1: ResourceWarning: unclosed file <_io.TextIOWrapper name='/dev/null' mode='r+' encoding='UTF-8'> Clean up the /dev/null handling to drop the unused entry in build.by and ensure the other open() calls are cleaned up. NULL was unused since http://git.yoctoproject.org/cgit.cgi/poky/commit/bitbake/lib/bb/build.py?id=4a081b5a52e3d27da8d4b062f3fda292e8d8fb0a back in 2012. (Bitbake rev: e72be96cfa9f05fda5f420c7cfa8bcfa9304b884) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: COW: Fix StopIteration warningRichard Purdie2018-09-221-1/+1
| | | | | | | | | | | | | Fix the warning: WARNING: lib/bb/data_smart.py:235: DeprecationWarning: generator 'COWDictMeta.iter' raised StopIteration for k, v in self.variables.iteritems(): by using return from the generator, not raising StopIteration. (Bitbake rev: 407d6e07b09123c12c382b4a92107f002c314b05) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: runqueue: Ensure setscene tasks that aren't covered get builtRichard Purdie2018-09-101-2/+4
| | | | | | | | | | | | | | | | | | | | Running "bitbake gconf-native -c cleansstate; bitbake core-image-sato:do_populate_sdk" results in a build where it fails to find gconf-native and fails to build it, merrily trying to build the SDK without gconf being present. The issue is the missing setscene tasks are effectively ignored as the later code in runqueue thinks that since other sstate tasks are present, these 'cover' the missing one. In reality we need to call BB_SETSCENE_DEPVALID to make that decision. To do that we need a "reduced" setscene dependency graph which we don't have in main task graph context. Since that was already done in setscene, we should just assume anything in the non-covered list needs to be built. (Bitbake rev: 464d0339add15bc8b4344ddd1e4c49706e3c0a02) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: cooker/runqueue: Turn universe warnings into verbnotesRichard Purdie2018-09-102-2/+2
| | | | | | | | | If the user puts universe on the commandline, they don't really want warnings so use the new verbnote level instead. (Bitbake rev: 0c87ade5678e503899e3a6cdda5329f6fc212b63) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: msg: Add explicit verbnote log levelRichard Purdie2018-09-102-0/+19
| | | | | | | | | | It has become apparant we need a log level which reaches the console but isn't a warning/error. Add "verbnote" as a way of doing this, behaves as a note but with a higher priority. (Bitbake rev: 2076f12cc2f809345108b1606bd6201f41287505) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: server/process: Various server startup logging fixesRichard Purdie2018-09-053-13/+22
| | | | | | | | | | | | | | | | | | | | | | | | | There were various problems in the server startup loggin: a) stdout/stderr were not being flushed before forking which could potentially duplicate output b) there were separate buffers for stdout/stderr leading to confusing logs where the entries could be reordered. This was particularly confusing due to the separator the logs use to idendify new messages c) an fd wasn't being closed during server startup meaning if the server failed to start, the closed fd wasn't detected as it was held open by the other reference d) If the pipe was detected as being closed, the code incorrectly retried server startup e) The event code would remap stdout/stderr without flushing them, leading to lose log messages (Bitbake rev: 0594faa0b52ce5dbd948d836d88617d38d9862d1) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: cooker.py: Fix incorrect bb files matched warningMark Hatle2018-09-053-1/+88
| | | | | | | | | | | | | | | | | | | | In the case of a sublayer of an existing layer, where the sublayer and main layer share a path, the system may not match the paths properly resulting in: No bb files matched BBFILE_PATTERN_sublayer '^/path/main/sublayer' because it has already matched the main layer. Fix this issue by sorting the collection items based on the pattern, using longest to shortest. Obviously regex wildcards could still be an issue but these are typically not used, so this simply fix should work in the existing cases. (Bitbake rev: 1787cef7221b88f6920ea70fadaffc117d84c7aa) Signed-off-by: Mark Hatle <mark.hatle@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: tests/fetch: Update gnome.org urls after upstream changesRichard Purdie2018-08-291-2/+2
| | | | | | (Bitbake rev: 43ff74d675baed13fc17e1d12c0e013b16ba249b) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: fetcher: Fixed remote removal not throwing exception.Paulo Neves2018-08-281-4/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Before this fix it is assumed that the removal of the remote can only fail because there is not remote to remove. This is a false assumption. Example error which would be ignored: git -c core.fsyncobjectfiles=0 remote rm origin failed with exit code 1, output: Note: A branch outside the refs/remotes/ hierarchy was not removed; to delete it, use: git branch -d master error: could not lock config file config error: Could not remove config section 'remote.origin' Due to the masking of this error a stranger error will be presented to the user, because this time we do not mask the exception: git -c core.fsyncobjectfiles=0 remote add --mirror=fetch origin https://github.com/ptsneves/tl-wn722.git failed with exit code 128, output: fatal: remote origin already exists. The most likely reason that the remote cannot be removed nor modified is that the DL_DIR/git2 does not have permissions compatible with the user running bitbake. This commit fixes: https://bugzilla.yoctoproject.org/show_bug.cgi?id=12728 (Bitbake rev: 9c86c582a10c9b23abad7d34b6cbf12f7086294d) Signed-off-by: Paulo Neves <ptsneves@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: enable project import and merged Toaster settingsDavid Reyna2018-08-284-42/+48
| | | | | | | | | | | | | | | | | | Enable the ability to select an existing build directory into Toaster. This opens to the user the backend features of 12823, for command line user compatibility. Enable the ability to select saving Toaster settings in the regular "bblayers.conf" and "local.conf" instead of the default "toaster_bblayers.conf" and "toaster.conf". This opens to the user the backend features of 12821, for command line user compatibility. [YOCTO #12902] (Bitbake rev: 8ce51fbd92ab42365a38e0c1c260bb4979377a89) Signed-off-by: David Reyna <David.Reyna@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster/layerdetails.js: don't hide local layer infoAwais Belal2018-08-281-1/+2
| | | | | | | | | | | | | | | | | The local layer info (provided through custom fixtures) should not be hidden. It is better to handle it in the same manner as an imported layer, otherwise the layer path and dependency info is not shown. The layer editing fields are handled in the html side of things appropriately so this does not harm that implementation. [YOCTO #12891] (Bitbake rev: aa79967920b2617ce007f66c89f3343f1a7f34b4) Signed-off-by: Awais Belal <awais_belal@mentor.com> Signed-off-by: David Reyna <David.Reyna@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster/models.py: allow local paths for custom recipe's baseAwais Belal2018-08-281-0/+7
| | | | | | | | | | | | | | | In a case where the layer source is local only and the recipe is not yet built, we can search for the path with layer's local_source_dir, and if available that should be used rather than just skipping the scenario. [YOCTO #12891] (Bitbake rev: 59f3e04122fca43835603779ac2d201464fbaebf) Signed-off-by: Awais Belal <awais_belal@mentor.com> Signed-off-by: David Reyna <David.Reyna@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster/checksettings: allow CUSTOM_XML_ONLY setting through envAwais Belal2018-08-281-1/+2
| | | | | | | | | | | | | | | This change allows the CUSTOM_XML_ONLY toaster setting to be provided through the environment so the user can do this without mingling with the settings.xml, for scenarios where modifying settings.xml is not achievable. [YOCTO #12891] (Bitbake rev: 55333f1c3ded1c53120e6cb32b440cc707521e2b) Signed-off-by: Awais Belal <awais_belal@mentor.com> Signed-off-by: David Reyna <David.Reyna@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toastergui/newproject.html: fix release divsAwais Belal2018-08-281-2/+2
| | | | | | | | | | | | | | | | | The release drop down divs are not being closed appropriately, which showed adverse reactions on the UI that aligned the "Create project" button with the left edge of the screen without any margins. This fixes these divs which in turn aligns the button appropriately. [YOCTO #12891] (Bitbake rev: a6e20bddddd083fbecb5ed8d5f4824da640fdd44) Signed-off-by: Awais Belal <awais_belal@mentor.com> Signed-off-by: David Reyna <David.Reyna@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster/widgets.py: avoid divide by zero issuesAwais Belal2018-08-281-7/+12
| | | | | | | | | | | | | | | | | There can be cases where the variables being used to divide in build percentage expressions can be zero. For example, a setup consisting of only local repos will have repos_to_clone=0 and will generate a divide by zero scenario. Fix this by checking the divisor in such cases. [YOCTO #12891] (Bitbake rev: 679c70aa32d23e9247f8a68efcb579ad733af84b) Signed-off-by: Awais Belal <awais_belal@mentor.com> Signed-off-by: David Reyna <David.Reyna@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: allow TOASTER_DIR to be overridden from cmdlineAwais Belal2018-08-281-2/+7
| | | | | | | | | | | | | | | | | | | TOASTER_DIR is used for higher level toaster artifacts such the SQL DB and creating toaster internal build directories for projects. Prior to this change it was evaluated as `dirname $BUILDDIR` and user had no control over it. This change allows to override this variable from the command line for more flexibility. The variable defaults to its original setting if the optional argument is not passed. [YOCTO #12891] (Bitbake rev: e073775d3b6980fc8004ae28a3ccc3c5bbf50fb2) Signed-off-by: Awais Belal <awais_belal@mentor.com> Signed-off-by: David Reyna <David.Reyna@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: use a more flexible way to find bitbakeAwais Belal2018-08-281-1/+12
| | | | | | | | | | | | | | | | | | | | | | | | | The current mechanism for finding the bitbake binary assumes a directory structure which is identical to poky, where oe-core's meta and bitbake directories are at the same level. There can be a case where bitbake is used from elsewhere and in such cases the above mentioned assumption fails to hold, whereas this is totally allowed by the oe-init-build-env script which can take bitbakedir as an argument. The better approach is to allow bitbake to be derived from PATH, while keeping the older mechanism in place so it can be removed after tests are done in various environments. This makes more sense as toaster has also been launched from the same bitbake instance that is the one in PATH. [YOCTO #12891] (Bitbake rev: 365d8d94ae3e4e0f95e0806dbcb7c77c20a55d2d) Signed-off-by: Awais Belal <awais_belal@mentor.com> Signed-off-by: David Reyna <David.Reyna@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: allow pokydirname to be evaluated when all layers are localAwais Belal2018-08-281-3/+15
| | | | | | | | | | | | | | | | | | | | Toaster depends on pokydirname for identifying the location of the oe-init-build-env script (and there might be other purposes in the future). The problem with current approach is that it only checks/sets the variable with git based repos, whereas toaster provides mechanisms to allow having layers that are all locally available. The evaluation of the variable fails in such scenarios, so use a more flexible mechanism in this case and try to locate poky in the local layers as well, if not already set. [YOCTO #12891] (Bitbake rev: 6c3c196b28603591371ec7e62871fbb4296f2c71) Signed-off-by: Awais Belal <awais.belal@mentor.com> Signed-off-by: David Reyna <David.Reyna@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: parse/ast: ensure saved event handlers really do get restoredPaul Eggleton2018-08-241-18/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In finalize() we save event handlers, register the ones relevant to the recipe being finalised, trigger events, and then restore the handlers so that one recipe's custom handlers (actually implemented within a class inherited by the recipe) do not affect other recipes. However, if an exception occurs during parsing, the saved handlers were not being restored. Use a try...finally block to ensure that the handlers are always restored. This issue became apparent since in OpenEmbedded-Core we have recently introduced a find_intercepts() handler for the bb.event.RecipePreFinalise event in image-postinst-intercepts.bbclass that images and old-style SDK recipes will end up inheriting. So far it doesn't seem that the the error has manifested itself in normal builds, but when parsing OE-Core recipes in the OE layer index it has: core-image-rt-* image recipes were parsed which in the default configuration raise SkipRecipe. The next non-image recipe that is parsed will trigger a real exception, because the find_intercepts() handler is still registered and gets fired, but in the context of the new recipe the POSTINST_INTERCEPTS_PATHS variable is not set, and the code in find_intercepts() is written with the reasonable assumption that that isn't possible given that the class itself sets a default, and thus it fails. (Bitbake rev: e5f1f8fa201774e0c3c554d59b277baa2128708f) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: bitbake: Bump version 1.39.0 -> 1.39.1Richard Purdie2018-08-232-2/+2
| | | | | | (Bitbake rev: 49c3fd2489867c09dec6919a25b53d935a8204bb) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: daemonize: Flush stdio on exitJoshua Watt2018-08-231-2/+7
| | | | | | | | | | | | | | | In spite of a comment suggesting otherwise, os._exit() does not flush buffered output from file descriptors before exiting the process like os.exit() does. This means that any un-flushed output is lost in the daemon process, in particular the traceback from any thrown exceptions, making debugging exceptions in the daemon quite difficult. The solution is to flush stdout and stderr before exiting. (Bitbake rev: fcc8e1ff53696f78dd64b4ee32f3c433b7a47df0) Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: Fix comparison in recipe templateKarsten Strand2018-08-231-1/+1
| | | | | | | | | | | Use == instead of = when comparing task outcome to OUTCOME_FAILED. Prior to this fix the recipe template would cause a TemplateSyntaxError exception. (Bitbake rev: a53ffec4ed3d0f9221bca398e20e8f480fb2b325) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: Toaster: Implement the project-specific feature and releated ↵David Reyna2018-08-2029-55/+1900
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | enhancements and defects. Here is the primary driving enhancement: * Bug 12785 - Support Project Specific configuration for external tools (e.g. ISS, Eclipse) - Isolated project-specific configuration page (full Toaster context hidden) - Support for new project, reconfigure existing project, and import existing command line project - Ability to define variables (e.g. image recipe) and pass them back to external GUI - Ability to execute the cloning phase, so that external GUI receive a buildable project - Ability to call back to the external GUI when updates are completed and ready - Compatibility of above projects with the normal full Toaster interface - Ability to pass to a 'complete' or 'cancel' web page so that the external GUI can immediately stop that Toaster instance, and not leave dangling servers nor edit sessions open Here are the supporting enhancements, where at least the back end is implemented: * Bug 12821 - Make Toaster conf changes compatible with command line usage * Bug 12822 - Support importing user changes to conf files into Toaster * Bug 12823 - Support importing user build directories into Toaster * Bug 12824 - Scan imported layers for content so that they are immediately available * Bug 12825 - show layer clone item in progress bar Here are defects fixed: * Bug 12817 - builddelete.py requires explicit 'add_arguments' * Bug 12818 - Remove orphaned imported layers when project is deleted * Bug 12826 - fix imported layer management * Bug 12819 - build using selected bitbake env, not Toaster's env * Bug 12820 - Toaster randomizes the layer order in toaster_bblayers.conf [YOCTO #12785] (Bitbake rev: 985d6cec290bdd80998a63483561a73c75d82d65) Signed-off-by: David Reyna <David.Reyna@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: bb/utils.py: add break_hardlinks helperRasmus Villemoes2018-08-161-0/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | bb.utils.copyfile is called in a few places with identical src and dst in order to create an st_nlinks==1 version of the file. That that even works relies on an implementation detail of copyfile (namely, that it creates a temporary file and then does a rename). Moreover, it's a waste of time if the file already has st_nlinks==1. So create a helper that optimizes away the copy in the st_nlinks==1 case. Of course, this helper relies on the same implementation detail, but that's now contained within bb.utils itself. To test that we do at least sometimes hit the no-copy path, I tested locally with if sstat[stat.ST_NLINK] == 1: + bb.note("Woohoo, 2*%d bytes I/O avoided" % sstat[stat.ST_SIZE]) return True (and the obvious places in oe-core patched), and the do_package log files are indeed filled with woohoo notes. (Bitbake rev: 7ae93cf40ab91965147055100432961436bce46c) Signed-off-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: runqueue: Move decision if a task can be started to one common placeAndreas Müller2018-08-151-4/+8
| | | | | | | (Bitbake rev: 99d9e4389e1f1d78d17a23ee078fe3f4a12cb31d) Signed-off-by: Andreas Müller <schnitzeltony@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>