[bitbake-devel] [PATCH] cooker: Ensure BB_CONSOLE remains correct over server resets

Smith, Elliot elliot.smith at intel.com
Fri Oct 16 15:57:20 UTC 2015


Thanks for these, Richard.

On 11 October 2015 at 10:22, Richard Purdie <
richard.purdie at linuxfoundation.org> wrote:

> The console log data is written to is created at console initialisation
> time and does not change over reset events. This ensures the
> BB_CONSOLELOG value is correct over such resets by preserving it.
>

I've put your three patches on top of master and ran a few builds. The
result is that all of the logs for those builds are going into a single
timestamped file. Before, they went to separate files. Is this intentional,
or was the old behaviour incorrect? (Ideally, toaster needs a separate log
file for each build.)

Thanks.
Elliot




>
> Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
> ---
>  bitbake/lib/bb/cooker.py | 7 +++++++
>  1 file changed, 7 insertions(+)
>
> diff --git a/bitbake/lib/bb/cooker.py b/bitbake/lib/bb/cooker.py
> index 9c9d761..ba0a8fe 100644
> --- a/bitbake/lib/bb/cooker.py
> +++ b/bitbake/lib/bb/cooker.py
> @@ -244,6 +244,11 @@ class BBCooker:
>          self.state = state.initial
>          self.caches_array = []
>
> +        # Need to preserve BB_CONSOLELOG over resets
> +        consolelog = None
> +        if hasattr(self, "data"):
> +            consolelog = self.data.getVar("BB_CONSOLELOG", True)
> +
>          if CookerFeatures.BASEDATASTORE_TRACKING in self.featureset:
>              self.enableDataTracking()
>
> @@ -270,6 +275,8 @@ class BBCooker:
>          self.data = self.databuilder.data
>          self.data_hash = self.databuilder.data_hash
>
> +        if consolelog:
> +            self.data.setVar("BB_CONSOLELOG", consolelog)
>
>          # we log all events to a file if so directed
>          if self.configuration.writeeventlog:
>
>
>


-- 
Elliot Smith
Software Engineer
Intel Open Source Technology Centre
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openembedded.org/pipermail/bitbake-devel/attachments/20151016/8e110238/attachment-0002.html>


More information about the bitbake-devel mailing list