diff options
Diffstat (limited to 'meta/classes/externalsrc.bbclass')
-rw-r--r-- | meta/classes/externalsrc.bbclass | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/meta/classes/externalsrc.bbclass b/meta/classes/externalsrc.bbclass index 64e94e3301..3d6b80bee2 100644 --- a/meta/classes/externalsrc.bbclass +++ b/meta/classes/externalsrc.bbclass | |||
@@ -68,6 +68,7 @@ python () { | |||
68 | url_data = fetch.ud[url] | 68 | url_data = fetch.ud[url] |
69 | parm = url_data.parm | 69 | parm = url_data.parm |
70 | if (url_data.type == 'file' or | 70 | if (url_data.type == 'file' or |
71 | url_data.type == 'npmsw' or | ||
71 | 'type' in parm and parm['type'] == 'kmeta'): | 72 | 'type' in parm and parm['type'] == 'kmeta'): |
72 | local_srcuri.append(url) | 73 | local_srcuri.append(url) |
73 | 74 | ||
@@ -219,11 +220,12 @@ def srctree_hash_files(d, srcdir=None): | |||
219 | 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") |
220 | for line in submodule_helper.splitlines(): | 221 | for line in submodule_helper.splitlines(): |
221 | 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]) |
222 | proc = subprocess.Popen(['git', 'add', '-A', '.'], cwd=module_dir, env=env, stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL) | 223 | if os.path.isdir(module_dir): |
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") | ||
227 | sha1 = hashlib.sha1(git_sha1.encode("utf-8")).hexdigest() | 229 | sha1 = hashlib.sha1(git_sha1.encode("utf-8")).hexdigest() |
228 | with open(oe_hash_file, 'w') as fobj: | 230 | with open(oe_hash_file, 'w') as fobj: |
229 | fobj.write(sha1) | 231 | fobj.write(sha1) |