Commit Graph

74 Commits

Author SHA1 Message Date
Olaf Mandel 9566ec3c3a bitbake: toaster: debug message for lists layers missing separators
One of the debug messages during build contains a list of all layers
but without spaces or other separators between them. Use pformat
instead.

[YOCTO #12014]

(Bitbake rev: 00fb88c9c969ae9b38004adf236c057628b3227d)

Signed-off-by: Olaf Mandel <o.mandel@menlosystems.com>
Signed-off-by: David Reyna <David.Reyna@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-09-21 16:51:07 +01:00
Michael Wood 5de7f159a1 bitbake: toaster: bldcontrol Move CustomImageRecipe file creation into own function
Move the custom image file creation (i.e. create the layer file
structure, conf and recipe file) into it's own function and remove the
creation of the BRLayer as this is done at schedule_build just like all
the other layers.

Fix a bug where the toaster-custom-images layer was always being appened
to the layer list if the directory exists.

(Bitbake rev: 15a42b36c01fccd79e5aa0788dea5640b253982b)

Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-11-30 15:48:10 +00:00
Michael Wood 30a9f65dcc bitbake: toaster: buildinfohelper toaster-custom-images layer
This fixes the unidentified layers issue by making the
toaster-custom-images layer a local layer. By doing this we also fix the
git assumptions made for the local layers which stop recipes and other
meta data being associated with them. This also removed some of the
special casing previously needed when we didn't have the concept of a
local (non git) layer.

Also rename created flag var to a have a different var for each returned
value so that the same value isn't used multiple times.

[YOCTO #10220]

(Bitbake rev: ba5332d4960d7f4f79aef63136796e2fa67284e3)

Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-11-30 15:48:10 +00:00
Sujith H fa5ea98d3b bitbake: toaster: localhostbecontroller write toaster layers for project to toaster-bblayers.conf
Instead of updating conf/bblayers, here we update toaster-bblayers.conf
file. So extra effort to update bblayers.conf can be removed safely.

(Bitbake rev: f3e99d820f3798869a2a1d1604709c1c324dbbab)

Signed-off-by: Sujith H <sujith.h@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-11-30 15:48:10 +00:00
Sujith H 5f0405abed bitbake: toaster: localhostbecontroller accept custom init script for build
When passed variable CUSTOM_BUILD_INIT_SCRIPT to toaster
setting, it would be nice to use it. Else toaster
can use oe-init script. This gives an oppurtunity to
use customized build init scritps.

(Bitbake rev: 9d168bb5f05453bdb7156793eea25da0a3119b4d)

Signed-off-by: Sujith H <sujith.h@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-11-30 15:48:10 +00:00
Ed Bartosh 146eb22b0e bitbake: toaster: fix cloning of git+ssh repositories
Replaced '+' -> '_' to avoid having '+' in folder name.

Thanks Stephan Dünner for this fix.

(Bitbake rev: 858ade277d3bd62e84d3d78e9302f766c1b31dfb)

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-10-09 12:33:26 +01:00
Ed Bartosh 483c16a7ce bitbake: toaster: fix checking of repository url
Toaster checks gir repository url is the same as locally cloned before
checking it out to existing local clone. This check can be skipped if
commit is 'HEAD' as in this case repository is not hard reset to
commit, so the local clone won't be changed.

[YOCTO #10163]

(Bitbake rev: 7e9a89e3fde5e71cb859799635974ec41790c44d)

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>
2016-09-21 21:58:06 +01:00
Michael Wood de83a8ab6d bitbake: toaster: localhostbecontroller Remove git assumption
We don't need to force everyone to use git for the method in which
openembedded-core is downloaded. For instance it could have been
downloaded and extracted as a tarball.

(Bitbake rev: 8b7180332691a41a013e07a52b26018402141b6a)

Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Elliot Smith <elliot.smith@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-02 18:09:50 +01:00
Michael Wood 3b87f2895a bitbake: toaster: Fix oe-core fixture
Due to a copy paste error we managed to get some of the wrong
information in the oe fixture that provides a suggested default settings
for Toaster. This meant it tested correctly when it shouldn't have.
Fix:
 - The use of local bitbake
 - An incorrect call to realpath which didn't include its parent module.
 - The field used for the local_dir of an existing openembedded-core

(Bitbake rev: d57a9124650e5367919668dfccf6aad4962a77f1)

Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Elliot Smith <elliot.smith@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-02 18:09:50 +01:00
Sujith H ef617e6f34 bitbake: toaster: collect details for local dir imported from ui
Collect the dir path imported from UI and make
sure that its getting added to bblayers.conf.
This patch exactly does the same job. Any layer
which is imported locally need not be cloned
again to _toaster_clones dir.

[YOCO #9911]

(Bitbake rev: 5669157994fc220a018e37927600988f3fd43271)

Signed-off-by: Sujith H <sujith.h@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-08-11 00:09:29 +01:00
Ed Bartosh 7cd768061b bitbake: toaster: use knotty when working with bitbake server
Using empty BITBAKE_UI environment variable causes bitbake server
to fail with the error:
    FATAL: Unable to import extension module "" from bb.ui
           Valid extension modules: knotty or toasterui\n'

Used BITBAKE_UI="knotty" when starting and stoping bitbake
server to solve above issue.

(Bitbake rev: b9a9ddfb6f53259be214032fb93812149d0cce19)

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-06-02 08:24:04 +01:00
Ed Bartosh 96ce543150 bitbake: toaster: use decode('utf-8') for binary data
Decoded binary data to utf-8 to fix the following
error when runnign on python 3:
TypeError: Type str doesn't support the buffer API

[YOCTO #9584]

(Bitbake rev: 752ea00919ef054622a51ce097923309934eff2b)

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-06-02 08:24:03 +01:00
Ed Bartosh 9a3f2b3912 bitbake: toaster: fix local imports
Replaced local imports with absolute imports.
Used .module for local imports.

This should make the code to work on python 2 and python 3.

[YOCTO #9584]

(Bitbake rev: 3f1e68c783308dcb51242d0fdeef758e581ccc8c)

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-06-02 08:24:03 +01:00
Richard Purdie 654eadfa30 bitbake: bitbake: Update logger.warn() -> logger.warning()
python deprecated logger.warn() in favour of logger.warning(). This is only
used in bitbake code so we may as well just translate everything to avoid
warnings under python 3. Its safe for python 2.7.

(Bitbake rev: 676a5f592e8507e81b8f748d58acfea7572f8796)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-05-11 10:34:30 +01:00
Ed Bartosh 52c8740e1b bitbake: toaster: get bitbake location from BBBASEDIR
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>
2016-04-06 23:10:30 +01:00
Ed Bartosh 4aafcae5e4 bitbake: toaster: use empty token
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>
2016-04-06 23:10:30 +01:00
Sujith H 5f862bb567 bitbake: toaster: update BuildEnvironmentController and BitbakeController
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>
2016-04-06 23:10:29 +01:00
Ed Bartosh c4ae028209 bitbake: toaster: use bash explicitly
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>
2016-04-06 23:10:28 +01:00
Ed Bartosh 590a8159aa bitbake: toaster: stop bitbake server after the build
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>
2016-04-06 23:10:28 +01:00
Ed Bartosh a8f6001e0f bitbake: toaster: add new parameter to _shellcmd
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>
2016-04-06 23:10:28 +01:00
Ed Bartosh a43a16b9fd bitbake: toaster: reimplement triggerBuild
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>
2016-04-06 23:10:28 +01:00
Ed Bartosh ab18c208b2 bitbake: toaster: modified setLayers API
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>
2016-04-06 23:10:28 +01:00
Ed Bartosh 22fba9b2b7 bitbake: toaster: add brbe parameter to triggerBuild
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>
2016-04-06 23:10:28 +01:00
Ed Bartosh 829a0bdb48 bitbake: toaster: remove release API
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>
2016-04-06 23:10:27 +01:00
Ed Bartosh 7068e8a056 bitbake: toaster: remove startBBServer API
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>
2016-04-06 23:10:27 +01:00
Michael Wood 5c49230deb bitbake: toaster: localhostbecontroller put generated layer in the builddir
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>
2016-03-23 17:53:56 +00:00
Michael Wood b60c9943bf bitbake: toaster: localhostbecontroller Allow file:/// uri type for git repo
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>
2016-03-23 17:53:55 +00:00
Michael Wood 3df6551d8c bitbake: toaster: localhostbecontroller Don't clear out toaster custom layer dir
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>
2016-03-23 17:53:55 +00:00
Elliot Smith 1f7f077466 bitbake: buildinfohelper: unset brbe variable when build finishes
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>
2016-02-11 22:34:19 +00:00
Michael Wood 971d65c614 bitbake: toaster: localhostbectrl Update the dirpath of customrecipe's base 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>
2016-02-10 13:29:19 +00:00
Michael Wood 2cf55afb97 bitbake: toaster: move CustomImageRecipe generation to API entry point
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>
2016-02-10 13:29:17 +00:00
Michael Wood 14d09c8b22 bitbake: toaster: localhostbecontroller CustomRecipe now base_recipe is Recipe
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>
2016-02-10 13:29:16 +00:00
Ed Bartosh f130033856 bitbake: toaster: write variables to toaster.conf
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>
2016-01-19 17:38:51 +00:00
Ed Bartosh 84daa40bc7 bitbake: toaster: use OneToOneField instead of ForeignKey
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>
2015-12-14 23:13:07 +00:00
Ed Bartosh 0274b68450 bitbake: toaster: trigger SetBRBE event
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>
2015-12-14 23:13:06 +00:00
Ed Bartosh 361faa3e6c bitbake: toaster: remove writeConfFile API
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>
2015-12-07 17:37:10 +00:00
Ed Bartosh fcbba5a89b bitbake: toaster: set varibales on bitbake server
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>
2015-12-07 17:37:10 +00:00
Ed Bartosh 58765a8719 bitbake: toaster: remove stopBBServer API
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>
2015-12-07 17:37:09 +00:00
Ed Bartosh 95a3cf7549 bitbake: toaster: reimplemented startBBServer method
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>
2015-12-07 17:37:09 +00:00
Ed Bartosh 76d53b5856 bitbake: toaster: remove _setupBE function
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>
2015-12-07 17:37:09 +00:00
Elliot Smith 9d8e36a6c9 bitbake: toaster: localhostbectrl Pass DATABASE_URL in via the process 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>
2015-11-16 11:55:07 +00:00
Michael Wood e35c404537 bitbake: toaster: Don't descend into directories for cached_layers
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>
2015-10-11 08:12:58 +01:00
Ed Bartosh 8c695393cd bitbake: toaster: fix naming for clone directory
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>
2015-10-11 05:39:50 +01:00
Ed Bartosh 4bc3f0994e bitbake: toaster: move clones into subdirectory
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>
2015-09-29 14:11:39 +01:00
Ed Bartosh 9e1516d2bf bitbake: toaster: make clone directory name unique
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>
2015-09-29 14:11:39 +01:00
Ed Bartosh 552fd83d82 bitbake: toaster: fix reimporting module
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>
2015-09-29 14:11:39 +01:00
Ed Bartosh 55dc9279c8 bitbake: toaster: fix bug in resetting git repository
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>
2015-09-29 14:11:39 +01:00
Ed Bartosh 693934031a bitbake: toaster: use git reset --hard instead of rebase
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>
2015-09-29 14:11:39 +01:00
Ed Bartosh 3d73dfa223 bitbake: toaster: don't use --single-branch when cloning
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>
2015-09-29 14:11:38 +01:00
Ed Bartosh 934f8d7b23 bitbake: toaster: create custom layer and recipes for Image customisation
When building customised recipes toaster creates custom layer directory
and puts layer.conf and custom recipes to it.

[YOCTO #8075]

(Bitbake rev: f81b48c30a548bee946d34c56aa1872785bcec30)

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>
2015-09-29 14:11:36 +01:00