summaryrefslogtreecommitdiffstats
path: root/bitbake
Commit message (Collapse)AuthorAgeFilesLines
* bitbake: prserv/serv: Start/Stop daemon using ip instead of hostLeonardo Sandoval2015-09-241-5/+8
| | | | | | | | | | | | | | | | | In cases where hostname is given instead of an IP (i.e. localhost instead of 127.0.0.1) when stopping the server with bitbake-prserv --stop, the server shows a misleading message indicating that the daemon was not found, where it is actually stopped. This patch converts host to IP values before starting/stopping the daemon, so it will always work on IP, not on hostnames, avoiding problems like the latter. [YOCTO #8258] (Bitbake rev: bd6398e967c234e89d773f509512ebf460fa76ff) Signed-off-by: Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: start script warning text formatting small improvementCristian Iorga2015-09-231-1/+1
| | | | | | | | | | | Add a carriage return to build environment warning message to avoid it being mixed up with shell prompt. (Bitbake rev: d3675cca419946cc19b3f280446fe1f656f11902) Signed-off-by: Cristian Iorga <cristian.iorga@intel.com> Signed-off-by: Michael Wood <michael.g.wood@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: tinfoil: remove logging handler at shutdownMarkus Lehtonen2015-09-231-4/+5
| | | | | | | | | | | Otherwise the logger gets multiple handers (and the user get duplicate logging output) if another tinfoil instance is initialized after one is shut down(). (Bitbake rev: 74d67be7a4b591fab2278f7c184f282d11620c62) Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: remove time from builds in progressBelen Barros Pena2015-09-231-1/+3
| | | | | | | | | | | | | | | | In the 'latest builds' section of the all builds page, completed builds show the time they completed at. Builds in progress should not display such time, since they haven't completed yet. This patch removes the time information that was showing for builds in progress, whatever that time actually was. (Bitbake rev: 0df02c87573bf9a66df2e424cd9534e67a8ab3dc) Signed-off-by: Belen Barros Pena <belen.barros.pena@intel.com> Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: Add fake entry to Target_File for filesystem rootElliot Smith2015-09-231-14/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The files-in-image.txt file is produced by bitbake after an image is created, listing all the files in the image. However, this list doesn't include the root directory ('/'). buildinfohelper.py then tries to construct the filesystem tree from this file, assuming that every directory apart from the root directory (which is special-cased) can be assigned a parent. But because the root directory isn't listed in files-in-image.txt, an object for the root directory is never created. The direct subdirectories of the root ('./bin', './usr' etc.) then can't be assigned a parent directory, as the object representing the root directory doesn't exist. This results in a Target_File lookup error and causes the directory listing page to fail. Fix this by creating a fake entry for the root directory in the Target_File table, so that the direct subdirectories of / can be assigned a parent. Note that it doesn't matter that the root is faked, as its properties are never shown in the directory structure tree. [YOCTO #8280] (Bitbake rev: a4015768183e5a3fa39a6c2b4dea0088ca182d80) Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: brian avery <avery.brian@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: layerdetails Fix back button tab behaviourMichael Wood2015-09-231-5/+23
| | | | | | | | | | | | | | | This completes the behaviour fix of the back button in the layerdetails page as we not only have parameters in our history we also have the hash to indicate which tab is active. As we pop our history we need to show the corresponding tab. [YOCTO #8252] (Bitbake rev: 8fc7f94af19cd8489a944b02d9a406bd62d001fa) Signed-off-by: Michael Wood <michael.g.wood@intel.com> Signed-off-by: brian avery <avery.brian@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: UI test improvementsKe Zou2015-09-231-103/+167
| | | | | | | | | | | | * Add decorator in logging mechanism * Add more debug information (Bitbake rev: ab94f4bbef38d23e7e8be0663781eaecf84f0172) Signed-off-by: Ke Zou <ke.zou@windriver.com> Signed-off-by: Stanciu Mihail <stanciux.mihail@intel.com> Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: support selenium testing from mac OS Xbrian avery2015-09-232-2/+9
| | | | | | | | | | | * added a mac section to the cfg file * added mac specific screenshot code (Bitbake rev: bf8748aafc2291bb814fe0ec8a28d5eed9a1d5f0) Signed-off-by: brian avery <avery.brian@gmail.com> Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: add 2 UI testsEd Bartosh2015-09-231-2/+22
| | | | | | | | | | | Tested that UI shows task names for the builds in both all-builds and projectbuilds views. (Bitbake rev: 092b1a9eebbd3f0747f6152c63182f18bccb2054) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: change UI to show tasksEd Bartosh2015-09-233-7/+40
| | | | | | | | | | | | | Changed toaster UI to show tasks if they're specified for the builds and use them when restarting builds. [YOCTO #7442] (Bitbake rev: 3c196c15f0ae4c6ac2b92e0a75562962f3da0089) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: don't re-create Target objectsEd Bartosh2015-09-231-16/+1
| | | | | | | | | | | | | | | Due to re-creating Target objects from bitbake events task information stored in original objects is lost. There is no valid reason to remove existing objects. It's safer to query them instead of re-creating as original object contain more information than events coming from bitbake. (Bitbake rev: aab4aff75eefb31aa53885d7735feee5daa294aa) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: store task name in Target objectsEd Bartosh2015-09-232-2/+2
| | | | | | | | | | | | | | | Information about a task is not stored in Target objects. This makes it impossible to correctly operate with the builds where task is specified. Storing taks name is an enabler for other fixes in UI and backend related to restarting builds. (Bitbake rev: 0a69a8a18075c976ed8681d9d75529f8c2f48514) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: bitbake: bb.fetch2.git: Import errno moduleRomain Perier2015-09-191-0/+1
| | | | | | | | | | Currently this module is dereferencing errno.ENOENT but the python module "errno" is not imported, which causes a crash when fetching from a git repository. (Bitbake rev: 93e4c9bb2393b1074f5a01e7eaaac742a59d8086) Signed-off-by: Romain Perier <romain.perier@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: hide irrelevant builds in the project builds viewAlexandru DAMIAN2015-09-193-6/+91
| | | | | | | | | | | | | | | | | | | | | | | | | | This patch fixes the project builds view so it doesn't show "in progress" builds or builds for other projects. Note that this also modifies the "all builds" view to use the same queryset filtering as the project builds. This is to avoid excluding "in progress" builds more than once, which is what was happening before. The patch also has a minor change to ensure that when displaying the project builds page, only builds for that project are in the results. The queryset filtering is now split over several lines so you can see what's going on. [YOCTO #8236] [YOCTO #8187] (Bitbake rev: 771c08b9be1f7875e0216e381ab0a81ef0d26256) Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com> Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: data_smart: Ensure OVERRIDES dependencies account for contains()Richard Purdie2015-09-181-2/+6
| | | | | | | | | | | | The dependencies of OVERRIDES were not including DEFAULTTUNE in OE-Core. This is pulled in by a bb.utils.contains() reference which the override dependency tracking code wasn't accounting for. This patch ensures we do track contains references too. (Bitbake rev: f3ee534cb0560dbb5f88a0ffe01e9305bae102e1) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: data_smart: Correctly handle OVERRIDE values set using ??=Richard Purdie2015-09-181-0/+2
| | | | | | | | | Right now, OVERRIDES dependency variables set using ??=, e.g. TARGET_ARCH in OE-Core don't have their dependencies tracked. This is a bug, fix it. (Bitbake rev: 944734503768f9e9223ef041f2d7873455418a54) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: data_smart: When considering OVERRIDE dependencies, do so recursivelyRichard Purdie2015-09-181-1/+7
| | | | | | | | | | | Sadly its not enough to consider the dependencies of OVERRIDES, we need to resolve their dependencies and so on recursively. If we don't do this, some variable can be changed and the resulting data store is incorrect. (Bitbake rev: 82143ac064d391300e762ba7520ef1f8df18b574) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: data_smart: Expand overrides cache recursivelyRichard Purdie2015-09-181-3/+12
| | | | | | | | | | | | | | | | | | | | If the values that make up OVERRIDES are themselves overridden, we end up into some horrible circular logic. Unfortunately some metadata does depend on this functionality. e.g: DEFAULTTUNE_virtclass-multilib-xxx = Y which changes TUNE_ARCH which changes TARGET_ARCH which changes OVERRIDES As a solution, we iterate override expansion until the values don't change. If we iterate more than 5 times we abort and tell the user to report the issue. (Bitbake rev: 10279697c701e01bf6fdd5e9f92792ef5134807b) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: bb.fetch2.{git, hg}: remove tarball if it needs updatingChristopher Larson2015-09-182-8/+12
| | | | | | | | | | | | | | | | | | | We were maintaining state in the form of ud.repochanged to determine whether we need to write the tarball in the case where the tarball already exists, but this state is maintained only in memory. If we need to update the git repo, set ud.repochanged to True, and then are interrupted or killed, the tarball will then be out of date. Rather than maintaining this state, simply remove the out of date tarball when we update the git repo, and it will be re-created with updated content in build_mirror_data. [YOCTO #6366] (Bitbake rev: eaaa81393f181432c8586b17ade623f42c9fed2e) Signed-off-by: Christopher Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: Simplify redirects when build page parameters are missingElliot Smith2015-09-181-17/+32
| | | | | | | | | | | | | | | | | | | | | A RedirectException is used to redirect the client to the correct page when their original request is missing the required parameters (page, orderby etc.). However, the code is difficult to follow. Rather than catching RedirectExceptions and rethrowing them with different view URLs, ensure that the RedirectException has the correct URL in it when thrown by passing the original page name to the _build_list_helper() method. Modified from an original patch by David Reyna <david.reyna@windriver.com>. (Bitbake rev: 38f935647dd768a912b933adebfc9cb225a01a54) Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: brian avery <avery.brian@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: Fix date range pickers on the project builds pageElliot Smith2015-09-181-2/+2
| | | | | | | | | | | | | | | | | | | These were referring to the old HTML elements with ids "date_from_created" and "date_from_updated", but their ids have changed to "date_from_started_on" and "date_from_completed_on". This meant that they weren't functional. This fixes the references. Modified from an original patch by David Reyna <david.reyna@windriver.com>. (Bitbake rev: fe9a554249b623ef515502043fdbf50e1ac62a3a) Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: brian avery <avery.brian@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: Show correct builds count on project pagesElliot Smith2015-09-182-3/+3
| | | | | | | | | | | | | | | | | The counter for completed builds on the project pages includes builds in progress. Instead use the completedbuilds queryset to count the number of completed builds for display on project pages. Modify how the completedbuilds queryset is constructed so it only excludes builds with status "in progress". (Bitbake rev: 455a0087e0dcd74998abd02a110942f25da127be) Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: brian avery <avery.brian@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: hide irrelevant builds in the project builds viewAlexandru DAMIAN2015-09-181-12/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | | This patch fixes the project builds view so it doesn't show "in progress" builds or builds for other projects. Note that this also modifies the "all builds" view to use the same queryset filtering as the project builds. This is to avoid excluding "in progress" builds more than once, which is what was happening before. The patch also has a minor change to ensure that when displaying the project builds page, only builds for that project are in the results. The queryset filtering is now split over several lines so you can see what's going on. [YOCTO #8236] [YOCTO #8187] (Bitbake rev: 09079f15c0511a6d17ce1cc29be6de5387e45f09) Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com> Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: brian avery <avery.brian@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: tests/fetch.py: Fix recursion failure in url mappingMark Hatle2015-09-182-6/+15
| | | | | | | | | | | | | | | Instead of reproducessing the same line over and over and over, we remove the current line from the mirror list. This permits us to re-evaluate the list while excluding all matches that have previousily occured. Without this fix, adding this test results in a failure: RuntimeError: maximum recursion depth exceeded in cmp (Bitbake rev: 24a8e9a5b0ba145ae589178d74365c986ebca325) Signed-off-by: Mark Hatle <mark.hatle@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: fetch2/__init__.py: uri_replace regex handlingMark Hatle2015-09-182-1/+8
| | | | | | | | | | | | | | | | | | | | | | We should only substitute one time. If we do it without a max count, we can end up matching over and over. Before this change: https://downloads.yoctoproject.org/releases/bitbake/bitbake-1.0.tar.gz with a mirror of https://.*/[^/]* http://AAAA/A/A/A/ would end up either recursing indefinitely or result in: http://AAAA/A/A/A/A/A/A/A/A/A/bitbake-1.0.tar.gz (Bitbake rev: 4d254e02e2867dd9a6663508c8ca9f2733af71a8) Signed-off-by: Mark Hatle <mark.hatle@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: Don't def a function for each call to build_artifact()Elliot Smith2015-09-182-32/+11
| | | | | | | | | | | | | | | | Cache the mimetype object and only define the function for getting a mimetype once. Also ensure that filemagic is listed as a requirement of toaster. Doing this also means we can remove the code which tries multiple different "magic" libraries, as we know we have the right version available. (Bitbake rev: 8d3aa2d46ebab7a59e57234f0b3f6fc3225a13e8) Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: brian avery <avery.brian@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: Avoid unnecessary local to local copy of cooker logElliot Smith2015-09-183-51/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The cooker log is copied from its original (bitbake) location to an artifact directory chosen by the user (chosen when checksettings.py runs as part of the managed mode; it's one of the annoying questions you're asked at startup). The copy happens as part of the runbuilds script run, which is started in a loop from the toaster startup script in managed mode. When a user requests the log for a build via toaster, they are getting the log which has been copied to the artifact directory, not the original bitbake log. This works for the managed case, where the runbuilds command is running in a loop and copying log files for completed builds to the artifact directory. However, in analysis mode, there are two problems: 1. checksettings isn't run, so the artifacts directory isn't set. toaster is then unable to figure out where the log files should have been copied to. 2. The log files aren't copied to the artifacts directory anyway, as runbuilds isn't running in analysis mode. To fix this, just point the user to the local bitbake log file in its original location. This avoids the copy step, and means we can remove a whole question from the toaster startup sequence, as we no longer need an artifact directory. The only downside to this is that it's not appropriate for remote bitbake servers. We will need to revisit this and possibly reinstate the copy step once we have to reconcile local and remote builds and make their logs available in the same way. [YOCTO #8209] (Bitbake rev: 5697bbcc88edad85891f66d28b8803a9c9d27ff2) Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: brian avery <avery.brian@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: Read correct cooker log path from toasteruiElliot Smith2015-09-182-5/+5
| | | | | | | | | | | | | | | | | | | The BB_CONSOLELOG variable changes by the time we read it in BuildInfoHelper. This means that the log file location we are using is incorrect, so the links to the cooker logs don't work. Instead, read it at the point when the BuildStarted event occurs in toasterui. The BB_CONSOLELOG variable has the correct value here, so pass that to BuildInfoHelper. [YOCTO #8209] (Bitbake rev: 20609eebee0d2318806cf81913e7ce6dc1005507) Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: brian avery <avery.brian@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: delete multiple builds cleanupbrian avery2015-09-181-4/+9
| | | | | | | | | | | | | | | | This patch cleans up the multiple delete. It: 1) skips build id's that don't exist rather than giving a traceback. 2) let you pass in the ids as a space separated list 3) fixes the usage to match the space separated list format [YOCTO #7726] (Bitbake rev: a065f7e5e9c07dbd71a98e7db1d7f711607716f3) Signed-off-by: brian avery <avery.brian@gmail.com> Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: data_smart: Separate out update_overridevars into separate functionRichard Purdie2015-09-181-5/+6
| | | | | | | | | No code changes, just refactoring to allow for functionality changes by moving things to a separate function. (Bitbake rev: 2eb934814179ccf42e3d424dabe26b17d013a7ed) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: cache: Handle spaces and colons in directory names for file-checksumsRichard Purdie2015-09-181-1/+14
| | | | | | | | | | | | | If there is a space in a directory name containing a file in file-checksums (e.g. from a file:// url), you currently get tracebacks from bitbake. This improves the code to handle colons and spaces in the file-checksums names since it possible to figure out the correct names. [YOCTO #8267] (Bitbake rev: 87282b283921a58426f24fb21151db457c5bca66) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: bitbake-worker: Ensure pipe closure doesn't crash before killpg()Richard Purdie2015-09-121-1/+5
| | | | | | | | | | If the pipe is closed, we want to ensure that we kill any child processes by triggering the sigterm handler before we exit. This code does that, hopefully avoiding the remaining process left behind issues on the autobuilder. (Bitbake rev: 60f6c2818f38c4d9c2d9aaa42acf3071636f4a3b) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: increase waiting timeEd Bartosh2015-09-121-2/+2
| | | | | | | | | | | | | Increased waiting time for toasterUI from 10 to 25 seconds. Bitbake takes longer time to start, so toaster should wait longer. [YOCTO #8240] (Bitbake rev: 224ee3685fe20915b21d299ab80f7b289a916dca) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: brian avery <avery.brian@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: Changes to navigationBelen Barros Pena2015-09-095-9/+23
| | | | | | | | | | | | | | | | | | | | | | | | | This patch: * Changes the breadcrumb to provide access to either the project builds or the project configuration, as appropriate * Changes the left navigation in the project configuration to reflect the hierarchical relationship between the basic configuration and all other configuration pages * Changes the left navigation in the build history to bring it in line with the changes in the project configuration This way the breadcrumb explicitly exposes the hierarchy of the application, which is its correct behaviour, making it easier to move around within Toaster. (Bitbake rev: 135dff67216759286f584e501583584a9cb09f27) Signed-off-by: Belen Barros Pena <belen.barros.pena@intel.com> Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: bitbake-worker: Handle SIGKILL of parent gracefullyRichard Purdie2015-09-091-2/+7
| | | | | | | | | | | | | | If we SIGKILL cooker (the parent process), ensure the worker notices and shuts down gracefully. To do this: * trigger the sigterm handler if the parent exits * ensure broken pipe writes don't trigger backtraces which interfer with other exit work * notice if our command pipe is broken due to EOF and sigterm if so (Bitbake rev: c43d6a8d711db8d3bd9a1976b9f8e3efdb4cb4ae) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: bitbake-worker: Simple code cleanupRichard Purdie2015-09-091-3/+2
| | | | | | | | start/end are unused here and we can improve the code conditional blocks. (Bitbake rev: 68f53dd77fe0bbfa044bd037a9484e0e1c9088b4) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: prserv: SIGTERM and deamonization fixesRichard Purdie2015-09-091-3/+31
| | | | | | | | | | | | | | | | | | | | | | | Worryingly, if you SIGKILL the bitbake cooker, an autostarted PR server will remain behind. It turns out there are a few things we should do: * The PR service doesn't need to daemonize when started from cooker, it just complicated the process lifecycle. Add a fork() method to handle this and use the non-daemon mode for the singleton. * Reset the sigterm and sigint handlers. Bitbake cooker installs its own which we inherit meaning PR server was ignoring SIGTERM. Installing our own handlers which include a sync makes most sense here. Since we're in the code, make it sync the database on SIGINT. * Use the new bb.utils.signal_on_parent_exit() call so that we get a SIGTERM when the parent (usually cooker) exits and we can shutdown too. Alternatives would be having an open pipe or polling os.getppid() for changes but this seems more effective. (Bitbake rev: 05d31fa1f56bd3d3d363a16a421d9ba7541d4293) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: utils: Add signal_on_parent_exit() functionRichard Purdie2015-09-091-0/+19
| | | | | | | | | | | | | | | | | | | Add a new bb.utils.signal_on_parent_exit() function so that a process can register to recieve a signal when the parent dies. There is no POSIX standard for this and the implementation is Linux specific. Alternatives would be having an open pipe or polling os.getppid() for changes but this seems more effective and less invasive to most of bitbake's code structure. We need to be able to determine when parents die to ensure child processes stop running in a variety of circumstances to avoid locks being held and ensure clean shutdown. Roughly based on https://gist.github.com/evansd/2346614 (Bitbake rev: 34974f5e30e9b09c016481e4c81c156a5f379784) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: server/process: Handle SIGTERM more gracefullyRichard Purdie2015-09-091-0/+9
| | | | | | | | | | | | | | | | | | | | | Currently if you send a SIGTERM to the bitbake UI process, the system basically hangs if tasks are executing. This is because the server process doesn't actually try any kind of shutdown before exiting. This patch trys executing a stateForceShutdown command first, which is enough to stop any active tasks before the system exits. I also noticed that terminate can execute multiple times, once at SIGTERM from the handler and once from the real exit. Double execution leads to stack traces and potential hangs (writes to dead pipes), so ensure the code only can run once. With these fixes, bitbake much more correctly deals with SIGTERM to the UI process. (Bitbake rev: 1032ddddbe3241da02ebb3608a1c40f9123b9e80) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: replace ETA with % of tasks doneBelen Barros Pena2015-09-081-1/+1
| | | | | | | | | | | | | The ETA we show for builds in progress is woefully inaccurate. In the 1.8 release we replaced it with the % of tasks completed. Somehow, we regressed to the ETA, so bringing the task % back. (Bitbake rev: a841dc85770ea5c6fa8cf06ba5fdfe214e69afb2) Signed-off-by: Belen Barros Pena <belen.barros.pena@intel.com> Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: fix project names in latest buildsBelen Barros Pena2015-09-081-1/+5
| | | | | | | | | | | | | | | | Make sure that the project name we show for each build in the latest builds section of the all builds page: * Has the same styles as the build, depending on the build status (in progress, failed or success) * Links to the project page (Bitbake rev: 09abcf3199b2e86758a974a47ebe31f5fb79440a) Signed-off-by: Belen Barros Pena <belen.barros.pena@intel.com> Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: remove unnecessary white spaceBelen Barros Pena2015-09-081-1/+1
| | | | | | | | | | | | There was too much white space above the first heading in the all builds page. This patch removes the class that was adding the extra space. (Bitbake rev: c9b20009c5e161987a143b00ee22218a4c9c0692) Signed-off-by: Belen Barros Pena <belen.barros.pena@intel.com> Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toastergui: Add missing files from ↵Richard Purdie2015-09-082-0/+214
| | | | | | | | 1c2f6b9b7b9e700146944b9d6d2114e0d014ee81 (Bitbake rev: cf2b6b621cb483aa1a1a66c09fc431efc207c91e) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: bb.fetch: don't remove the clone when an update failsChristopher Larson2015-09-041-2/+4
| | | | | | | | | | | When our clone exists, but is out of date, and the attempt to update it fails, we don't necessarily want to remove the entire clone, particularly if it's a large repository. (Bitbake rev: 19af272ba5256653edeff6acbceeb09e3e478d61) Signed-off-by: Christopher Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: bb.fetch: handle checksums consistently for mirrorsChristopher Larson2015-09-041-3/+4
| | | | | | | | | | | | If the main fetch method doesn't support checksums, the user will not be defining them in the recipe, so we don't want to check them for premirrors/mirrors either. This ensures that we never error due to missing checksums on a git mirror tarball. (Bitbake rev: 24c79bbed361b37f12d3351af13602e3d4386f4c) Signed-off-by: Christopher Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: bb.fetch.git: remove leading '.' from gitsrcnameChristopher Larson2015-09-041-1/+4
| | | | | | | | | | | When using an absolute file URI, there's no host, and the path starts with '/', the dir under ${DL_DIR}/git2/ ends up starting with '.', so is hidden. Remove any leading '.' to fix this. (Bitbake rev: 8dce6964d56b36a77fb113f2ad496cc992a5ff36) Signed-off-by: Christopher Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: bb.cookerdata: include useful traceback for ExpansionError/ParseErrorChristopher Larson2015-09-041-1/+10
| | | | | | | | | | Show the user only the portion of the traceback which was from the metadata, nothing from bitbake's internal calls. (Bitbake rev: c45054aef03393fa0bf70e853ddcfc55988493cf) Signed-off-by: Christopher Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: bb.data_smart: retain traceback from ExpansionErrorChristopher Larson2015-09-041-1/+2
| | | | | | | | | | This gives us the needed context of the original ExpansionError, which is invaluable when we have a chain of function calls in the expansion. (Bitbake rev: c514b6fbea77ede1b7871b89592a33ed39b1d71c) Signed-off-by: Christopher Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: cooker/runqueue: Allow bitbake commands starting with do_Alex Franco2015-09-042-4/+12
| | | | | | | | | | | | | | | The output of "bitbake, -c listtasks pkg" lists tasks with their real names (starting with "do_"), but then "bitbake -c do_task" fails, as "do_" always gets unconditionally prepended to task names. This patch handles this error by checking whether a task starts with "do_" prior to prepending it with it when the task runlist is being constructed (and a few other corner cases). [YOCTO #7818] (Bitbake rev: dd3050ceef37ac556546e940aa596ce96ef6c8df) Signed-off-by: Alex Franco <alejandro.franco@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: improve explanation of checkout dirBelen Barros Pena2015-09-041-16/+16
| | | | | | | | | | | | | | | | Improve the explanation we show to users during set up when asking them to set the layers checkout directory. The patch also makes minor changes in text formatting to improve legibility. [YOCTO #7740] (Bitbake rev: dd9284944ae0f0feecb70adab880fed636f7cd59) Signed-off-by: Belen Barros Pena <belen.barros.pena@intel.com> Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>