]> code.ossystems Code Review - openembedded-core.git/commit
buildhistory: fix latest_srcrev in the common case
authorChristopher Larson <chris_larson@mentor.com>
Mon, 17 Oct 2016 23:02:53 +0000 (16:02 -0700)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Fri, 28 Oct 2016 10:27:33 +0000 (11:27 +0100)
commitef826a395612400924bbe49859d256b237ff59e1
tree9ca816b99cc42e8f5fb847232da6c5d1eea103ef
parent0c89b010ce2e426f55ac7c6f94befef988913834
buildhistory: fix latest_srcrev in the common case

buildhistory was writing srcrevs.values() as SRCREV when only one
srcrev/branch exists. This returns a view of the dictionary values in python
3, and used to return a list in python 2, neither of which is an appropriate
value for SRCREV. It was resulting in latest_srcrev files like this:

    # SRCREV = "346584bf6e38232be8773c24fd7dedcbd7b3d9ed"
    SRCREV = "dict_values(['346584bf6e38232be8773c24fd7dedcbd7b3d9ed'])"

Which in turn would result in invalid output in buildhistory-collect-srcrevs.
Fix by calling `next(iter())` on the `.values()`

Signed-off-by: Christopher Larson <chris_larson@mentor.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
meta/classes/buildhistory.bbclass