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:39:11 +0000 |
| commit | 02f89167a394d3a64ac0699f8ecae18563e560ab (patch) | |
| tree | 1acb716d9070b99d045b653067df46f419da9bf2 /meta | |
| parent | 61b1e186085dbecbd25cd6b8f17b313ca92bbc1a (diff) | |
| download | poky-02f89167a394d3a64ac0699f8ecae18563e560ab.tar.gz | |
externalsrc: Add optional srcdir arg to srctree_hash_files
Make it easier to reuse the function for other dirs than EXTERNALSRC.
(From OE-Core rev: 9ddcfb51e637acba82089da6430ac77e29f0f1ef)
Signed-off-by: Ola x Nilsson <ola.x.nilsson@axis.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
| -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() { | |||
| 143 | bb.plain('NOTE: %s: compiling from external source tree %s' % (d.getVar('PN'), d.getVar('EXTERNALSRC'))) | 143 | bb.plain('NOTE: %s: compiling from external source tree %s' % (d.getVar('PN'), d.getVar('EXTERNALSRC'))) |
| 144 | } | 144 | } |
| 145 | 145 | ||
| 146 | def srctree_hash_files(d): | 146 | def srctree_hash_files(d, srcdir=None): |
| 147 | import shutil | 147 | import shutil |
| 148 | import subprocess | 148 | import subprocess |
| 149 | import tempfile | 149 | import tempfile |
| 150 | 150 | ||
| 151 | s_dir = d.getVar('EXTERNALSRC') | 151 | s_dir = srcdir or d.getVar('EXTERNALSRC') |
| 152 | git_dir = os.path.join(s_dir, '.git') | 152 | git_dir = os.path.join(s_dir, '.git') |
| 153 | oe_hash_file = os.path.join(git_dir, 'oe-devtool-tree-sha1') | 153 | oe_hash_file = os.path.join(git_dir, 'oe-devtool-tree-sha1') |
| 154 | 154 | ||
| @@ -166,7 +166,7 @@ def srctree_hash_files(d): | |||
| 166 | fobj.write(sha1) | 166 | fobj.write(sha1) |
| 167 | ret = oe_hash_file + ':True' | 167 | ret = oe_hash_file + ':True' |
| 168 | else: | 168 | else: |
| 169 | ret = d.getVar('EXTERNALSRC') + '/*:True' | 169 | ret = s_dir + '/*:True' |
| 170 | return ret | 170 | return ret |
| 171 | 171 | ||
| 172 | def srctree_configure_hash_files(d): | 172 | def srctree_configure_hash_files(d): |
