1
0
mirror of https://git.yoctoproject.org/poky synced 2026-06-09 03:40:18 +00:00

devtool: make add_md5 a public API

Moved _add_md5 function from standard.py to __init__.py to
be able to call it from other modules.

(From OE-Core rev: ee38bb20dc7ba21dac782d8d13383f81dfedef55)

(From OE-Core rev: b07da7d38bcefe8efdd6b22bb9251bef599ef040)

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Ed Bartosh
2015-08-21 15:57:00 +03:00
committed by Richard Purdie
parent 491e86aafe
commit 69c63728da
2 changed files with 10 additions and 10 deletions
+6
View File
@@ -110,3 +110,9 @@ def setup_tinfoil(config_only=False):
tinfoil.logger.setLevel(logger.getEffectiveLevel())
return tinfoil
def add_md5(config, recipename, filename):
"""Record checksum of a recipe to the md5-file of the workspace"""
import bb.utils
md5 = bb.utils.md5_file(filename)
with open(os.path.join(config.workspace_path, '.devtool_md5'), 'a') as f:
f.write('%s|%s|%s\n' % (recipename, os.path.relpath(filename, config.workspace_path), md5))