[oe-commits] [openembedded-core] 27/38: buildhistory: fix latest_srcrev in the common case
git at git.openembedded.org
git at git.openembedded.org
Thu Apr 5 14:14:50 UTC 2018
This is an automated email from the git hooks/post-receive script.
rpurdie pushed a commit to branch morty
in repository openembedded-core.
commit 4243555ab91ab763a098259011dfa72156bfe0b3
Author: Christopher Larson <chris_larson at mentor.com>
AuthorDate: Tue Feb 27 17:06:17 2018 -0800
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 at mentor.com>
Signed-off-by: Ross Burton <ross.burton at intel.com>
(cherry picked from commit ef826a395612400924bbe49859d256b237ff59e1)
Signed-off-by: Andre McCurdy <armccurdy at gmail.com>
Signed-off-by: Armin Kuster <akuster808 at gmail.com>
---
meta/classes/buildhistory.bbclass | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/meta/classes/buildhistory.bbclass b/meta/classes/buildhistory.bbclass
index 3a5bc2c..d82e9bb 100644
--- a/meta/classes/buildhistory.bbclass
+++ b/meta/classes/buildhistory.bbclass
@@ -833,7 +833,7 @@ python write_srcrev() {
f.write('# SRCREV_%s = "%s"\n' % (name, orig_srcrev))
f.write('SRCREV_%s = "%s"\n' % (name, srcrev))
else:
- f.write('SRCREV = "%s"\n' % srcrevs.values())
+ f.write('SRCREV = "%s"\n' % next(iter(srcrevs.values())))
if len(tag_srcrevs) > 0:
for name, srcrev in tag_srcrevs.items():
f.write('# tag_%s = "%s"\n' % (name, srcrev))
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Openembedded-commits
mailing list