Bug 9075

Summary: buildhistory-diff does not work if the build history is stored in a Git submodule
Product: [Build System, Metadata & Runtime] OE-Core Reporter: ulfalizer
Component: Scripts and ToolsAssignee: ulfalizer
Status: RESOLVED WORKSFORME QA Contact:
Severity: normal    
Priority: Medium CC: eduard.bartosh, ross.burton
Version: 2.1   
Target Milestone: 2.2   
Hardware: x86   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: No (bug/feature does not impact docs)

Description ulfalizer 2016-02-08 15:11:22 UTC
...because gitdb returns a Repo instance corresponding to the _main_ repository instead of the submodule if you give it a submodule path.

Assuming buildhistory/ is a Git submodule, a simple way to verify this is running

  $ poky/scripts/buildhistory-diff <a revision from the submodule>

, which gives a 'Specified git revision <rev> is not valid' error.

On the other hand,

  $ poky/scripts/buildhistory-diff <a revision from the main repository>

works, but doesn't print any useful info as the main repository is not a buildhistory repo.
Comment 1 Ed Bartosh 2016-03-31 11:27:03 UTC
I can't reproduce this.

Here is what I tried:

1. add buildhistory as a submodule:
git submodule add file:///home/ed/git/yocto/poky/build/buildhistory bh

2. run buildhistory-diff for it:
$ buildhistory-diff -p bh -a HEAD~6
images/qemux86_64/glibc/core-image-minimal: DISTRO_VERSION changed from "2.0+snapshot-20160330" to "2.0+snapshot-20160331"

3. run buildhistory-diff for build/buildhistory to compare the output:
$ buildhistory-diff -a HEAD~6
images/qemux86_64/glibc/core-image-minimal: DISTRO_VERSION changed from "2.0+snapshot-20160330" to "2.0+snapshot-20160331"

As you can see the output is the same in both cases.
Please, provide details of your setup and instructions how to reproduce the issue. Thanks.
Comment 2 Ed Bartosh 2016-05-19 15:02:17 UTC
Closing as worksforme. Feel free to re-open and provide more details.