diff options
author | Ola x Nilsson <ola.x.nilsson@axis.com> | 2016-12-22 14:59:49 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2017-01-09 13:27:00 +0000 |
commit | 9ddcfb51e637acba82089da6430ac77e29f0f1ef (patch) | |
tree | 66172d726d45455f42a048da67213628aa969c39 /meta/classes | |
parent | 6d60f60e38e0e00e6753f5b136277f27d6204e63 (diff) | |
download | openembedded-core-9ddcfb51e637acba82089da6430ac77e29f0f1ef.tar.gz openembedded-core-9ddcfb51e637acba82089da6430ac77e29f0f1ef.tar.bz2 openembedded-core-9ddcfb51e637acba82089da6430ac77e29f0f1ef.zip |
externalsrc: Add optional srcdir arg to srctree_hash_files
Make it easier to reuse the function for other dirs than EXTERNALSRC.
Signed-off-by: Ola x Nilsson <ola.x.nilsson@axis.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Diffstat (limited to 'meta/classes')
-rw-r--r-- | meta/classes/externalsrc.bbclass | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/meta/classes/externalsrc.bbclass b/meta/classes/externalsrc.bbclass index eec5e61564..6ec46a6b15 100644 --- a/meta/classes/externalsrc.bbclass +++ b/meta/classes/externalsrc.bbclass @@ -143,12 +143,12 @@ python externalsrc_compile_prefunc() { bb.plain('NOTE: %s: compiling from external source tree %s' % (d.getVar('PN'), d.getVar('EXTERNALSRC'))) } -def srctree_hash_files(d): +def srctree_hash_files(d, srcdir=None): import shutil import subprocess import tempfile - s_dir = d.getVar('EXTERNALSRC') + s_dir = srcdir or d.getVar('EXTERNALSRC') git_dir = os.path.join(s_dir, '.git') oe_hash_file = os.path.join(git_dir, 'oe-devtool-tree-sha1') @@ -166,7 +166,7 @@ def srctree_hash_files(d): fobj.write(sha1) ret = oe_hash_file + ':True' else: - ret = d.getVar('EXTERNALSRC') + '/*:True' + ret = s_dir + '/*:True' return ret def srctree_configure_hash_files(d): |