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

Paul Eggleton paul.eggleton at intel.com
Wed Feb 10 12:31:27 UTC 2016


On Mon, 08 Feb 2016 13:35:20 Patrick Ohly wrote:
> 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

I think you'd be more likely to just set this in the auto.conf created by the 
CI infrastructure, but of course there's nothing to stop you doing it this 
way.

> > > 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"?

FWIW, I'm reasonably happy with this if we add the suggested comments and 
rename the variable to BUILDHISTORY_RESET.

Cheers,
Paul

-- 
Paul Eggleton
Intel Open Source Technology Centre



More information about the Openembedded-core mailing list