diff options
author | Paul Barker <pbarker@konsulko.com> | 2020-06-12 20:15:21 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2020-06-12 20:27:00 +0100 |
commit | 860ff1193fe53f04696d41635a720c2d1f29fa7f (patch) | |
tree | aeb49d574bdd8f1de8b7450aa2f0cad68e23d7f2 | |
parent | 1f9d2c21db3a1ad2ab13dfebd2f8e9a7c3682ee2 (diff) | |
download | bitbake-860ff1193fe53f04696d41635a720c2d1f29fa7f.tar.gz |
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.
Signed-off-by: Paul Barker <pbarker@konsulko.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r-- | lib/bb/fetch2/gitsm.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/bb/fetch2/gitsm.py b/lib/bb/fetch2/gitsm.py index 56bd5f048..175dee05c 100644 --- a/lib/bb/fetch2/gitsm.py +++ b/lib/bb/fetch2/gitsm.py @@ -163,9 +163,6 @@ class GitSM(Git): try: newfetch = Fetch([url], d, cache=False) newfetch.download() - # Drop a nugget to add each of the srcrevs we've fetched (used by need_update) - runfetchcmd("%s config --add bitbake.srcrev %s" % \ - (ud.basecmd, ud.revisions[ud.names[0]]), d, workdir=workdir) except Exception as e: logger.error('gitsm: submodule download failed: %s %s' % (type(e).__name__, str(e))) raise @@ -181,6 +178,9 @@ class GitSM(Git): shutil.rmtree(tmpdir) else: self.process_submodules(ud, ud.clonedir, download_submodule, d) + # Drop a nugget for the srcrev we've fetched (used by need_update) + runfetchcmd("%s config --add bitbake.srcrev %s" % \ + (ud.basecmd, ud.revisions[ud.names[0]]), d, workdir=ud.clonedir) def unpack(self, ud, destdir, d): def unpack_submodules(ud, url, module, modpath, workdir, d): |