summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/fetch2
diff options
context:
space:
mode:
authorPaul Barker <pbarker@konsulko.com>2020-06-12 20:15:21 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2020-06-15 14:55:25 +0100
commit5c3d2ccf54ddd216e18d807c50331017ed77fe63 (patch)
tree9f31f30cee72e9a3c143bb4a2fa956e7a400010a /bitbake/lib/bb/fetch2
parent128621161c17fbca908195514e660b2e0d7f2352 (diff)
downloadpoky-5c3d2ccf54ddd216e18d807c50331017ed77fe63.tar.gz
bitbake: fetch2/gitsm: Mark srcrev as fetched once all submodules are processed
This prevents multiple bitbake.srcrev entries being created when a repository has more than one submodule. It also ensures that the bitbake.srcrev entry is not added unless all submodules are correctly fetched. (Bitbake rev: 860ff1193fe53f04696d41635a720c2d1f29fa7f) Signed-off-by: Paul Barker <pbarker@konsulko.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb/fetch2')
-rw-r--r--bitbake/lib/bb/fetch2/gitsm.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/bitbake/lib/bb/fetch2/gitsm.py b/bitbake/lib/bb/fetch2/gitsm.py
index 56bd5f0480..175dee05c0 100644
--- a/bitbake/lib/bb/fetch2/gitsm.py
+++ b/bitbake/lib/bb/fetch2/gitsm.py
@@ -163,9 +163,6 @@ class GitSM(Git):
163 try: 163 try:
164 newfetch = Fetch([url], d, cache=False) 164 newfetch = Fetch([url], d, cache=False)
165 newfetch.download() 165 newfetch.download()
166 # Drop a nugget to add each of the srcrevs we've fetched (used by need_update)
167 runfetchcmd("%s config --add bitbake.srcrev %s" % \
168 (ud.basecmd, ud.revisions[ud.names[0]]), d, workdir=workdir)
169 except Exception as e: 166 except Exception as e:
170 logger.error('gitsm: submodule download failed: %s %s' % (type(e).__name__, str(e))) 167 logger.error('gitsm: submodule download failed: %s %s' % (type(e).__name__, str(e)))
171 raise 168 raise
@@ -181,6 +178,9 @@ class GitSM(Git):
181 shutil.rmtree(tmpdir) 178 shutil.rmtree(tmpdir)
182 else: 179 else:
183 self.process_submodules(ud, ud.clonedir, download_submodule, d) 180 self.process_submodules(ud, ud.clonedir, download_submodule, d)
181 # Drop a nugget for the srcrev we've fetched (used by need_update)
182 runfetchcmd("%s config --add bitbake.srcrev %s" % \
183 (ud.basecmd, ud.revisions[ud.names[0]]), d, workdir=ud.clonedir)
184 184
185 def unpack(self, ud, destdir, d): 185 def unpack(self, ud, destdir, d):
186 def unpack_submodules(ud, url, module, modpath, workdir, d): 186 def unpack_submodules(ud, url, module, modpath, workdir, d):