summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta/classes/externalsrc.bbclass11
1 files changed, 6 insertions, 5 deletions
diff --git a/meta/classes/externalsrc.bbclass b/meta/classes/externalsrc.bbclass
index c7b2bf2f49..3d6b80bee2 100644
--- a/meta/classes/externalsrc.bbclass
+++ b/meta/classes/externalsrc.bbclass
@@ -220,11 +220,12 @@ def srctree_hash_files(d, srcdir=None):
220 submodule_helper = subprocess.check_output(['git', 'submodule--helper', 'list'], cwd=s_dir, env=env).decode("utf-8") 220 submodule_helper = subprocess.check_output(['git', 'submodule--helper', 'list'], cwd=s_dir, env=env).decode("utf-8")
221 for line in submodule_helper.splitlines(): 221 for line in submodule_helper.splitlines():
222 module_dir = os.path.join(s_dir, line.rsplit(maxsplit=1)[1]) 222 module_dir = os.path.join(s_dir, line.rsplit(maxsplit=1)[1])
223 proc = subprocess.Popen(['git', 'add', '-A', '.'], cwd=module_dir, env=env, stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL) 223 if os.path.isdir(module_dir):
224 proc.communicate() 224 proc = subprocess.Popen(['git', 'add', '-A', '.'], cwd=module_dir, env=env, stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL)
225 proc = subprocess.Popen(['git', 'write-tree'], cwd=module_dir, env=env, stdout=subprocess.PIPE, stderr=subprocess.DEVNULL) 225 proc.communicate()
226 stdout, _ = proc.communicate() 226 proc = subprocess.Popen(['git', 'write-tree'], cwd=module_dir, env=env, stdout=subprocess.PIPE, stderr=subprocess.DEVNULL)
227 git_sha1 += stdout.decode("utf-8") 227 stdout, _ = proc.communicate()
228 git_sha1 += stdout.decode("utf-8")
228 sha1 = hashlib.sha1(git_sha1.encode("utf-8")).hexdigest() 229 sha1 = hashlib.sha1(git_sha1.encode("utf-8")).hexdigest()
229 with open(oe_hash_file, 'w') as fobj: 230 with open(oe_hash_file, 'w') as fobj:
230 fobj.write(sha1) 231 fobj.write(sha1)