diff options
author | Ed Bartosh <ed.bartosh@linux.intel.com> | 2015-08-30 17:12:50 +0300 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2015-08-31 11:36:48 +0100 |
commit | 3823b7abf8c1e82e0448d7283de95422fd262135 (patch) | |
tree | afcdcf3ca160c55b9f96ae3afbc52693e04d6ebb | |
parent | f0e61a0d5597017c5f5d2dafb41118b79f505d9b (diff) | |
download | openembedded-core-3823b7abf8c1e82e0448d7283de95422fd262135.tar.gz openembedded-core-3823b7abf8c1e82e0448d7283de95422fd262135.tar.bz2 openembedded-core-3823b7abf8c1e82e0448d7283de95422fd262135.zip |
Revert "devtool: make add_md5 a public API"
This reverts commit 69c63728dae38d5b1cc9874268f235a07e04d3db.
Moved add_md5 back to standard.py as it's not used in
any plugin anymore.
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
-rw-r--r-- | scripts/lib/devtool/__init__.py | 7 | ||||
-rw-r--r-- | scripts/lib/devtool/standard.py | 15 |
2 files changed, 11 insertions, 11 deletions
diff --git a/scripts/lib/devtool/__init__.py b/scripts/lib/devtool/__init__.py index 97ac6aeb80..404d3e6645 100644 --- a/scripts/lib/devtool/__init__.py +++ b/scripts/lib/devtool/__init__.py @@ -110,13 +110,6 @@ 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)) - def get_recipe_file(cooker, pn): """Find recipe file corresponding a package name""" import oe.recipeutils diff --git a/scripts/lib/devtool/standard.py b/scripts/lib/devtool/standard.py index 97c45d93b0..de7afd97c2 100644 --- a/scripts/lib/devtool/standard.py +++ b/scripts/lib/devtool/standard.py @@ -26,7 +26,7 @@ import argparse import scriptutils import errno from devtool import exec_build_env_command, setup_tinfoil, DevtoolError -from devtool import add_md5, parse_recipe +from devtool import parse_recipe logger = logging.getLogger('devtool') @@ -105,7 +105,7 @@ def add(args, config, basepath, workspace): except bb.process.ExecutionError as e: raise DevtoolError('Command \'%s\' failed:\n%s' % (e.command, e.stdout)) - add_md5(config, args.recipename, recipefile) + _add_md5(config, args.recipename, recipefile) initial_rev = None if os.path.exists(os.path.join(srctree, '.git')): @@ -121,7 +121,7 @@ def add(args, config, basepath, workspace): if initial_rev: f.write('\n# initial_rev: %s\n' % initial_rev) - add_md5(config, args.recipename, appendfile) + _add_md5(config, args.recipename, appendfile) return 0 @@ -344,6 +344,13 @@ def _extract_source(srctree, keep_temp, devbranch, d): shutil.rmtree(tempdir) return initial_rev +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)) + def _check_preserve(config, recipename): """Check if a recipe was manually changed and needs to be saved in 'attic' directory""" @@ -471,7 +478,7 @@ def modify(args, config, basepath, workspace): for commit in commits: f.write('# commit: %s\n' % commit) - add_md5(config, args.recipename, appendfile) + _add_md5(config, args.recipename, appendfile) logger.info('Recipe %s now set up to build from %s' % (args.recipename, srctree)) |