[OE-core] [PATCH] buildhistory.bbclass: remove out-dated information on request

Patrick Ohly patrick.ohly at intel.com
Mon Feb 8 12:35:20 UTC 2016


On Mon, 2016-02-08 at 08:52 +0000, Richard Purdie wrote:
> On Mon, 2016-02-08 at 07:56 +0100, Patrick Ohly wrote:
> > buildhistory.bbclass by design is incremental: each build adds or
> > updates information. Information is never removed.
> > 
> > Sometimes it can be useful to reduce the information only to those
> > recipes that were build during a specific bitbake invocation, for
> > example when the invocation does a full world build.
> > 
> > This is now possible by invoking bitbake with:
> >    BB_ENV_EXTRAWHITE=BUILDHISTORY_REMOVE_OLD
> > BUILDHISTORY_REMOVE_OLD=1 bitbake
> > 
> > In this mode, buildhistory.bbclass first moves all existing
> > information into a temporary directory called "old" inside the build
> > history directory. There the information is used for the "version
> > going backwards QA check". Then when the build is complete and before
> > (potentially) committing to git, the temporary directory gets
> > deleted.
> > 
> > Because information that has not changed during the build will be
> > reconstructed, a git log will then only show real updates, additions
> > and removals.
> > 
> > Signed-off-by: Patrick Ohly <patrick.ohly at intel.com>
> 
> The implicit assumption here is that you'd only every build large
> targets like "world". A "bitbake bash" isn't really going to do what
> you'd expect/want.

Yes, I know. I think the "reduce the information only to those recipes
that were built during a specific bitbake invocation" is a bit clearer
about that than the last paragraph, which assumes a full build.

> I think we need to make that clearer in the comments and that this is
> only useful on automated infrastructure.

I wouldn't say that. One could do "BUILDHISTORY_REMOVE_OLD=1 bitbake
<something> && bitbake <something else> && bitbake <even more>", and
that would work fine also when doing manual builds. The drawback in that
case is that the version-going-backwards check does not work for
<something else> and <even more>.

Perhaps it would be more appropriate to replace BUILDHISTORY_REMOVE_OLD
with "BUILDHISTORY_RESET"?

-- 
Best Regards, Patrick Ohly

The content of this message is my personal opinion only and although
I am an employee of Intel, the statements I make here in no way
represent Intel's position on the issue, nor am I authorized to speak
on behalf of Intel on this matter.






More information about the Openembedded-core mailing list