Make it easier to reuse the function for other dirs than EXTERNALSRC.
Signed-off-by: Ola x Nilsson <[email protected]>
---
meta/classes/externalsrc.bbclass | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/meta/classes/externalsrc.bbclass b/meta/classes/externalsrc.bbclass
index e115a47..3e38399 100644
--- a/meta/classes/externalsrc.bbclass
+++ b/meta/classes/externalsrc.bbclass
@@ -142,12 +142,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')
@@ -165,7 +165,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):
--
2.1.4
--
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core