Bug 7966

Summary: buildhistory should write git SHAs
Product: [Build System, Metadata & Runtime] OE-Core Reporter: Ross Burton <ross.burton>
Component: devtools / tool chainAssignee: Paul Eggleton <bluelightning>
Status: VERIFIED FIXED QA Contact: Bogdan Alexandru Voiculescu <bogdanx.a.voiculescu>
Severity: enhancement    
Priority: Low CC: bogdanx.a.voiculescu, meta.mr.watcher, meta.watcher
Version: 1.9   
Target Milestone: 1.9   
Hardware: All   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: No (bug/feature does not impact docs)

Description Ross Burton 2015-07-07 21:19:43 UTC
It would be awesome if buildhistory could detect if it were running in a git repo and write the layer SHAs to the repo somewhere, like bitbake does when it starts up.

When my buildhistory log is "bitbake core-image-sato" 20 times it would help to differentiate what build was what.
Comment 1 Paul Eggleton 2015-07-07 22:14:08 UTC
Unless I'm misunderstanding the request, it already does this in two places - metadata-revs at the root of the buildhistory repo (machine-readable, written out on every build), and build-id.txt under the directory for an image (only written when building an image, and the format is the same as bitbake's preamble output).
Comment 2 Ross Burton 2015-07-07 22:33:48 UTC
You're not mistaken.  Would it be convenient/possible/useful to put this into the commit log to?
Comment 4 Bogdan Alexandru Voiculescu 2015-09-03 12:07:00 UTC
Verified on master: 
cat buildhistory/metadata-revs
meta              = master:71b0568fa43285f0946fae93fb43cea5f3bbecec
meta-yocto        = master:71b0568fa43285f0946fae93fb43cea5f3bbecec
meta-yocto-bsp    = master:71b0568fa43285f0946fae93fb43cea5f3bbece