summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/toaster/bldcontrol
Commit message (Collapse)AuthorAgeFilesLines
* bitbake: toaster: get bitbake location from BBBASEDIREd Bartosh2016-04-061-3/+5
| | | | | | | | | | | | It was incorrectly assumed in the current code that bitbake is in ../bitbake/bin/ directory. It's not always the case. Using bitbake from $BBBASEDIR should be . (Bitbake rev: 6c9e3375d278bee712c41f07428bc82108b9aaae) 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: use empty tokenEd Bartosh2016-04-061-1/+1
| | | | | | | | | | | | | | | If client xmlrpc token is not provided in the command line, bitbake generates random token. Server token in --server-only mode is always empty. This doesn't allow clients with non-empty tokens to connect to the server. Specifying empty token should stop generation of random token and make it possible for clients to communicate with the server. (Bitbake rev: b54ec2d7cb9f2fb4ff1e8af11b6ecf97d181272c) 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: runbuilds Clean up runbuildsMichael Wood2016-04-061-29/+52
| | | | | | | | | | | | | - Organise the imports into logical groups - Fix 80 col wrapping - Remove catch all exceptions - Log to the toaster log - Use QuerySet functions such as .first() and Q() (Bitbake rev: c382f550c62437954205c7dd9c7e1891d5d03945) Signed-off-by: Michael Wood <michael.g.wood@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: runbuilds Make runbuilds aware of the build CANCELLED stateMichael Wood2016-04-061-4/+22
| | | | | | | | | | Add handlers to make sure we remove the BuildEnvironment LOCK when we have cancelled a build. (Bitbake rev: 23d0a7f9664450a09c2610631b38590a09b33744) Signed-off-by: Michael Wood <michael.g.wood@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: bldcontrol models Add a cancelling state the BuildRequestMichael Wood2016-04-062-1/+45
| | | | | | | | | | | | | | | | | | | | | | | To accurately reflect the state of a build request we also need a cancelling state. This is set when we've started a build and then for whatever reason cancel it, cancelling is not instantaneous so we have this state to indicate that a cancel is in progress. Also add a state transition guard. As the state of a BuildRequest can currently be modified by three processes; Toastergui, Runbuilds/bldcontrol and the buildinofhelper we cannot say for sure which process will be running at the time of cancellation so in order to avoid one of these processes making an incorrect transition only allow transitions of state to increase. e.g. CREATED -> QUEUED -> INPROGRESS And to ignore such requested changes such as INPROGRESS -> CREATED (Bitbake rev: 449598c8e6be75bd0c9d59e7bdf859d1d6f83858) Signed-off-by: Michael Wood <michael.g.wood@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: update BuildEnvironmentController and BitbakeControllerSujith H2016-04-062-23/+5
| | | | | | | | | | | | | | | | Remove getBBController function from BuildEnvironmentController. The constructor of BitbakeController is updated appropriately so that call can be made to connect to running server. The call to startBBServer is removed from bbcontroller and handledin localhostbecontroller. [YOCTO #6787] (Bitbake rev: e15151106aae21d3b164ca868be42bd63905f0a1) 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>
* bitbake: toaster: bldcontrol Add forceShutDown function to BitbakeControllerSujith H2016-04-061-0/+3
| | | | | | | | | | | | | | | Add forceShutDown function to BitbakeController class. This function provides a mechanism to cancel the build from toaster. An API which can be used safely to cancel build and hence shutdown running bitbake server. [YOCTO #6787] (Bitbake rev: 89dc2ee8f5b7255538082ce4f6cb5277839875a8) 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>
* bitbake: toaster: use bash explicitlyEd Bartosh2016-04-061-6/+7
| | | | | | | | | | | | | | Toaster can't run builds on Ubuntu as default /bin/sh points to dash there. The reason is that oe-init-build-env can't be sourced under dash for various reasons. It can be fixed or work arounded, but it wouldn't fix builds for older releases. Explicitly using bash to start builds should fix the issue. (Bitbake rev: e4352603b21d43a8b5d9ee417c036fff0a263d40) 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: stop bitbake server after the buildEd Bartosh2016-04-061-4/+6
| | | | | | | | | | | | | | Bitbake server is used only during the build. There is no need in keeping server running after the build. Running bitbake -m in the subshell after the build should stop the server. (Bitbake rev: 062c68e3e7d00834118fe07ceb0899874be714ae) 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: add new parameter to _shellcmdEd Bartosh2016-04-061-1/+3
| | | | | | | | | | | | | | Added 'nowait' parameter to _shellcmd method to support running chain of commands in a subshell. This is going to be used to stop bitbake server after the build. (Bitbake rev: 89fae3c8712bfaac48686c58b480e40c1abdcfdc) 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: reimplement triggerBuildEd Bartosh2016-04-061-35/+67
| | | | | | | | | | | | | | | | | | | Reimplemented triggerBuild method to support one build directory per project: - start bitbake server from the cloned repository - don't run observer - run bitbake build directly instead of triggering it through xmlrpc [YOCTO #7880] [YOCTO #9058] [YOCTO #8958] (Bitbake rev: aba8e19bf609196f749e185d43571f706707e408) 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: modified setLayers APIEd Bartosh2016-04-062-26/+1
| | | | | | | | | | | | Removed updating of bblayers.conf. It will be done in runBuild method. Changed return value: return list of layers. Removed _updateBBLayers method. (Bitbake rev: 198bf7e6b8d7f847f2619b71c6bd86a9a76156c9) 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: add brbe parameter to triggerBuildEd Bartosh2016-04-062-5/+3
| | | | | | | | | | | Called triggerBuild with brbe parameter instead of adding TOASTER_BRBE variable to the database and fetching it in triggerBuild. (Bitbake rev: 669bb3f6865d8bb89cd94ef9d0eba3346c47d7b2) 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: remove release APIEd Bartosh2016-04-062-12/+0
| | | | | | | | | | | | This API is quite dangerous as it removes build directory. It's not used anywhere and most probably will not be used in future as toaster is going to have one build directory per project. (Bitbake rev: ef9e126227d3bdee86c1592e2baa43d21e6a32df) 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: remove startBBServer APIEd Bartosh2016-04-062-41/+0
| | | | | | | | | | | | | | We still will have to run bitbake server, but it will be done different way and the code will be in triggerBuild function. Removed startBBServer API from BuildEnvironmentController and LocalhostBEController classes. (Bitbake rev: a8f986d73a84f28fa8b116b91fb30c5d2cd4edbe) 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: localhostbecontroller put generated layer in the builddirMichael Wood2016-03-231-3/+2
| | | | | | | | | | | | Move the generated layer for custom recipes into the build directory. The build directory makes more sense as this layer/recipe is generated for a particular build/project. (Bitbake rev: 77f3728ee6ea379bffcf73f33c26e982cb0795f4) 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: toaster: localhostbecontroller Allow file:/// uri type for git repoMichael Wood2016-03-231-2/+3
| | | | | | | | | | | | | | We don't need to skip file:/// uri type locations for git repositories. If you're using a file:/// uri you should know that it has to be a local path. [YOCTO #9200] igned-off-by: Michael Wood <michael.g.wood@intel.com> (Bitbake rev: 4d0e5804103c2d98d038b3c490cac37a73f3cc47) Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: localhostbecontroller Don't clear out toaster custom layer dirMichael Wood2016-03-231-3/+3
| | | | | | | | | | | | We may have a recipe which is based on a custom image recipe that has already been built so keep the recipe file around so that it can be read by the generate recipe function. (Bitbake rev: 502148fe498fe0a41ae89c9f649d3cb1253b0487) 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: toaster: use force_bytes to display non-ascii project namesSujith H2016-03-092-2/+4
| | | | | | | | | | | | | | | | | When user enters a non-ascii character in the project name of toaster, the build doesn't get triggered. Use force_bytes to fix this. Also deal with non-ascii project names when logging the build request in runbuilds. [YOCTO #9071] (Bitbake rev: b6141c4d170885d3bdf63074afcb1e41fde0a8f0) 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>
* bitbake: toaster: remove sshbecontroller moduleEd Bartosh2016-03-071-169/+0
| | | | | | | | | | | | | | The code of this module is broken for a long time. The functionality of it can be easily achieved by running 'manage.py runbuilds.py' on remote machine. [YOCTO #8806] (Bitbake rev: 975081eefdd7041a6b4bef6842c1bac9799a1b44) 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: don't use sshbecontrollerEd Bartosh2016-03-074-32/+19
| | | | | | | | | | | Removed usage of sshbecontroller from bbcontroller, models, tests and database schema. (Bitbake rev: 3ee06eb7e96de5dba539ad52201867e77d06a53e) 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: raise NotImplementedErrorEd Bartosh2016-03-073-11/+13
| | | | | | | | | | | | | | | Raised NotImplementedError instead of Exception to be able to catch it. This is a preparation for removing sshbecontroller module. It has to be done as code in bldcontrol/tests.py imports custom NotImplementedException from sshbecontroller. (Bitbake rev: c243ab6c83fe12d84777e4c3a18fd393827b9327) 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: buildinfohelper: unset brbe variable when build finishesElliot Smith2016-02-111-2/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The brbe variable is set on the bitbake server when the Toaster UI starts. This enables Toaster to associate events with the correct build and build environment. However, the brbe variable is also used when a build starts to identify whether a new build needs to be created, or an existing one looked up. This causes a bug for command-line builds which happen after a Toaster-triggered build: because the brbe variable is never unset on the server or the buildinfohelper, the new command-line build events are treated as originating from the previous build. Ensure the brbe variable is reset when the buildinfohelper "closes" a build, so that each build then either sets the brbe variable (Toaster-triggered builds) or leaves it blank (command-line builds). Also modify the localhostbecontroller so that the brbe variable is not set on the server and not looked up from the server. This ensures that it is only set when the triggerBuild() method is called, and that it remains as None for command-line builds. [YOCTO #9021] (Bitbake rev: 4a6a8d0074f62208d843b06344be31ae73d9b745) 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>
* bitbake: toaster: localhostbectrl Update the dirpath of customrecipe's base ↵Michael Wood2016-02-101-0/+19
| | | | | | | | | | | | | | layer We need to know the location of the based_on recipe's layer on the file system before we try and generate the custom image recipe. As we read the recipe to make the custom version. (Bitbake rev: e6a7cacbddd1df5bac0b79384199cf7264c5bbd5) 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: move CustomImageRecipe generation to API entry pointMichael Wood2016-02-101-15/+14
| | | | | | | | | | | | | | Use the CustomImageRecipe generate_recipe_file_contents to generate the recipe that we build from. Move creation of the dummy layer and recipe object to the point of recipe creation as we need these objects before the build time. Also update the methods to add and remove packages to account for the CustomImageRecipe inheriting from Recipe. (Bitbake rev: f3322567378d6038a00da0fab6c5641a1a8e5409) 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: localhostbecontroller CustomRecipe now base_recipe is RecipeMichael Wood2016-02-101-1/+1
| | | | | | | | | | | | Update the reference to the base_recipe. It is now a Recipe object rather than an intermediate AvailableRecipe object. Therefore doesn't need an extra traverse down the object hierarchy. (Bitbake rev: 8056ec65bd93005ecb7b0ed12dcb21b3b60df22c) 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: write variables to toaster.confEd Bartosh2016-01-191-0/+7
| | | | | | | | | | | | | | | With the resent change in rootfs creation code setVariable rpc calls don't set variables for bitbake workers anymore. Writen variables to toaster.conf should solve this issue. [YOCTO #8910] (Bitbake rev: d6dfe40320ff6ca420d9f9016b4d1d83d10f1d59) 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: use OneToOneField instead of ForeignKeyEd Bartosh2015-12-145-14/+13
| | | | | | | | | | | | | | | Used OneToOneField to reference BuildRequest in BRBitbake model. Fixed django warning: WARNINGS: Setting unique=True on a ForeignKey has the same effect as using a OneToOneField. (Bitbake rev: aaa4319ebbb06facb77b4ba936cf3aa2068ff238) Signed-off-by: Elliot Smith <elliot.smith@intel.com> 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: Update API used to make runbuilds methods run in transactionsElliot Smith2015-12-141-2/+2
| | | | | | | | | | | | | | | runbuilds previously had its methods decorated with transaction.commit_on_success, which is now deprecated. transaction.atomic is an (almost) drop-in replacement for this, so use this instead. [YOCTO #8364] (Bitbake rev: c4804b84eaaef6a81027bae5cf8bfe63d949c293) Signed-off-by: Elliot Smith <elliot.smith@intel.com> 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: Remove South migrationsEd Bartosh2015-12-149-1165/+112
| | | | | | | | | | | | | | South has been deprecated in favour of Django's own migration framework, so remove the old South migrations and replace them with Django ones. [YOCTO #8364] (Bitbake rev: 427d8bc02d1aa00a19057602d592d58334514804) Signed-off-by: Elliot Smith <elliot.smith@intel.com> 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: trigger SetBRBE eventEd Bartosh2015-12-141-0/+3
| | | | | | | | | | | | | Triggered MetadataEvent "SetBRBE" when TOASTER_BRBE variable is set on bitbake server. This should make buildinfohelper aware of the build request id, which is used to properly report build status and failures back to Toaster. (Bitbake rev: 8b136fb093020bc912a7b21d5163e1cd5fb12124) 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: implement BitbakeController.triggerEventEd Bartosh2015-12-141-0/+3
| | | | | | | | | | | This API will be used to pass data from Toaster to toaster_ui and buildinfohelper. (Bitbake rev: 6dca6fd47c5e8d66687fb07177e98cd531cd971d) 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: remove writeConfFile APIEd Bartosh2015-12-072-17/+0
| | | | | | | | | | | | This API is not used anymore as toaster doesn't write variables to configuration files anymore. It sets variables through its connection to bitbake server. (Bitbake rev: 6dda2916b75d688874d208192d5c7cdb302eec35) 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: set varibales on bitbake serverEd Bartosh2015-12-071-2/+9
| | | | | | | | | | | | | | Set project variables using connection to bitbake server instead of writing them to toaster configuration files. This is a way to avoid rewriting configuration files before and after every build, triggered by toaster UI. (Bitbake rev: 3f77c69b867735b5d27c6ab7c62e39ac8d5cb2b5) 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: implement BitbakeController.getVariableEd Bartosh2015-12-071-0/+3
| | | | | | | | | | | | Added new API to get value of bitbake variable from bitbake server. The API will be used to update INHERIT variable instead of writing it to the toaster configuration files. (Bitbake rev: effc371e3a4a2262e53e9e560c7c08cffad195da) 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: remove stopBBServer APIEd Bartosh2015-12-074-29/+0
| | | | | | | | | | | | Removed stopBBServer API from build controller as toaster doesn't stop bitbake server anymore. It's reused for both types of builds: triggered by UI and started manually. (Bitbake rev: 0cad802da171d51814f22cc9383f496a63cd0c75) 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: reimplemented startBBServer methodEd Bartosh2015-12-071-72/+18
| | | | | | | | | | | | | | | Rewritten LocalhostBEController.startBBServer to use 'toaster restart-bitbake' and read bitbake port number from bitbake.lock. Removed complicated logic of running oe-init-memres and looking for bitbake port number in the logs. (Bitbake rev: 4b065353c3454923a1ef88e9f0a8702e5626060e) 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: remove _setupBE functionEd Bartosh2015-12-071-17/+2
| | | | | | | | | | | | This function is not needed as build environment is always created because of the new way to run Toaster. It can be only sourced after oe-init-build-env is sourced. (Bitbake rev: 27a59b4373a449f17e46ab93e0eba15cf75967ae) 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: make runbuilds to loopEd Bartosh2015-12-071-3/+10
| | | | | | | | | | | | | Made runbuilds to loop to avoid having a loop in shell code and initialize heavy Django init machinery every second. Ignored exceptions to prevent exiting a loop. (Bitbake rev: e04da15556ca0936de652b8c085e4199e5551457) 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: localhostbectrl Pass DATABASE_URL in via the process ↵Elliot Smith2015-11-161-3/+10
| | | | | | | | | | | | | | | | | | | environment Instead of putting the DATABASE_URL as part of the command for launching the bitbake observer process set it as part of environment. This fixes two issues 1. Where the value isn't quoted and therefore will be interpreted in the shell and 2. Anyone being able to see the value of DATABASE_URL in the process tree. [YOCTO #8669] (Bitbake rev: 832a8523067606b180c02f0d1544e8a23219bb08) 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: toaster: Don't descend into directories for cached_layersMichael Wood2015-10-111-13/+16
| | | | | | | | | | | | | | | | | | | | | | As toaster makes use of clones of itself we have a mechanism to just clone the current checkout and use that as a basis for the git clone for the layers inside. For instance, in poky, if we're running in that directory, we don't ever want to change the current checkout so we make a copy of ourselves to do this work in. This steps through cached_layers and previously-traversed directories inside the current checkout to find any pre-existing checkouts. This was ending up traversing too many directories down, so remove the traverse and only deal with the current directory. [YOCTO #8463] (Bitbake rev: 9c40b3b6377ab8f5d6ac9b8e00585b71de00bf74) 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: toaster: fix naming for clone directoryEd Bartosh2015-10-111-1/+1
| | | | | | | | | | | | | | Toaster uses git url and branch to make a clone directory name. Current code leaves '@' and '%' characters unchanged, which can cause generation of wrong directory names. Fixed this issue by replacing '@' and '%' with underscore. (Bitbake rev: e076888a2120a37c388930073694750735d86507) 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: get rid of interactivity in bldcontrolbrian avery2015-10-111-101/+37
| | | | | | | | | | | | | | | | | | removed layer dir questions and base off TOASTER_DIR removed build dir questions and base off TOASTER_DIR base configuration file off of TOASTER_CONF fixed some pylint issues [YOCTO #8217] (Bitbake rev: d5811968b5f22093365f381fb7e75ab46e5269c2) Signed-off-by: brian avery <avery.brian@gmail.com> Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: Rationalise mimetype guessing to fix artifact downloadsElliot Smith2015-10-111-34/+0
| | | | | | | | | | | | | | | | | | | | Artifact download links were broken because the function to get the mimetype for the artifact was incorrectly using the underlying mimetype library. The function was also attached to the build environment controller, which was unnecessary, as we only support local controllers anyway. Remove the mimetype getter on the build environment and use the one in the view code instead. This works correctly and prevents the download error from occurring. [YOCTO #8369] (Bitbake rev: 805fb2a9388c728600596e9b845a5c7eeaebd99c) 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: move clones into subdirectoryEd Bartosh2015-09-291-1/+1
| | | | | | | | | | | | | | | | By default Toaster clones layers to the same level where poky clone is. This can look messy if a lot of layers are used for Toaster builds. Moving them into _toaster_clones/ subdirectory should make directory structure looking cleaner. It also safer to isolate toaster clones from what user might create. (Bitbake rev: 139e851831eea682aba0f9403dcc2eea7c1b05bd) 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: make clone directory name uniqueEd Bartosh2015-09-291-7/+2
| | | | | | | | | | | | | | | Changed naming scheme for clone directory. Used full git url and branch to make it unique. This should fix the issue with using the same git repository, but different protocols, e.g. git://some.git.repo and http://some.git.repo. [YOCTO #8101] (Bitbake rev: a9baf856a1ef7d84a47fa6615353f5b3fdb8a73b) 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: fix reimporting moduleEd Bartosh2015-09-291-1/+0
| | | | | | | | | | removed second 'import re' from localhostbecontroller.py (Bitbake rev: 30a9271ffa2834d9a4ffafe5c03ef9e874460419) 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: fix bug in resetting git repositoryEd Bartosh2015-09-291-1/+2
| | | | | | | | | | | | | | git reset --hard should be given either commit id or origin/<ref name> to work properly. Without this fix git will complain that origin/<commit id> does not exist. [YOCTO #7505] (Bitbake rev: ec05beff7d1b06e4df98199925c7102f5684f4e0) 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: use git reset --hard instead of rebaseEd Bartosh2015-09-291-1/+1
| | | | | | | | | | | | | | | | Replaced 'git checkout <ref> && git rebase' with 'git reset --hard' as with git checkout repository ends up with detached HEAD. Rebase makes things even worse as it can cause conflicts. git reset --hard resets repository to the required state in a most straightforward and reliable way. [YOCTO #7505] (Bitbake rev: f3641a8422e67890410594453b8baf362c27df2b) 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: don't use --single-branch when cloningEd Bartosh2015-09-291-2/+2
| | | | | | | | | | | | | | | | | git clone --single-branch works only with ref names. It fails if commit sha1 is set in layer configuration with this error: fatal: Remote branch <commit sha1> not found in upstream origin Cloning repository without using --single-branch should work for refs and commit sha1. [YOCTO #7505] (Bitbake rev: edac7b7533d50455baaaf05a46b7ace49bb24b95) 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>