summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta/classes/externalsrc.bbclass16
1 files changed, 7 insertions, 9 deletions
diff --git a/meta/classes/externalsrc.bbclass b/meta/classes/externalsrc.bbclass
index d1ca11303d..1d7300d65b 100644
--- a/meta/classes/externalsrc.bbclass
+++ b/meta/classes/externalsrc.bbclass
@@ -216,16 +216,14 @@ def srctree_hash_files(d, srcdir=None):
216 env['GIT_INDEX_FILE'] = tmp_index.name 216 env['GIT_INDEX_FILE'] = tmp_index.name
217 subprocess.check_output(['git', 'add', '-A', '.'], cwd=s_dir, env=env) 217 subprocess.check_output(['git', 'add', '-A', '.'], cwd=s_dir, env=env)
218 git_sha1 = subprocess.check_output(['git', 'write-tree'], cwd=s_dir, env=env).decode("utf-8") 218 git_sha1 = subprocess.check_output(['git', 'write-tree'], cwd=s_dir, env=env).decode("utf-8")
219 submodule_helper = subprocess.check_output(['git', 'submodule', 'status'], cwd=s_dir, env=env).decode("utf-8") 219 submodule_helper = subprocess.check_output(['git', 'submodule--helper', 'list'], cwd=s_dir, env=env).decode("utf-8")
220 for line in submodule_helper.splitlines(): 220 for line in submodule_helper.splitlines():
221 module_relpath = line.split()[1] 221 module_dir = os.path.join(s_dir, line.rsplit(maxsplit=1)[1])
222 if not module_relpath.split('/')[0] == '..': 222 proc = subprocess.Popen(['git', 'add', '-A', '.'], cwd=module_dir, env=env, stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL)
223 module_dir = os.path.join(s_dir, module_relpath) 223 proc.communicate()
224 proc = subprocess.Popen(['git', 'add', '-A', '.'], cwd=module_dir, env=env, stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL) 224 proc = subprocess.Popen(['git', 'write-tree'], cwd=module_dir, env=env, stdout=subprocess.PIPE, stderr=subprocess.DEVNULL)
225 proc.communicate() 225 stdout, _ = proc.communicate()
226 proc = subprocess.Popen(['git', 'write-tree'], cwd=module_dir, env=env, stdout=subprocess.PIPE, stderr=subprocess.DEVNULL) 226 git_sha1 += stdout.decode("utf-8")
227 stdout, _ = proc.communicate()
228 git_sha1 += stdout.decode("utf-8")
229 sha1 = hashlib.sha1(git_sha1.encode("utf-8")).hexdigest() 227 sha1 = hashlib.sha1(git_sha1.encode("utf-8")).hexdigest()
230 with open(oe_hash_file, 'w') as fobj: 228 with open(oe_hash_file, 'w') as fobj:
231 fobj.write(sha1) 229 fobj.write(sha1)