Bug 5897

Summary: Enabling build history causes toolchain to be recompiled
Product: [Build System, Metadata & Runtime] OE-Core Reporter: Jonathan Liu <net147>
Component: devtools / tool chainAssignee: Paul Eggleton <bluelightning>
Status: VERIFIED FIXED QA Contact: Andra Necula <andrax.g.necula>
Severity: normal    
Priority: Medium+ CC: alexandru.c.georgescu, andrax.g.necula, bluelightning, laurentiu.palcu, meta.mr.watcher, meta.watcher, srifenbark
Version: 1.6   
Target Milestone: 1.6 M4   
Hardware: All   
OS: Multiple   
Whiteboard: TC needed
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: Done (doc changes complete)

Description Jonathan Liu 2014-03-01 08:02:20 UTC
Build Configuration:
BB_VERSION        = "1.21.1"
BUILD_SYS         = "x86_64-linux"
NATIVELSBSTRING   = "Arch-rolling"
TARGET_SYS        = "i586-poky-linux"
MACHINE           = "qemux86"
DISTRO            = "poky"
DISTRO_VERSION    = "1.5+snapshot-20140301"
TUNE_FEATURES     = "m32 i586"
TARGET_FPU        = ""
meta
meta-yocto
meta-yocto-bsp    = "master:8f36e1ef1afd10594391596391564e8904a840f2"

On a clean checkout of poky master:
1. . oe-init-build-env
2. bitbake core-image-minimal
3. Add the following to local.conf:
INHERIT += "buildhistory"
BUILDHISTORY_COMMIT = "1"
4. bitbake core-image-minimal

At step 4, the toolchain is compiled again.
Comment 1 Jonathan Liu 2014-03-01 08:55:35 UTC
The manual says enabling build history will result in packaging tasks being re-run but it does not say that packages will be recompiled.
Comment 2 Paul Eggleton 2014-03-03 11:52:39 UTC
It seems my recent "fix" didn't actually fix the problem for recipes that themselves add to SSTATEPOSTINSTFUNCS (e.g. eglibc-initial) - the value is still changing.
Comment 3 Paul Eggleton 2014-03-03 17:16:00 UTC
The fix here required adding a new "vardepvalueexclude" varflag to BitBake (which does need documenting) and two patches to OE-Core; I have sent all of these out.
Comment 5 Laurentiu Palcu 2014-03-10 06:47:19 UTC
This still happens. I tried the following:

1. MACHINE=qemux86-64 bitbake -c populate_sdk core-image-minimal

2. added the following in local.conf:

INHERIT += "buildhistory"                                                       
BUILDHISTORY_COMMIT = "1"                                                       

3. MACHINE=qemux86-64 bitbake -c populate_sdk core-image-minimal

At this point, almost everything is getting rebuilt...
Comment 6 Paul Eggleton 2014-03-12 10:04:54 UTC
Hopefully the last fix:

http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=a3f0852b1460188a7f95fb9079e665797fc63f7c

I'll be adding a bug to add a QA test for this as well.
Comment 7 Scott Rifenbark 2014-03-20 19:26:15 UTC
Hi, 

The documentation fix for this was to add some varflags to the list in http://www.yoctoproject.org/docs/1.6/user-manual/user-manual.html#variable-flags.  In particular, the new flag "vardepvalueexclude".  Along with that varflag are some other flags that help with the signature stuff. 

Paul reviewed these changes and approved them. 

Scott
Comment 8 Alexandru Georgescu 2014-07-31 14:26:42 UTC
(In reply to comment #6)
> Hopefully the last fix:
> 
> http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/
> ?id=a3f0852b1460188a7f95fb9079e665797fc63f7c
> 
> I'll be adding a bug to add a QA test for this as well.

Hi Paul,
Can you tell me the bug no?
Comment 9 Paul Eggleton 2014-07-31 14:29:29 UTC
The bug to add the test for this is bug 5953.
Comment 10 Alexandru Georgescu 2014-08-01 08:03:56 UTC
(In reply to comment #9)
> The bug to add the test for this is bug 5953.

Ok thanks. I see that Corneliu is assigned to it so I am adding him as a QA contact. I also marked 5953 as a "TC needed" into the whiteboard
Comment 11 Alexandru Georgescu 2014-09-23 11:36:59 UTC
Mihai, you could add also a TC for images, not only TC itself
Comment 12 Andra Necula 2014-10-01 08:59:08 UTC
Verified on master commit: 8ac8eca2e3bd8c78e2b31ea974930ed0243258a3