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>
This commit is contained in:
parent
61b1e18608
commit
02f89167a3
|
@ -143,12 +143,12 @@ python externalsrc_compile_prefunc() {
|
||||||
bb.plain('NOTE: %s: compiling from external source tree %s' % (d.getVar('PN'), d.getVar('EXTERNALSRC')))
|
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 shutil
|
||||||
import subprocess
|
import subprocess
|
||||||
import tempfile
|
import tempfile
|
||||||
|
|
||||||
s_dir = d.getVar('EXTERNALSRC')
|
s_dir = srcdir or d.getVar('EXTERNALSRC')
|
||||||
git_dir = os.path.join(s_dir, '.git')
|
git_dir = os.path.join(s_dir, '.git')
|
||||||
oe_hash_file = os.path.join(git_dir, 'oe-devtool-tree-sha1')
|
oe_hash_file = os.path.join(git_dir, 'oe-devtool-tree-sha1')
|
||||||
|
|
||||||
|
@ -166,7 +166,7 @@ def srctree_hash_files(d):
|
||||||
fobj.write(sha1)
|
fobj.write(sha1)
|
||||||
ret = oe_hash_file + ':True'
|
ret = oe_hash_file + ':True'
|
||||||
else:
|
else:
|
||||||
ret = d.getVar('EXTERNALSRC') + '/*:True'
|
ret = s_dir + '/*:True'
|
||||||
return ret
|
return ret
|
||||||
|
|
||||||
def srctree_configure_hash_files(d):
|
def srctree_configure_hash_files(d):
|
||||||
|
|
Loading…
Reference in New Issue